multiarchive 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {multiarchive-0.2.3 → multiarchive-0.2.4}/PKG-INFO +1 -1
- {multiarchive-0.2.3 → multiarchive-0.2.4}/pyproject.toml +1 -1
- {multiarchive-0.2.3 → multiarchive-0.2.4}/pyproject.toml.orig +1 -1
- {multiarchive-0.2.3 → multiarchive-0.2.4}/src/multiarchive/_archive.py +6 -3
- {multiarchive-0.2.3 → multiarchive-0.2.4}/README.md +0 -0
- {multiarchive-0.2.3 → multiarchive-0.2.4}/src/multiarchive/__init__.py +0 -0
|
@@ -257,7 +257,7 @@ class Archive:
|
|
|
257
257
|
mode: File access mode ('r' for read, 'w' for write, 'a' for append)
|
|
258
258
|
compression_level: Compression level (ZIP: 0-9, TAR gzip: 0-9, TAR bzip2: 1-9)
|
|
259
259
|
If None, uses default compression
|
|
260
|
-
pwd: Password for
|
|
260
|
+
pwd: Password for reading an encrypted ZIP file
|
|
261
261
|
strict_timestamps: If True, reject timestamps outside the range supported
|
|
262
262
|
by ZIP; if False, clamp them to the minimum or maximum supported value
|
|
263
263
|
|
|
@@ -296,7 +296,7 @@ class Archive:
|
|
|
296
296
|
algo: Optional override for archive type based on file extension
|
|
297
297
|
mode: File access mode ('r' for read, 'w' for write, 'a' for append)
|
|
298
298
|
compression_level: Compression level (ZIP: 0-9, TAR gzip: 0-9, TAR bzip2: 1-9)
|
|
299
|
-
pwd: Password for
|
|
299
|
+
pwd: Password for reading an encrypted ZIP file
|
|
300
300
|
strict_timestamps: If True, reject timestamps outside the range supported
|
|
301
301
|
by ZIP; if False, clamp them to the minimum or maximum supported value
|
|
302
302
|
|
|
@@ -487,6 +487,9 @@ class Archive:
|
|
|
487
487
|
Raises:
|
|
488
488
|
ValueError: If file extension is not recognized or compression_level is invalid
|
|
489
489
|
"""
|
|
490
|
+
if self.pwd is not None:
|
|
491
|
+
raise ValueError("Passwords are only supported when reading ZIP files")
|
|
492
|
+
|
|
490
493
|
filename_lower = self.filename.lower()
|
|
491
494
|
|
|
492
495
|
if (
|
|
@@ -772,7 +775,7 @@ class Archive:
|
|
|
772
775
|
|
|
773
776
|
Args:
|
|
774
777
|
member: Name of the file to open, or ZipInfo/TarInfo/RarInfo object
|
|
775
|
-
mode: File open mode (only 'r' supported for
|
|
778
|
+
mode: File open mode (only 'r' supported for TAR and RAR files)
|
|
776
779
|
|
|
777
780
|
Returns:
|
|
778
781
|
File-like object for reading the member's contents, or None if member
|
|
File without changes
|
|
File without changes
|