]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Erlend E. Aasland [Thu, 18 May 2023 23:33:58 +0000 (01:33 +0200)]
[3.11] gh-104623: Update Windows installer to use SQLite 3.42.0 (#104625) (#104633)
Miss Islington (bot) [Thu, 18 May 2023 23:20:35 +0000 (16:20 -0700)]
[3.11] gh-104629: Don't skip test_clinic if _testclinic is missing (GH-104630) (#104632)
gh-104629: Don't skip test_clinic if _testclinic is missing (GH-104630)
Just skip the tests that depend on the _testclinic extension module;
we can still run the Python tests.
(cherry picked from commit
86ee49f469b84e4b746526a00d8191d0e374a268 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Thu, 18 May 2023 17:54:45 +0000 (10:54 -0700)]
[3.11] gh-104499: Fix typo. (GH-104598) (#104599)
gh-104499: Fix typo. (GH-104598)
(cherry picked from commit
c5b670efd1e6dabc94b6308734d63f762480b80f )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Thu, 18 May 2023 02:02:53 +0000 (19:02 -0700)]
[3.11] gh-104499: IDLE - fix completions for tk aqua 8.7 (GH-104591) (#104596)
gh-104499: IDLE - fix completions for tk aqua 8.7 (GH-104591)
(cherry picked from commit
678bf57ed04b8c250f0bc031ebd264bece76e731 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Thu, 18 May 2023 00:09:12 +0000 (17:09 -0700)]
[3.11] gh-104340: Suppress warning about unawaited exception for closed pipe stdin (GH-104586) (#104594)
(cherry picked from commit
7fc8e2d4627cdba5cb0075c9052ed6f4b6ecd36d )
Co-authored-by: Guido van Rossum <guido@python.org>
Miss Islington (bot) [Wed, 17 May 2023 21:41:25 +0000 (14:41 -0700)]
[3.11] gh-102153: Start stripping C0 control and space chars in `urlsplit` (GH-102508) (#104575)
* gh-102153: Start stripping C0 control and space chars in `urlsplit` (GH-102508)
`urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit GH-25595.
This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/GH-url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329).
---------
(cherry picked from commit
2f630e1ce18ad2e07428296532a68b11dc66ad10 )
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
Miss Islington (bot) [Wed, 17 May 2023 20:31:22 +0000 (13:31 -0700)]
[3.11] gh-104496: IDLE - fix About for mixed tcl/tk versions (GH-104585) (#104587)
gh-104496: IDLE - fix About for mixed tcl/tk versions (GH-104585)
Print both if they are different, as may happen in the future.
(cherry picked from commit
aed643baa968b4959b830d37750080cac546fba7 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Jelle Zijlstra [Wed, 17 May 2023 13:40:34 +0000 (06:40 -0700)]
[3.11] typing: Add more tests for TypeVar (GH-104571) (#104577)
During the PEP 695 implementation at one point I made
TypeVar.__name__ return garbage, and all of test_typing passed.
So I decided to add a few more tests.
(cherry picked from commit
26931944dd8abd6554249239344fa62b789b9028 )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Gregory P. Smith [Wed, 17 May 2023 08:07:10 +0000 (01:07 -0700)]
[3.11] gh-103861: Fix Zip64 extensions not being properly applied in some cases (GH-103863) (#104534)
Fix Zip64 extensions not being properly applied in some cases:
Fixes an issue where adding a small file to a `ZipFile`
object while forcing zip64 extensions causes an extra Zip64 record to be
added to the zip, but doesn't update the `min_version` or file sizes in
the primary central directory header.
Also fixed an edge case in checking if zip64 extensions are required:
This fixes an issue where if data requiring zip64 extensions was added
to an unseekable stream without specifying `force_zip64=True`, zip64
extensions would not be used and a RuntimeError would not be raised when
closing the file (even though the size would be known at that point).
This would result in successfully writing corrupt zip files.
Deciding if zip64 extensions are required outside of the `FileHeader`
function means that both `FileHeader` and `_ZipWriteFile` will always be
in sync. Previously, the `FileHeader` function could enable zip64
extensions without propagating that decision to the `_ZipWriteFile`
class, which would then not correctly write the data descriptor record
or check for errors on close.
If anyone is actually using `ZipInfo.FileHeader` as a public API without
explicitly passing True or False in for zip64, their own code may still be
susceptible to that kind of bug unless they make a similar change to
where the zip64 decision happens.
Fixes GH-103861
---------
.
(cherry picked from commit
798bcaa1eb01de7db9ff1881a3088603ad09b096 )
Co-authored-by: Carey Metcalfe <carey@cmetcalfe.ca>
Miss Islington (bot) [Wed, 17 May 2023 07:48:10 +0000 (00:48 -0700)]
[3.11] gh-87474: Fix file descriptor leaks in subprocess.Popen (GH-96351) (#104563)
gh-87474: Fix file descriptor leaks in subprocess.Popen (GH-96351)
This fixes several ways file descriptors could be leaked from `subprocess.Popen` constructor during error conditions by opening them later and using a context manager "fds to close" registration scheme to ensure they get closed before returning.
---------
(cherry picked from commit
3a4c44bb1e92802db64deec59cf8a68ad3973219 )
Co-authored-by: cptpcrd <31829097+cptpcrd@users.noreply.github.com>
Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
Miss Islington (bot) [Wed, 17 May 2023 00:03:51 +0000 (17:03 -0700)]
[3.11] gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (GH-104495) (#104569)
gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (GH-104495)
(cherry picked from commit
3cba61f111db9b5e8ef35632915309f81fff8c6c )
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Tue, 16 May 2023 17:57:34 +0000 (10:57 -0700)]
[3.11] gh-75367: Fix data descriptor detection in inspect.getattr_static (GH-104517) (#104557)
gh-75367: Fix data descriptor detection in inspect.getattr_static (GH-104517)
(cherry picked from commit
5e9f471e7db30893fb3f42681f17fdcdb70069ee )
Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: Carl Meyer <carl@oddbird.net>
Miss Islington (bot) [Tue, 16 May 2023 12:53:18 +0000 (05:53 -0700)]
[3.11] gh-104539: Fix indentation error in logging.config.rst (GH-104545) (#104546)
gh-104539: Fix indentation error in logging.config.rst (GH-104545)
Fix indentation error in logging.config.rst
(cherry picked from commit
0bb61dd5b0ffc248e18f1b33cddd18788f28e60a )
Co-authored-by: Jesper Noordsij <45041769+jnoordsij@users.noreply.github.com>
Irit Katriel [Tue, 16 May 2023 09:14:36 +0000 (10:14 +0100)]
[3.11] gh-104482: Fix error handling bugs in ast.c (#104514)
Miss Islington (bot) [Tue, 16 May 2023 02:47:51 +0000 (19:47 -0700)]
[3.11] gh-104461: Run tkinter test_configure_screen on X11 only (GH-104526)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Miss Islington (bot) [Mon, 15 May 2023 09:15:07 +0000 (02:15 -0700)]
[3.11] gh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (GH-104473) (#104500)
Miss Islington (bot) [Sun, 14 May 2023 21:24:07 +0000 (14:24 -0700)]
[3.11] gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (GH-104474) (#104485)
(cherry picked from commit
fb8739f0b6291fb048a94d6312f59ba4d10a20ca )
Co-authored-by: Sam Bull <git@sambull.org>
Miss Islington (bot) [Sun, 14 May 2023 20:25:25 +0000 (13:25 -0700)]
[3.11] gh-104337: Clarify random.gammavariate doc entry (GH-104410) (#104481)
(cherry picked from commit
88c5c586708dcff369c49edae947d487a80f0346 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Sun, 14 May 2023 12:00:57 +0000 (05:00 -0700)]
[3.11] Minor improvements to typing docs (GH-104465) (#104475)
Minor improvements to typing docs (GH-104465)
(cherry picked from commit
2f7b5e458e9189fa1ffd44339848aa1e52add3fa )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Sun, 14 May 2023 04:18:30 +0000 (21:18 -0700)]
[3.11] GH-71383: IDLE - Document testing subsets of modules (GH-104463) (#104464)
GH-71383: IDLE - Document testing subsets of modules (GH-104463)
(cherry picked from commit
080a5961527473af182b025bb29e0c52d43fd49e )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Sat, 13 May 2023 16:04:37 +0000 (09:04 -0700)]
[3.11] gh-75710: IDLE - add docstrings and comments to editor module (GH-104446) (#104450)
gh-75710: IDLE - add docstrings and comments to editor module (GH-104446)
Commit extracted from PR GH-3669. Will edit more later.
(cherry picked from commit
46f1c78eebe08e96ed29d364b1804dd37364831d )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
Miss Islington (bot) [Sat, 13 May 2023 07:16:28 +0000 (00:16 -0700)]
[3.11] Add a mention of PYTHONBREAKPOINT to breakpoint() docs (GH-104430) (#104447)
Add a mention of PYTHONBREAKPOINT to breakpoint() docs (GH-104430)
(cherry picked from commit
1be80ed107deb15b926f2794b8e6a7a527b8b84c )
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Terry Jan Reedy [Sat, 13 May 2023 04:47:21 +0000 (00:47 -0400)]
[3.11] gh-99836: IDLE - update news.txt for 3.11+ (#104445)
* gh-99836: IDLE 3.11 News.txt
* gh-99836: IDLE - update news.txt for 3.11+
Brandt Bucher [Fri, 12 May 2023 23:03:47 +0000 (16:03 -0700)]
[3.11] GH-104405: Add missing PEP 523 checks (GH-104441)
Brandt Bucher [Fri, 12 May 2023 22:29:02 +0000 (15:29 -0700)]
[3.11] Fix refleak in super_descr_get (GH-104440)
(cherry picked from commit
a781484c8e9834538e5ee7b9e2e6bec7b679e033 )
Brandt Bucher [Fri, 12 May 2023 22:06:29 +0000 (15:06 -0700)]
[3.11] GH-94841: Fix usage of Py_ALWAYS_INLINE (GH-104439)
Miss Islington (bot) [Fri, 12 May 2023 20:54:12 +0000 (13:54 -0700)]
[3.11] gh-103204: `http.server` - Enforce that HTTP version numbers must consist only of digits (GH-103205) (#104438)
gh-103204: `http.server` - Enforce that HTTP version numbers must consist only of digits (GH-103205)
Reject HTTP requests with invalid http/x.y version numbers: x or y being non-digits or too-long.
---------
(cherry picked from commit
cf720acfcbd8c9c25a706a4b6df136465a803992 )
Co-authored-by: Ben Kallus <49924171+kenballus@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Erlend E. Aasland [Thu, 11 May 2023 09:09:46 +0000 (11:09 +0200)]
[3.11] gh-101117: Improve accuracy of sqlite3.Cursor.rowcount docs (#104287) (#104381)
The SQLite C API sqlite3_changes() can only be relied upon when the
current active statement has been run to completion.
Miss Islington (bot) [Wed, 10 May 2023 23:19:49 +0000 (16:19 -0700)]
[3.11] GH-87695: Fix OSError from `pathlib.Path.glob()` (GH-104292) (GH-104362)
Fix issue where `pathlib.Path.glob()` raised `OSError` when it encountered
a symlink to an overly long path.
(cherry picked from commit
a33ce66dca57d4c36b1022fdf3b7e322f3203468 )
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Miss Islington (bot) [Wed, 10 May 2023 14:53:19 +0000 (07:53 -0700)]
[3.11] gh-103247: clear the module cache in a test in test_importlib/extensions/test_loader.py (GH-104226) (#104345)
gh-103247: clear the module cache in a test in test_importlib/extensions/test_loader.py (GH-104226)
(cherry picked from commit
22f3425c3d3d896be0917d80d55e8abb08d99b18 )
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Miss Islington (bot) [Wed, 10 May 2023 14:49:49 +0000 (07:49 -0700)]
[3.11] gh-104010: Separate and improve docs for `typing.get_origin` and `typing.get_args` (GH-104013) (#104359)
* separate documentation and examples for both functions
* add examples demonstrating behaviour with unsupported types
* document return value of `get_origin` for `ParamSpecArgs` and `ParamSpecKwargs` instances
(cherry picked from commit
a7a2dbbf72aceef61bfb50901bfa39bfb8d6d229 )
Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Wed, 10 May 2023 14:19:38 +0000 (07:19 -0700)]
[3.11] gh-103960: Dark mode: invert image brightness (GH-103983) (#104358)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Wed, 10 May 2023 06:35:24 +0000 (23:35 -0700)]
[3.11] gh-103848: Adds checks to ensure that bracketed hosts found by urlsplit are of IPv6 or IPvFuture format (GH-103849) (#104349)
gh-103848: Adds checks to ensure that bracketed hosts found by urlsplit are of IPv6 or IPvFuture format (GH-103849)
* Adds checks to ensure that bracketed hosts found by urlsplit are of IPv6 or IPvFuture format
---------
(cherry picked from commit
29f348e232e82938ba2165843c448c2b291504c5 )
Co-authored-by: JohnJamesUtley <81572567+JohnJamesUtley@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Tue, 9 May 2023 22:22:06 +0000 (15:22 -0700)]
[3.11] gh-48241: Clarify URL needs to be encoded when provided to urlopen and Request (GH-103855) (#103891)
(cherry picked from commit
44010d0f1203134cd8f885ca574caaef373e80f6 )
Co-authored-by: Michael Blahay <mblahay@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Miss Islington (bot) [Tue, 9 May 2023 20:00:58 +0000 (13:00 -0700)]
[3.11] gh-102327: Extend docs for "url" and "headers" parameters to HTTPConnection.request()
gh-102327: Extend docs for "url" and "headers" parameters to HTTPConnection.request()
Added example on how to use the HTTPConnection object for making GET request.
Original issue: https://github.com/python/cpython/issues/102327
---------
(cherry picked from commit
7ba6288feb961fcd60a29415c6371d2d3eb80bec )
Co-authored-by: David Foster <david@dafoster.net>
Co-authored-by: Éric <earaujo@caravan.coop>
Miss Islington (bot) [Tue, 9 May 2023 19:42:57 +0000 (12:42 -0700)]
[3.11] gh-104328: Fix typo in ``typing.Generic`` multiple inheritance error message (GH-104335) (#104338)
gh-104328: Fix typo in ``typing.Generic`` multiple inheritance error message (GH-104335)
(cherry picked from commit
01c321ca34d99f35f174768c6f8c500801d4ef4c )
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Miss Islington (bot) [Tue, 9 May 2023 16:46:25 +0000 (09:46 -0700)]
[3.11] gh-99889: Fix directory traversal security flaw in uu.decode() (GH-104096) (#104329)
gh-99889: Fix directory traversal security flaw in uu.decode() (GH-104096)
* Fix directory traversal security flaw in uu.decode()
* also check absolute paths and os.altsep
* Add a regression test.
---------
(cherry picked from commit
0aeda297931820436a50b78f4f7f0597274b5df4 )
[Google]
Co-authored-by: Sam Carroll <70000253+samcarroll42@users.noreply.github.com>
Miss Islington (bot) [Tue, 9 May 2023 14:31:00 +0000 (07:31 -0700)]
[3.11] [doc] logging.rst - Change link to point directly to the Google Group. (GH-93390) (GH-104318)
(cherry picked from commit
e6e81602f49a9bff51e2049c7bad60d1acb18d3f )
Shantanu [Tue, 9 May 2023 09:27:15 +0000 (02:27 -0700)]
[3.11] gh-102500: collections.abc.Buffer doesn't exist in 3.11 (#104317)
Miss Islington (bot) [Mon, 8 May 2023 23:49:45 +0000 (16:49 -0700)]
[3.11] GH-104308: socket.getnameinfo should release the GIL (GH-104307) (#104313)
GH-104308: socket.getnameinfo should release the GIL (GH-104307)
* socket.getnameinfo should release the GIL
* 📜🤖 Added by blurb_it.
---------
(cherry picked from commit
faf196213e60d8a90773e9e5680d3252bd294643 )
Co-authored-by: Nathaniel J. Smith <njs@pobox.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Miss Islington (bot) [Mon, 8 May 2023 19:17:42 +0000 (12:17 -0700)]
[3.11] GH-104284: Fix documentation gettext build (GH-104296) (#104299)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Mon, 8 May 2023 16:41:20 +0000 (09:41 -0700)]
[3.11] GH-104145: Use fully-qualified cross reference types for the bisect module (GH-104172) (#104295)
GH-104145: Use fully-qualified cross reference types for the bisect module (GH-104172)
(cherry picked from commit
76eef552f3653179782afcc5063f10560a6e1a80 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Mon, 8 May 2023 14:44:10 +0000 (07:44 -0700)]
[3.11] gh-103193: Improve `getattr_static` test coverage (GH-104286) (#104290)
gh-103193: Improve `getattr_static` test coverage (GH-104286)
(cherry picked from commit
921185ed050efbca2f0adeab79f676b7f8cc3660 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Alex Waygood [Mon, 8 May 2023 14:23:10 +0000 (15:23 +0100)]
[3.11] gh-102500: Remove mention of bytes shorthand (#104281) (#104288)
gh-102500: Remove mention of bytes shorthand (#104281)
The bytes shorthand was removed in PEP 688:
https://peps.python.org/pep-0688/#no-special-meaning-for-bytes
The reference to collections.abc.ByteString is also removed, since that object is deprecated (#91896) and has different semantics (#102092)
Although PEP 688 is new in Python 3.12, type checkers are expected to implement the new semantics for type annotations even if users are using an older version of Python, so this docs PR is backported to Python 3.11.
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Mon, 8 May 2023 12:04:43 +0000 (05:04 -0700)]
[3.11] gh-104265 Disallow instantiation of `_csv.Reader` and `_csv.Writer` (GH-104266) (#104278)
gh-104265 Disallow instantiation of `_csv.Reader` and `_csv.Writer` (GH-104266)
(cherry picked from commit
06c2a4858b8806abc700a0471434067910db54ec )
Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
Erlend E. Aasland [Mon, 8 May 2023 08:41:34 +0000 (10:41 +0200)]
[3.11] gh-100370: fix OverflowError in sqlite3.Connection.blobopen for 32-bit builds (#103902) (#104285)
Tian Gao [Sun, 7 May 2023 11:21:57 +0000 (04:21 -0700)]
[3.11] gh-103225: Fixed zero lineno issue for pdb (#103265) (#104262)
gh-103225: Fixed zero lineno issue for pdb (#103265)
Co-authored-by: Artem Mukhin <ortem00@gmail.com>
Lysandros Nikolaou [Sun, 7 May 2023 10:12:04 +0000 (12:12 +0200)]
[3.11] gh-96670: Raise SyntaxError when parsing NULL bytes (GH-97594) (#104195)
Miss Islington (bot) [Sun, 7 May 2023 05:11:00 +0000 (22:11 -0700)]
[3.11] Re-enable commented-out test in test_generators.py (GH-104130) (#104261)
Re-enable commented-out test in test_generators.py (GH-104130)
(cherry picked from commit
472938316a85c706c06ad1b3727a205d5bffcb1f )
Co-authored-by: ymki4360 <132453923+ymki4360@users.noreply.github.com>
Miss Islington (bot) [Sun, 7 May 2023 05:06:06 +0000 (22:06 -0700)]
[3.11] gh-104018: remove unused format "z" handling in string formatfloat() (GH-104107) (#104260)
gh-104018: remove unused format "z" handling in string formatfloat() (GH-104107)
This is a cleanup overlooked in PR GH-104033.
(cherry picked from commit
69621d1b09c996e43a1e13d2fa4c317d3dd4d738 )
Co-authored-by: John Belmonte <john@neggie.net>
Miss Islington (bot) [Sun, 7 May 2023 04:22:23 +0000 (21:22 -0700)]
[3.11] gh-104254: Document the optional keyword-only "context" argument to Task constructor (GH-104251) (#104258)
gh-104254: Document the optional keyword-only "context" argument to Task constructor (GH-104251)
(This was added in 3.11. It was already documented for `create_task()`, but not for `Task()`.)
(cherry picked from commit
4ee2068c34bd45eddba7f6a8ee83f62d5b6932fc )
Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
Miss Islington (bot) [Sun, 7 May 2023 02:28:04 +0000 (19:28 -0700)]
[3.11] gh-103886: Improve `builtins.__doc__` (GH-104179) (#104257)
gh-103886: Improve `builtins.__doc__` (GH-104179)
(cherry picked from commit
b35711d17a90251bdd57d255090e07daafe89f6c )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Sat, 6 May 2023 23:17:27 +0000 (16:17 -0700)]
[3.11] gh-101640: Make argparse _print_message catch any write error (GH-101802) (#104250)
gh-101640: Make argparse _print_message catch any write error (GH-101802)
* In particular, don't exit when trying to print to stderr = None.
* Add tests
(cherry picked from commit
42f54d1f9244784fec99e0610aa05a5051e594bb )
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Sat, 6 May 2023 15:31:28 +0000 (08:31 -0700)]
[3.11] Rewrite the turtledemo makeGraphFrame method (GH-104224) (#104238)
Rewrite the turtledemo makeGraphFrame method (GH-104224)
Replace `self._canvas` and `self.scanvas`, both bound to `canvas`,
with `self.canvas, which is accessed in other methods.
Replace `_s_` with `screen` and `_s_._canvas` with `canvas`.
Add a comment explaining the unorthodox use of
function turtle.Screen and singleton class turtle._Screen.
(cherry picked from commit
96f95df48e41ccf984de1ee1312c81809fd9e876 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Sat, 6 May 2023 04:14:37 +0000 (21:14 -0700)]
[3.11] GH-97950: Use new-style index directive ('builtin') (GH-104164) (#104221)
GH-97950: Use new-style index directive ('builtin') (GH-104164)
* Uncomment builtin removal in pairindextypes
* Use new-style index directive ('builtin') - C API
* Use new-style index directive ('builtin') - Extending
* Use new-style index directive ('builtin') - Library
* Use new-style index directive ('builtin') - Reference
* Use new-style index directive ('builtin') - Tutorial
(cherry picked from commit
f5088006ca8e9654fbc3de119462f0ab764e408b )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Erlend E. Aasland [Fri, 5 May 2023 11:46:23 +0000 (13:46 +0200)]
[3.11] gh-64658: Expand Argument Clinic return converter docs (#104175) (#104198)
Dong-hee Na [Fri, 5 May 2023 04:32:28 +0000 (13:32 +0900)]
[3.11] gh-104106: Add gcc fallback of mkfifoat/mknodat for macOS (gh-104129) (gh-104187)
gh-104106: Add gcc fallback of mkfifoat/mknodat for macOS (gh-104129)
Miss Islington (bot) [Thu, 4 May 2023 23:10:34 +0000 (16:10 -0700)]
[3.11] gh-104112: link from cached_property docs to method-caching FAQ (GH-104113) (#104182)
gh-104112: link from cached_property docs to method-caching FAQ (GH-104113)
(cherry picked from commit
fa86a77589a06661fcebb806d36f3a7450e2aecf )
Co-authored-by: Carl Meyer <carl@oddbird.net>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Thu, 4 May 2023 10:57:14 +0000 (03:57 -0700)]
[3.11] GH-97950: Use new-style index directive ('statement') (GH-104162) (#104163)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Adam Turner [Thu, 4 May 2023 10:48:57 +0000 (11:48 +0100)]
[3.11] GH-97950: Use new-style index directive ('exception') (GH-104160) (#104161)
Miss Islington (bot) [Thu, 4 May 2023 10:14:16 +0000 (03:14 -0700)]
[3.11] GH-97950: Use new-style index directive ('object') (GH-104158) (#104159)
GH-97950: Use new-style index directive ('object') (GH-104158)
* Uncomment object removal in pairindextypes
* Use new-style index directive ('object') - C API
* Use new-style index directive ('object') - Library
* Use new-style index directive ('object') - Reference
* Use new-style index directive ('object') - Tutorial
(cherry picked from commit
6ab463684b9d79880d98cd1f1406aa86af65985e )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Thu, 4 May 2023 09:27:04 +0000 (02:27 -0700)]
[3.11] GH-97950: Use new-style index directive ('operator') (GH-104156) (#104157)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Thu, 4 May 2023 08:53:19 +0000 (01:53 -0700)]
[3.11] GH-97950: Use new-style index directive ('keyword') (GH-104153) (#104155)
GH-97950: Use new-style index directive ('keyword') (GH-104153)
* Uncomment keyword removal in pairindextypes
* Use new-style index directive ('keyword') - Reference
(cherry picked from commit
33ca322c50baa5152afe388fb3b8b7d63dc5a9b9 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Adam Turner [Thu, 4 May 2023 08:39:15 +0000 (09:39 +0100)]
[3.11] GH-97950: Use new-style index directive ('module') (GH-103996) (#104154)
Miss Islington (bot) [Thu, 4 May 2023 07:26:08 +0000 (00:26 -0700)]
[3.11] GH-97950: Allow translation of index directive content (GH-104000) (#104151)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Wed, 3 May 2023 05:20:50 +0000 (22:20 -0700)]
[3.11] gh-101100: Fix Sphinx warnings in `curses` and `curses.ascii` modules (GH-103457) (#104124)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Wed, 3 May 2023 04:27:04 +0000 (21:27 -0700)]
[3.11] gh-104049: do not expose on-disk location from SimpleHTTPRequestHandler (GH-104067) (#104123)
gh-104049: do not expose on-disk location from SimpleHTTPRequestHandler (GH-104067)
Do not expose the local server's on-disk location from `SimpleHTTPRequestHandler` when generating a directory index. (unnecessary information disclosure)
---------
(cherry picked from commit
c7c3a60c88de61a79ded9fdaf6bc6a29da4efb9a )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Irit Katriel [Tue, 2 May 2023 18:24:02 +0000 (19:24 +0100)]
[3.11] gh-103590: do not wrap a single exception raised from a try-except* (#104094)
Shantanu [Tue, 2 May 2023 18:18:41 +0000 (11:18 -0700)]
[3.11] gh-65022: Fix description of tuple return value in copyreg (GH-103892) (#104098)
(cherry picked from commit
587f2f018051049cf5d9de3e12ed5aa7644404dc )
Rafael Fontenelle [Tue, 2 May 2023 11:50:16 +0000 (08:50 -0300)]
[3.11] GH-103484: Fix redirected permanently URLs (GH-104001) (#104088)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Fix redirected permanently URLs (#104001)
Erlend E. Aasland [Tue, 2 May 2023 08:15:06 +0000 (10:15 +0200)]
[3.11] gh-102997: Update Windows installer to SQLite 3.41.2. (#102999) (#104085)
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Miss Islington (bot) [Tue, 2 May 2023 07:44:16 +0000 (00:44 -0700)]
[3.11] Improve assert_type phrasing (GH-104081) (#104084)
Improve assert_type phrasing (GH-104081)
I'd like to make the fact that this does nothing at runtime
really obvious, since I suspect this is unintuitive for users who are
unfamiliar with static type checking.
I thought of this because of
https://discuss.python.org/t/add-arg-check-type-to-types/26384
wherein I'm skeptical that the user really did want `assert_type`.
(cherry picked from commit
82ba6ce303d04a7b21034e38d220e23ca9f1dc0a )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Tue, 2 May 2023 06:48:07 +0000 (23:48 -0700)]
[3.11] GH-103472: close response in HTTPConnection._tunnel (GH-103473) (#104077)
GH-103472: close response in HTTPConnection._tunnel (GH-103473)
Avoid a potential `ResourceWarning` in `http.client.HTTPConnection`
by closing the proxy / tunnel's CONNECT response explicitly.
---------
(cherry picked from commit
9de0cf20fa0485e327e57cc0864c7476da85cfad )
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Hugo van Kemenade [Tue, 2 May 2023 05:29:27 +0000 (08:29 +0300)]
[3.11] Replace Netlify with Read the Docs build previews (#103843) (#104083)
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Miss Islington (bot) [Tue, 2 May 2023 05:01:20 +0000 (22:01 -0700)]
[3.11] gh-102997: Update macOS installer to SQLite 3.41.2. (GH-104080)
(cherry picked from commit
f0ad4567319ee4ae878d570ab7709ab63df9123e )
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Miss Islington (bot) [Tue, 2 May 2023 03:22:57 +0000 (20:22 -0700)]
[3.11] gh-88496: IDLE - fix another test on macOS (GH-104075) (#104076)
gh-88496: IDLE - fix another test on macOS (GH-104075)
Needed for Catalina: test_sidebar add 'idletasks' and skip assert.
(cherry picked from commit
690df4c16ca4f0054d27a6148da9e6af809a2658 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 1 May 2023 20:18:29 +0000 (13:18 -0700)]
[3.11] gh-104018: disallow "z" format specifier in %-format of byte strings (GH-104033) (#104058)
gh-104018: disallow "z" format specifier in %-format of byte strings (GH-104033)
PEP-0682 specified that %-formatting would not support the "z" specifier,
but it was unintentionally allowed for bytes. This PR makes use of the "z"
flag an error for %-formatting in a bytestring.
Issue: GH-104018
---------
(cherry picked from commit
3ed8c882902a6982fd67e898a5b8a2d619fb5ddf )
Co-authored-by: John Belmonte <john@neggie.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Miss Islington (bot) [Mon, 1 May 2023 20:06:09 +0000 (13:06 -0700)]
[3.11] gh-100458: Clarify Enum.__format__() change of mixed-in types in the whatsnew/3.11.rst (GH-100387) (GH-104060)
Co-authored-by: Anže Pečar <anze@pecar.me>
Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Miss Islington (bot) [Mon, 1 May 2023 16:02:41 +0000 (09:02 -0700)]
[3.11] gh-104035: Do not ignore user-defined `__{get,set}state__` in slotted frozen dataclasses (GH-104041) (#104044)
gh-104035: Do not ignore user-defined `__{get,set}state__` in slotted frozen dataclasses (GH-104041)
(cherry picked from commit
99aab610622fc4b4c4fe56b77c0760cf77066a53 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Mon, 1 May 2023 14:17:12 +0000 (07:17 -0700)]
[3.11] gh-104036: Fix direct invocation of test_typing (GH-104037) (#104039)
gh-104036: Fix direct invocation of test_typing (GH-104037)
Previously, `python -m test test_typing` worked, but `python Lib/test/test_typing.py` did not.
(cherry picked from commit
4181d078fc945313568eb39965cb9190881606b5 )
Co-authored-by: Kirill Podoprigora <80244920+Eclips4@users.noreply.github.com>
Miss Islington (bot) [Mon, 1 May 2023 05:58:33 +0000 (22:58 -0700)]
[3.11] Adjust expression from `==` to `!=` in alignment with the meaning of the paragraph. (GH-104021) (GH-104031)
(cherry picked from commit
93107aa2a49a9354ffb10b3cd263dc3e99ebdeff )
Miss Islington (bot) [Mon, 1 May 2023 04:36:21 +0000 (21:36 -0700)]
[3.11] gh-88496: Fix IDLE test hang on macOS (GH-104025) (#104027)
gh-88496: Fix IDLE test hang on macOS (GH-104025)
Replace widget.update() with widget.update_idletasks in two places.
(cherry picked from commit
4b27972f5fe816d3616f97f8643d8ad922473ab5 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 1 May 2023 00:50:01 +0000 (17:50 -0700)]
[3.11] Improve int test coverage (GH-104024) (#104026)
Improve int test coverage (GH-104024)
Following discussion in https://discuss.python.org/t/bug-in-int-42/26360/5
This tests some of the things documented in https://github.com/python/cpython/pull/100436
(cherry picked from commit
69bc86cb1aed49db27afc0095e0f4bcd8f1f3983 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Sun, 30 Apr 2023 03:51:37 +0000 (20:51 -0700)]
[3.11] Update name in acknowledgements and add mailmap (GH-103696) (#104002)
Update name in acknowledgements and add mailmap (GH-103696)
I changed my name last year, and would like to update my name in the
acknowledgements and git history accordingly.
git-mailmap reference: https://git-scm.com/docs/gitmailmap
(cherry picked from commit
4b10ecc29f6ae69e599a5475a62d8e96a8711f90 )
Co-authored-by: Amethyst Reese <amethyst@n7.gg>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Shantanu [Sat, 29 Apr 2023 13:12:46 +0000 (06:12 -0700)]
[3.11] Fix description of MAKE_CELL (#103986)
Backport of part of #103923
Miss Islington (bot) [Sat, 29 Apr 2023 03:09:55 +0000 (20:09 -0700)]
[3.11] gh-99032: datetime docs: Encoding is no longer relevant (GH-93365) (#103788)
This removes a section of the `strftime` and `strptime` documentation that refers to a bygone era when `strftime` would return an encoded byte string.
---------
(cherry picked from commit
2aa22f72fbbabb4ca2a641c0546d25c45128c56f )
Co-authored-by: William Andrea <william.j.andrea@gmail.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Tian Gao [Fri, 28 Apr 2023 20:08:25 +0000 (13:08 -0700)]
[3.11] GH-103971: Fix incorrect locations for code following case blocks
Zachary Ware [Fri, 28 Apr 2023 17:07:16 +0000 (12:07 -0500)]
[3.11] gh-98822: Correct a few TESTSUBDIRS entries (GH-103970)
A few differences from the main branch were missed in GH-103946.
Petr Viktorin [Fri, 28 Apr 2023 15:41:09 +0000 (17:41 +0200)]
[3.11] gh-102950: Implement PEP 706 – Filter for tarfile.extractall (GH-102953) (GH-103832)
See [Backporting & Forward Compatibility in PEP 706](https://peps.python.org/pep-0706/#backporting-forward-compatibility).
- Backport
b52ad18a766700be14382ba222033b2d75a33521
- Backport
c8c3956d905e019101038b018129a4c90c9c9b8f
- Remove the DeprecationWarning
- Adjust docs
- Remove new `__all__` entries
Erlend E. Aasland [Fri, 28 Apr 2023 08:05:14 +0000 (10:05 +0200)]
[3.11] gh-100021: Document that sqlite3's executemany() discards resulting rows (#103939) (#103966)
Erlend E. Aasland [Thu, 27 Apr 2023 22:27:59 +0000 (00:27 +0200)]
[3.11] Docs: fix dunders with too many underscores (#103955) (#103957)
Steve Dower [Thu, 27 Apr 2023 21:23:46 +0000 (22:23 +0100)]
gh-103935: Use `io.open_code()` when executing code in trace and profile modules (GH-103947)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Adam Turner [Thu, 27 Apr 2023 20:55:09 +0000 (21:55 +0100)]
[3.11] GH-103903: Test the minimum Sphinx version in CI (#103904) (#103948)
[3.11] GH-103903: Test the minimum Sphinx version in CI (GH-103904).
(cherry picked from commit
44b5c21f4124f9fa1312fada313c80c6abfa6d49 )
Erlend E. Aasland [Thu, 27 Apr 2023 20:32:28 +0000 (22:32 +0200)]
[3.11] gh-98822: Add missing test directories to TESTSUBDIRS (#103942) (#103946)
Alex Waygood [Thu, 27 Apr 2023 14:56:55 +0000 (08:56 -0600)]
[3.11] gh-51574: Document behaviour of `mkdtemp` on 3.11 and lower (#103844)
Nikita Sobolev [Thu, 27 Apr 2023 10:33:29 +0000 (13:33 +0300)]
[3.11] gh-103880: Fix `assertRaises` usage in `test_genericalias` (GH-103916) (#103917)
(cherry picked from commit
dff8e5dc8d0758d1f9c55fdef308e44aefebe1a2 )
Miss Islington (bot) [Thu, 27 Apr 2023 10:29:54 +0000 (03:29 -0700)]
[3.11] gh-103607: Fix `pause_reading` to work when called from `connection_made` in `asyncio`. (GH-17425) (#103918)
gh-103607: Fix `pause_reading` to work when called from `connection_made` in `asyncio`. (GH-17425)
(cherry picked from commit
78942ecd9b1dbbd95e99cc298b0154fe126dac12 )
Co-authored-by: Itayazolay <itayazolay@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Inada Naoki [Thu, 27 Apr 2023 06:05:35 +0000 (15:05 +0900)]
gh-103883: Doc: Move PyUnicode_FromObject doc (GH-103913)
This API is one of Unicode creator APIs.
This APIs should not be placed in PEP 393 deprecated APIs.
Fixes: gh-103883
(cherry picked from commit
ce2383ec6665850a1bdffad388876481b6f3205f )
Shantanu [Wed, 26 Apr 2023 21:03:34 +0000 (15:03 -0600)]
[3.11] gh-101786: Clarify docs that asyncio.Server.sockets is a socket-like TransportSocket (GH-103877) (#103890)
Clarify that asyncio.Server.sockets is a socket-like TransportSocket
(cherry picked from commit
1c0a9c5a1c84bc334f2bde9d45676f19d9632823 )
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Miss Islington (bot) [Wed, 26 Apr 2023 20:55:39 +0000 (13:55 -0700)]
[3.11] gh-94300: Update datetime.strptime documentation (GH-95318) (#103785)
gh-94300: Update datetime.strptime documentation (GH-95318)
The new wording better reflects the cases where `datetime.strptime` differs from` time.strptime`.
---------
(cherry picked from commit
5b404d6cad2bf53295fdf96305f95efe1ea0174e )
Co-authored-by: Howie Zhao <howiezhaohr@hotmail.com>
Co-authored-by: Paul Ganssle <git@m.ganssle.io>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Alexander Belopolsky <abalkin@users.noreply.github.com>