]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-101144: Allow zipfile.Path .open & .read_text encoding to be positional...
authorGregory P. Smith <greg@krypto.org>
Fri, 20 Jan 2023 08:06:18 +0000 (00:06 -0800)
committerGitHub <noreply@github.com>
Fri, 20 Jan 2023 08:06:18 +0000 (00:06 -0800)
commitefe3a389cabd7295e6e0938767cdc4055c871e3c
tree5043cbcfc73741015aa28e6079ca8156a0e5fb2a
parent1998ea69c7739bc833baca47849f33e84fa337df
[3.11] gh-101144: Allow zipfile.Path .open & .read_text encoding to be positional (#101179)

The zipfile.Path open() and read_text() encoding parameter can be supplied as a positional argument without causing a TypeError again. 3.10.0b1 included a regression that made it keyword only.

Documentation update included as users writing code to be compatible with a wide range of versions will need to consider this for some time..

(cherry picked from commit 5927013e47a8c63b70e104152351f3447baa819c)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
Doc/library/zipfile.rst
Lib/test/test_zipfile.py
Lib/zipfile.py
Misc/NEWS.d/next/Library/2023-01-18-17-58-50.gh-issue-101144.FHd8Un.rst [new file with mode: 0644]