Serhiy Storchaka
51ef89cd9a
gh-115961: Add name and mode attributes for compressed file-like objects (GH-116036)
...
* Add name and mode attributes for compressed and archived file-like objects
in modules bz2, lzma, tarfile and zipfile.
* Change the value of the mode attribute of GzipFile from integer (1 or 2)
to string ('rb' or 'wb').
* Change the value of the mode attribute of ZipExtFile from 'r' to 'rb'.
2024-04-21 11:46:39 +03:00
Joachim Wuttke
9a388b9a64
bpo-43848: explain optional argument mtime in gzip.py. (GH-25410)
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-03-28 13:43:07 +00:00
Skip Montanaro
c9c6e04380
Correct description of inheriting from another class ( #114660 )
...
"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".
2024-02-01 10:07:16 -08:00
Hugo van Kemenade
3faf8e586d
gh-101100: Fix Sphinx reference warnings (GH-112416)
...
* Fix Sphinx warning in library/xml.rst
Direct use of the pyexpat module is deprecated, but this is how to check the version for security purposes
* Fix Sphinx warning in library/importlib.resources.rst
* Use italics for parameters
* Link to the exception
* Fix Sphinx warning in library/gzip.rst
* Document message and header defect base classes to fix Sphinx warning in library/email.headerregistry.rst
* Restore feed_eof() doc to fix Sphinx warning in library/asyncio-stream.rst
* Fix Sphinx warning in extending/newtypes.rst
* Fix Sphinx warning in c-api/set.rst
On stdtypes.rst, set and frozenset are documented together and the frozenset has the working refs
2023-11-25 15:40:19 -08:00
Adam Turner
77e9aae383
Docs: Avoid the deprecated ``.. cmdoption::`` directive ( #110292 )
2023-10-03 17:38:12 +00:00
Victor Stinner
59f32a785f
gh-109435: Add Doc/library/cmdline.rst ( #109436 )
...
Document modules providing a command-line interface (CLI).
2023-09-19 13:57:28 +02:00
Serhiy Storchaka
f2d07d3289
gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386)
2023-07-29 08:48:10 +03:00
Serhiy Storchaka
d036db728e
gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894)
2023-07-21 12:34:30 +03:00
Hugo van Kemenade
6a1c49a717
gh-101100: Test docs in nit-picky mode ( #102513 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-03-24 13:23:35 +02:00
Victor Stinner
d3a27e4c93
gh-94196: Remove gzip.GzipFile.filename attribute ( #94197 )
...
gzip: Remove the filename attribute of gzip.GzipFile,
deprecated since Python 2.6, use the name attribute instead. In write
mode, the filename attribute added '.gz' file extension if it was not
present.
2022-06-24 11:59:32 +02:00
Ruben Vorderman
ea23e7820f
bpo-43613: Faster implementation of gzip.compress and gzip.decompress (GH-27941)
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-02 17:02:59 +02:00
Serhiy Storchaka
a0652328a2
bpo-28286: Deprecate opening GzipFile for writing implicitly. (GH-16417)
...
Always specify the mode argument for writing.
2019-11-16 18:56:57 +02:00
Zackery Spytz
cf599f6f6f
bpo-6584: Add a BadGzipFile exception to the gzip module. (GH-13022)
...
Co-Authored-By: Filip Gruszczyński <gruszczy@gmail.com>
Co-Authored-By: Michele Orrù <maker@tumbolandia.net>
2019-05-13 10:50:52 +03:00
guoci
0e7497cb46
bpo-34898: Add mtime parameter to gzip.compress(). (GH-9704)
...
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.
2018-11-07 11:50:23 +02:00
Serhiy Storchaka
083a7a172b
bpo-35167: Specify program for gzip and json.tool command line options. (GH-10332)
2018-11-05 17:47:27 +02:00
Stéphane Wirtel
3e28eed9ec
bpo-34969: Add --fast, --best on the gzip CLI (GH-9833)
2018-11-03 16:24:23 +01:00
Stéphane Wirtel
7c817e620b
bpo-34913: Document gzip command line interface (GH-9782)
2018-10-10 08:28:26 +02:00
Berker Peksag
03020cfa97
Issue #28227 : gzip now supports pathlib
...
Patch by Ethan Furman.
2016-10-02 13:47:58 +03:00
Serhiy Storchaka
a84f6c3dd3
Issue #25523 : Merge a-to-an corrections from 3.4.
2015-11-02 14:39:05 +02:00
Serhiy Storchaka
d65c9496da
Issue #25523 : Further a-to-an corrections.
2015-11-02 14:10:23 +02:00
Martin Panter
2eb819f7a8
Issue #25523 : Merge "a" to "an" fixes from 3.4 into 3.5
2015-11-02 04:04:57 +00:00
Martin Panter
7462b64911
Issue #25523 : Correct "a" article to "an" article
...
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
2015-11-02 03:37:02 +00:00
Andrew Kuchling
f887a6180a
#21146 : give a more efficient recipe in gzip docs
2015-04-14 11:44:40 -04:00
Antoine Pitrou
2dbc6e6bce
Issue #23529 : Limit the size of decompressed data when reading from
...
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.
2015-04-11 00:31:01 +02:00
Serhiy Storchaka
bca63b362d
Issue #23688 : Added support of arbitrary bytes-like objects and avoided
...
unnecessary copying of memoryview in gzip.GzipFile.write().
Original patch by Wolfgang Maier.
2015-03-23 14:59:48 +02:00
Nadeem Vawda
bd6932a576
Closes #18430 : Document that peek() may change the position of the underlying
...
file for the BZ2File, GzipFile and LZMAFile classes.
2013-12-08 19:50:05 +01:00
Nadeem Vawda
6976104a36
#18430 : Document that peek() may change the position of the underlying file for
...
the BZ2File, GzipFile and LZMAFile classes.
2013-12-08 19:47:22 +01:00
Nadeem Vawda
ee1be99e05
Issue #19222 : Add support for the 'x' mode to the gzip module.
...
Original patch by Tim Heaney.
2013-10-19 00:11:13 +02:00
Georg Brandl
ffb94ae46f
Closes #15432 : GzipFile mtime argument is new in 3.1.
2013-10-06 19:02:08 +02:00
Georg Brandl
f27bfd81ec
Fix typo.
2013-10-06 12:33:20 +02:00
Serhiy Storchaka
e79be877df
Issue #18743 : Fix references to non-existant "StringIO" module.
2013-08-17 00:09:55 +03:00
Nadeem Vawda
6ff262e18f
Issue #15677 : Document that zlib and gzip accept a compression level of 0 to mean 'no compression'.
...
Patch by Brian Brazil.
2012-11-11 14:14:47 +01:00
Nadeem Vawda
19e568d254
Issue #15677 : Document that zlib and gzip accept a compression level of 0 to mean 'no compression'.
...
Patch by Brian Brazil.
2012-11-11 14:04:14 +01:00
Nadeem Vawda
68721019ef
Add fileobj support to gzip.open().
2012-06-04 23:21:38 +02:00
Nadeem Vawda
7e126205e6
Closes #13989 : Add support for text modes to gzip.open().
...
Also, add tests for gzip.open().
2012-05-06 15:04:01 +02:00
Nadeem Vawda
d1a107132c
Merge: #13989 : Document that GzipFile does not support text mode.
2012-02-11 23:54:51 +02:00
Nadeem Vawda
30d94b7aea
Issue #13989 : Document that GzipFile does not support text mode.
...
Also, give a more helpful error message when opened with an invalid mode string.
2012-02-11 23:45:10 +02:00
Éric Araujo
cd0d951a70
Merge edits from 3.2 ( #13716 , #1040439 , #2945 , #13770 , #6715 )
2012-02-05 13:49:59 +01:00
Éric Araujo
f2fbb9cf42
Improve interlinking of archiving/compression modules docs.
...
- Remove duplicated list of links to the other modules from each
module’s doc (people can already go up to library/archiving and
there they can see the list).
- Link to shutil high-level operations.
Reviewed by Nadeem Vawda in #6715 .
2012-01-16 16:55:55 +01:00
Nadeem Vawda
3ff069ebc6
Issue #6715 : Add module for compression using the LZMA algorithm.
2011-11-30 00:25:06 +02:00
Senthil Kumaran
276a58b821
Merge from 3.2 . Replace the term members with correct and appropriate terminology. Initial patch by Adam Woodbeck.
2011-07-04 11:31:53 -07:00
Senthil Kumaran
a6bac95a3c
issue10403 - Let's not use members anymore. Use 'attribute' where it denotes attribute and 'methods' where it denotes methods. Context should clarify usage.
2011-07-04 11:28:30 -07:00
Antoine Pitrou
6b4be36cfd
Clarify that GzipFile.read1() is now implemented
2011-04-04 21:09:05 +02:00
Antoine Pitrou
e88604755c
Clarify that GzipFile.read1() isn't implemented.
2011-04-04 21:06:20 +02:00
Raymond Hettinger
469271d4ea
More source links
2011-01-27 20:38:46 +00:00
Antoine Pitrou
7b998e9f52
GzipFile.peek improvements, suggested by Nir Aides.
2010-10-04 21:55:14 +00:00
Antoine Pitrou
c3ed2e7f83
Issue #9962 : GzipFile now has the peek() method.
2010-09-29 10:49:46 +00:00
Antoine Pitrou
e5768cf348
Small fixes in the gzip docs
2010-09-23 16:45:17 +00:00
Antoine Pitrou
7b9698435d
Issue #1675951 : Allow GzipFile to work with unseekable file objects.
...
Patch by Florian Festi.
2010-09-23 16:22:51 +00:00
Antoine Pitrou
11cb961b38
Add cross-references to the glossary entry for file objects.
2010-09-15 11:11:28 +00:00