| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-116032)
* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
(cherry picked from commit e72576c48b8be1e4f22c2f387f9769efa073c5be)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-108341) (#108402)
gh-108111: Flush gzip write buffer before seeking, fixing bad writes (GH-108341)
(cherry picked from commit 2eb60c1934f47671e6b3c9b90b6d9f1912d829a0)
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
|
|
|
|
|
| |
zlib. (GH-106167) (#106170)
GH-106160: Fix test_gzip failing under WASI, which does not have zlib. (GH-106167)
Fix test_gzip's failure under WASI, which does not have zlib, by using
test.support.import_helper.import_module to import zlib. (gzip
unconditionally imports zlib, so this does not cause any new skips.)
(cherry picked from commit 161012fc25910a47423bae8012398bf519a88140)
Co-authored-by: T. Wouters <thomas@python.org>
|
|
|
|
|
|
|
|
|
| |
GH-105808: Fix a regression introduced in GH-101251 (GH-105910)
Fix a regression introduced in pythonGH-101251, causing GzipFile.flush() to
not flush the compressor (nor pass along the zip_mode argument).
(cherry picked from commit 1858db7cbdbf41aa600c954c15224307bf81a258)
Co-authored-by: T. Wouters <thomas@python.org>
|
|
|
| |
Fixes #90425
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.
load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests.
|
|
|
|
|
|
|
| |
correctly (GH-26764)
No longer use len() to get the length of the input data. For some buffer protocol objects,
the length obtained by using len() is wrong.
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix test_float
* Fix _osx_support
* Fix test_fstring
* Fix test_gc
* Fix test_gzip
* Fix test_hashlib
* Fix unrelated whitespace issue
Co-authored-by: Ned Deily <nad@python.org>
|
| |
|
|
|
|
| |
Exit code is now 1 instead of 0. A message is printed to stderr instead of stdout. This is
the proper behaviour for a tool that can be used in scripts.
|
| |
|
|
|
|
| |
characters. (GH-21035)
|
|
|
|
|
|
| |
As described in RFC 1952, section 2.3.1, the XFL (eXtra FLags) byte of a
gzip member header should indicate whether the DEFLATE algorithm was
tuned for speed or compression ratio. Prior to this patch, archives
emitted by the `gzip` module always indicated maximum compression.
|
|
|
|
| |
Always specify the mode argument for writing.
|
|
|
|
|
| |
Co-Authored-By: Filip Gruszczyński <gruszczy@gmail.com>
Co-Authored-By: Michele Orrù <maker@tumbolandia.net>
|
| |
|
|
|
|
|
| |
Without setting mtime, time.time() will be used as the timestamp which will
end up in the compressed data and each invocation of the compress() function
will vary over time.
|
| |
|
|
|
|
| |
Add unit tests for the command line for the gzip module
|
| |
|
|
|
|
| |
Patch by Ethan Furman.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The underlying zlib library stores sizes in “unsigned int”. The corresponding
Python parameters are all sizes of buffers filled in by zlib, so it is okay
to reduce higher values to the UINT_MAX internal cap. OverflowError is still
raised for sizes that do not fit in Py_ssize_t.
Sizes are now limited to Py_ssize_t rather than unsigned long, because Python
byte strings cannot be larger than Py_ssize_t. Previously this could result
in a SystemError on 32-bit platforms.
This resolves a regression in the gzip module when reading more than UINT_MAX
or LONG_MAX bytes in one call, introduced by revision 62723172412c.
|
|
|
|
|
|
|
|
| |
GzipFile, BZ2File or LZMAFile. This defeats denial of service attacks
using compressed bombs (i.e. compressed payloads which decompress to a huge
size).
Patch by Martin Panter and Nikolaus Rath.
|
|
|
|
|
| |
unnecessary copying of memoryview in gzip.GzipFile.write().
Original patch by Wolfgang Maier.
|
|\ |
|
| |
| |
| |
| | |
Patch by Claudiu Popa.
|
| |
| |
| |
| | |
test files.
|
|\ \
| |/
| |
| |
| |
| |
| | |
requires them. Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface. Fixed
shebang lines in the unittestgui and checkpip scripts.
|
| |
| |
| |
| |
| |
| |
| | |
requires them. Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface. Fixed
shebang line to use python3 executable in the unittestgui script.
|
| | |
|
|/
|
|
| |
Original patch by Tim Heaney.
|
| |
|
|\
| |
| |
| |
| | |
with truncated header or footer.
Added tests for reading truncated gzip, bzip2, and lzma files.
|
| |
| |
| |
| |
| | |
with truncated header or footer.
Added tests for reading truncated gzip and bzip2 files.
|
|\ \
| |/
| |
| | |
Add relevant tests for GzipFile, and also for BZ2File and LZMAFile.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Also, add tests for gzip.open().
|
|\ \
| |/ |
|
| | |
|
| | |
|
|/
|
|
| |
to be wrapped in a TextIOWrapper. Patch by Nadeem Vawda.
|
| |
|
| |
|