Skip to content

Commit 1431f15

Browse files
committed
Fix typos and other nits.
1 parent 2146494 commit 1431f15

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lib/test/test_zipfile/test_core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4922,8 +4922,8 @@ class MonkeypatchedDecompressorTests(unittest.TestCase):
49224922
# Some third-party projects monkey-patch _get_decompressor() to add
49234923
# additional compression schemes. This can break at any time as the
49244924
# internal compressor objects change.
4925-
# To protect users, we try to keep this case working (see ).
4926-
# See also: GH-156002 and GH-113756.
4925+
# To protect users, we try to keep this case working.
4926+
# See also: GH-156002 and GH-113767.
49274927
COMPRESSION = 99
49284928

49294929
class Compressor:
@@ -4935,7 +4935,7 @@ def flush(self):
49354935
return b''
49364936

49374937
class Decompressor:
4938-
"""Decmpressor with only the 3.3+ BZ2Decompressor API"""
4938+
"""Decompressor with only the 3.3+ BZ2Decompressor API"""
49394939
eof = False
49404940

49414941
def decompress(self, data):
@@ -4974,7 +4974,7 @@ def test_roundtrip_monkeypatched_decompressor(self):
49744974
zf.writestr("member", data)
49754975
self.assertIn(data.swapcase(), buf.getvalue())
49764976
with (ignore_warnings(category=DeprecationWarning,
4977-
message='.*two argumentzs.*'),
4977+
message='.*two arguments.*'),
49784978
zipfile.ZipFile(io.BytesIO(buf.getvalue())) as zf):
49794979
self.assertEqual(zf.read("member"), data)
49804980
with zf.open("member") as f:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:mod:`zipfile` again reads members through a third-party decompressor
22
installed by monkey-patching the private ``_get_decompressor()`` to return an
33
object that only implements old BZ2Decompressor API from Python 3.3.
4-
Calling to decompress() with one argument is deprecated.
4+
Calling decompress() with one argument is deprecated.
55
Note that decompressors without ``needs_input`` and two-argument
66
``decompress()`` are vulnerable to :cve:`2026-15310`.

0 commit comments

Comments
 (0)