Skip to content

Commit cffee31

Browse files
committed
Correct docstrings about compress level change
Python 3.15 dropped the default compress level to 6, but 2 docstring still state the default level is 9.
1 parent a6b4aa6 commit cffee31

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Lib/gzip.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_TRADEOFF,
3939
4040
The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab"
4141
for binary mode, or "rt", "wt", "xt" or "at" for text mode. The default
42-
mode is "rb", and the default compresslevel is 9.
42+
mode is "rb", and the default compresslevel is 6.
4343
4444
For binary mode, this function is equivalent to the GzipFile
4545
constructor: GzipFile(filename, mode, compresslevel). In this case,
@@ -186,7 +186,7 @@ def __init__(self, filename=None, mode=None,
186186
The compresslevel argument is an integer from 0 to 9 controlling
187187
the level of compression; 1 is fastest and produces the least
188188
compression, and 9 is slowest and produces the most compression.
189-
0 is no compression at all. The default is 9.
189+
0 is no compression at all. The default is 6.
190190
191191
The optional mtime argument is the timestamp requested by gzip.
192192
The time is in Unix format, i.e., seconds since 00:00:00 UTC,

0 commit comments

Comments
 (0)