8000 Merge branch 'main' into pep-678 · python/cpython@47bfcdc · GitHub
[go: up one dir, main page]

Skip to content

Commit 47bfcdc

Browse files
authored
Merge branch 'main' into pep-678
2 parents c014ad8 + 943ca5e commit 47bfcdc

File tree

5 files changed

+220
-229
lines changed

5 files changed

+220
-229
lines changed

Lib/dis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def show_code(co, *, file=None):
245245
_ExceptionTableEntry = collections.namedtuple("_ExceptionTableEntry",
246246
"start end target depth lasti")
247247

248-
_OPNAME_WIDTH = 20
248+
_OPNAME_WIDTH = max(map(len, opmap))
249249
_OPARG_WIDTH = 5
250250

251251
class Instruction(_Instruction):

Lib/gzip.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,8 @@ def compress(data, compresslevel=_COMPRESS_LEVEL_BEST, *, mtime=None):
587587
header = _create_simple_gzip_header(compresslevel, mtime)
588588
trailer = struct.pack("<LL", zlib.crc32(data), (len(data) & 0xffffffff))
589589
# Wbits=-15 creates a raw deflate block.
590-
return header + zlib.compress(data, wbits=-15) + trailer
590+
return (header + zlib.compress(data, level=compresslevel, wbits=-15) +
591+
trailer)
591592

592593

593594
def decompress(data):

0 commit comments

Comments
 (0)
0