pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/py-rarfile py-rarfile: updated to 4.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fb9d5eb5e86e
branches:  trunk
changeset: 386747:fb9d5eb5e86e
user:      adam <adam%pkgsrc.org@localhost>
date:      Fri Oct 14 11:48:48 2022 +0000

description:
py-rarfile: updated to 4.0

rarfile v4.0

Main goals are:

Increased zipfile-compatibility, thus also achieving smaller difference between RAR3 and RAR5 archives.
Implement RarFile.extract on top of RarFile.open instead using unrar x directly, thus making maintenance of alternative backends more manageable. Negative aspect of that is that there are features 
that internal extract code does not support - hard links, NTFS streams and junctions.

Breaking changes:

Directory names will have "/" appended.
RarFile.extract operates only on single entry, so when used on directory it will create directory but not extract files under it.
RarFile.extract/RarFile.extractall/RarFile.testrar will not launch special unrar command line, instead they are implemented on top of RarFile.open.
Keyword args in top-level APIs were renamed to match zipfile:
RarFile(rarfile) -> RarFile(file)
RarFile.setpassword(password) -> .setpassword(pwd)
RarFile.getinfo(fname) -> .getinfo(name)
RarFile.open(fname, mode, psw) -> .open(name, mode, pwd)
RarFile.read(fname, psw) -> .read(name, pwd)
PATH_SEP cannot be changed from "/".

New features:

RarFile.extract will return final sanitized filename for target file.
RarInfo.is_dir is now preferred spelling of isdir(). Old method kept as alias.
New RarInfo.is_file and RarInfo.is_symlink methods. Only one of ~RarInfo.is_file, ~RarInfo.is_dir or ~RarInfo.is_symlink can be True.
RarFile.printdir has file argument for output.
RarFile.__iter__ loops over RarInfo entries.
RAR3: throw NeedFirstVolume exception with current volume number, like RAR5 does.
Nanosecond timestamp support. Visible as nsdatetime instance.
Minimal CLI when run as script: python3 -m rarfile
Skip old file versions in versioned archive.

Cleanups:

Use PBKDF2 implementation from hashlib.
Improve test coverage.

diffstat:

 archivers/py-rarfile/Makefile |  7 ++++---
 archivers/py-rarfile/distinfo |  8 ++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diffs (35 lines):

diff -r 13228432e2d2 -r fb9d5eb5e86e archivers/py-rarfile/Makefile
--- a/archivers/py-rarfile/Makefile     Fri Oct 14 11:39:56 2022 +0000
+++ b/archivers/py-rarfile/Makefile     Fri Oct 14 11:48:48 2022 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2022/01/04 20:52:31 wiz Exp $
+# $NetBSD: Makefile,v 1.5 2022/10/14 11:48:48 adam Exp $
 
-DISTNAME=      rarfile-3.3
+DISTNAME=      rarfile-4.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION=   1
 CATEGORIES=    archivers python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=r/rarfile/}
 
@@ -15,5 +14,7 @@
 
 USE_LANGUAGES= # none
 
+PYTHON_VERSIONS_INCOMPATIBLE=  27
+
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 13228432e2d2 -r fb9d5eb5e86e archivers/py-rarfile/distinfo
--- a/archivers/py-rarfile/distinfo     Fri Oct 14 11:39:56 2022 +0000
+++ b/archivers/py-rarfile/distinfo     Fri Oct 14 11:48:48 2022 +0000
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.5 2021/10/26 09:57:14 nia Exp $
+$NetBSD: distinfo,v 1.6 2022/10/14 11:48:48 adam Exp $
 
-BLAKE2s (rarfile-3.3.tar.gz) = b3fa891037a2c1e3b26b57ee223f689ee0293be5a31b71b37ed6b980f9c22f84
-SHA512 (rarfile-3.3.tar.gz) = 6c66efae84d960bdda09e4d379744ebca7f5e280dcdc287183e22e7e633bbfd9b25f0672910e0ae80f4434b336aee6aa1036325786cbf82639bcff11ee34a02d
-Size (rarfile-3.3.tar.gz) = 135373 bytes
+BLAKE2s (rarfile-4.0.tar.gz) = 731fe846cf39764dbe058353d9bb5e346cdc241f5c003beb370726de59826acb
+SHA512 (rarfile-4.0.tar.gz) = 05e15acd749564288d4f069970ac196344c33fd2710e918b84afe4c388aa364a17c63f86577037524336e3a022f6db2c8619f9b526f89e00753a8ab0d89263d4
+Size (rarfile-4.0.tar.gz) = 148026 bytes



Home | Main Index | Thread Index | Old Index