]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
16 months ago[3.12] Fix typos in comments (GH-120481) (#120775)
Terry Jan Reedy [Thu, 20 Jun 2024 03:59:31 +0000 (23:59 -0400)] 
[3.12] Fix typos in comments (GH-120481) (#120775)

Only 1 applicable change backported to 3.12.

(cherry picked from commit 656a1c8)

Co-authored-by: Xie Yanbo xieyanbo@gmail.com
16 months ago[3.12] gh-118820: Zero-valued flag enum has no name (GH-118848) (GH120758)
Miss Islington (bot) [Wed, 19 Jun 2024 22:11:58 +0000 (00:11 +0200)] 
[3.12] gh-118820: Zero-valued flag enum has no name (GH-118848) (GH120758)

gh-118820: Zero-valued flag enum has no name (GH-118848)
(cherry picked from commit ed5ae6c4d76feaff06c2104c8ff864553b000253)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.12] gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec...
Miss Islington (bot) [Wed, 19 Jun 2024 20:53:19 +0000 (22:53 +0200)] 
[3.12] gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec` (GH-120737) (#120761)

gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec` (GH-120737)
(cherry picked from commit 1e4815692f6c8a37a3974d0d7d2025494d026d76)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.12] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-120753) (#120756)
Miss Islington (bot) [Wed, 19 Jun 2024 20:01:25 +0000 (22:01 +0200)] 
[3.12] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-120753) (#120756)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
16 months ago[3.12] gh-120521: clarify except* documentation to allow tuples (GH-120523) (#120751)
Miss Islington (bot) [Wed, 19 Jun 2024 19:06:52 +0000 (21:06 +0200)] 
[3.12] gh-120521: clarify except* documentation to allow tuples (GH-120523) (#120751)

(cherry picked from commit 58b3f111767148e9011ccd52660e208f0c834b2a)

Co-authored-by: Danny Yang <yangdanny97@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
16 months ago[3.12] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120739)
Jelle Zijlstra [Wed, 19 Jun 2024 13:19:39 +0000 (06:19 -0700)] 
[3.12] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120739)

(cherry picked from commit d8f27cb1141fd3575de816438ed80a916c0560ed)

16 months ago[3.12] gh-119506: fix `_io.TextIOWrapper.write()` write during flush (GH-119507)...
Miss Islington (bot) [Wed, 19 Jun 2024 10:23:29 +0000 (12:23 +0200)] 
[3.12] gh-119506: fix `_io.TextIOWrapper.write()` write during flush (GH-119507) (#119965)

gh-119506: fix `_io.TextIOWrapper.write()` write during flush (GH-119507)
(cherry picked from commit 52586f930f62bd80374f0f240a4ecce0c0238174)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
16 months ago[3.12] gh-120449: fix ``test_pyclbr`` introspection for mangled names (GH-120450...
Miss Islington (bot) [Wed, 19 Jun 2024 07:20:16 +0000 (09:20 +0200)] 
[3.12] gh-120449: fix ``test_pyclbr`` introspection for mangled names (GH-120450) (GH-120701)

gh-120449: fix ``test_pyclbr`` introspection for mangled names (GH-120450)
(cherry picked from commit d8cd0fa4e347f460d0f3277e2392504e61ed087d)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.12] gh-120662: Improve `smtplib` example (GH-120668) (#120682)
Miss Islington (bot) [Tue, 18 Jun 2024 12:04:06 +0000 (14:04 +0200)] 
[3.12] gh-120662: Improve `smtplib` example (GH-120668) (#120682)

gh-120662: Improve `smtplib` example (GH-120668)
(cherry picked from commit 4bc27abdbee88efcf9ada83de6e9e9a0e439edaf)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
16 months ago[3.12] gh-119897: Revert buggy optimization which was removed in 3.13 (#120467)
Irit Katriel [Tue, 18 Jun 2024 09:45:40 +0000 (10:45 +0100)] 
[3.12] gh-119897: Revert buggy optimization which was removed in 3.13 (#120467)

16 months ago[3.12] gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615) (GH-120670)
Miss Islington (bot) [Tue, 18 Jun 2024 09:44:02 +0000 (11:44 +0200)] 
[3.12] gh-120590: Fix test_pydoc in the refleak hunting mode (GH-120615) (GH-120670)

Mocking only works if sys.modules['pydoc'] and pydoc are the same,
but some pydoc functions reload the module and change sys.modules.
Ensure that sys.modules['pydoc'] is always restored after the corresponding
tests.
(cherry picked from commit 2cf47389e26cb591342d07dad98619916d5a1b15)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago[3.12] gh-119824: Print stack entry when user input is needed … (#120594)
Tian Gao [Mon, 17 Jun 2024 17:40:49 +0000 (10:40 -0700)] 
[3.12] gh-119824: Print stack entry when user input is needed … (#120594)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
16 months ago[3.12] gh-120586: Fix several "unused function" warnings in `posixmodule.c` (GH-12058...
Miss Islington (bot) [Mon, 17 Jun 2024 07:01:15 +0000 (09:01 +0200)] 
[3.12] gh-120586: Fix several "unused function" warnings in `posixmodule.c` (GH-120588) (#120617)

gh-120586: Fix several "unused function" warnings in `posixmodule.c` (GH-120588)
(cherry picked from commit 3df2022931f77c5cadb3f51b371be6ae17587ede)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.12] gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 ...
Miss Islington (bot) [Mon, 17 Jun 2024 05:54:33 +0000 (07:54 +0200)] 
[3.12] gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (GH-120480) (#120613)

gh-112346: Document the OS byte in `gzip.compress` output change in 3.11 (GH-120480)
(cherry picked from commit bac4edad69bb20dd9460766e062637cae999e1e0)

gh-112346: Describe the "os" byte in gzip output change.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
16 months ago[3.12] gh-120567: Clarify weekday return in calendar.monthrange docstring (GH-120570...
Miss Islington (bot) [Sun, 16 Jun 2024 21:03:09 +0000 (23:03 +0200)] 
[3.12] gh-120567: Clarify weekday return in calendar.monthrange docstring (GH-120570) (#120598)

gh-120567: Clarify weekday return in calendar.monthrange docstring (GH-120570)
(cherry picked from commit bd4516d9efee109dd3b02a3d60845f9053fc6718)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.12] gh-118596: Add thread-safety clarifications to the SSLContext documentation...
Miss Islington (bot) [Sun, 16 Jun 2024 20:34:18 +0000 (22:34 +0200)] 
[3.12] gh-118596: Add thread-safety clarifications to the SSLContext documentation (GH-118597) (#120596)

gh-118596: Add thread-safety clarifications to the SSLContext documentation (GH-118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](https://github.com/psf/requests/pull/6667) where the matter was clarified by @tiran in [this comment](https://github.com/psf/requests/pull/6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
(cherry picked from commit 4f59f8638267aa64ad2daa0111d8b7fdc2499834)

Co-authored-by: mm-matthias <43849132+mm-matthias@users.noreply.github.com>
16 months ago[3.12] Docs: remove temporary hardcoded links and move inline JS to own file (GH...
Hugo van Kemenade [Sun, 16 Jun 2024 15:14:22 +0000 (09:14 -0600)] 
[3.12] Docs: remove temporary hardcoded links and move inline JS to own file (GH-120348) (#120589)

[3.12] Docs: remove temporary hardcoded links (GH-120348)
(cherry picked from commit b8484c6ad7fd14ca464e584b79821b4b906dd77a)

16 months ago[3.12] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (#120578)
Nyuan Zhang [Sun, 16 Jun 2024 06:50:27 +0000 (14:50 +0800)] 
[3.12] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (#120578)

16 months ago[3.12] gh-120360: Add self as IDLE doc owner (GH-120571) (#120577)
Miss Islington (bot) [Sun, 16 Jun 2024 06:12:48 +0000 (08:12 +0200)] 
[3.12] gh-120360: Add self as IDLE doc owner (GH-120571) (#120577)

gh-120360: Add self as IDLE doc owner (GH-120571)

Add self as IDLE doc owner
(cherry picked from commit cf49ef78f894e418bea7de23dde9b01d6235889d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
16 months ago[3.12] gh-120417: Remove unused import in idlelib (GH-120420) (#120574)
Terry Jan Reedy [Sun, 16 Jun 2024 05:45:32 +0000 (01:45 -0400)] 
[3.12] gh-120417: Remove unused import in idlelib (GH-120420) (#120574)

(cherry picked from commit 4c6d4f5)

Co-authored-by: Victor Stinner vstinner@python.org
16 months ago[3.12] annotations: expand documentation on "simple" assignment targets (GH-120535...
Miss Islington (bot) [Sat, 15 Jun 2024 15:24:21 +0000 (17:24 +0200)] 
[3.12] annotations: expand documentation on "simple" assignment targets (GH-120535) (#120556)

This behavior is rather surprising and it was not clearly specified.

(cherry picked from commit 9e0b11eb21930b7b8e4a396200a921e9985cfca4)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
16 months ago[3.12] Add some more edge-case tests for `inspect.get_annotations` with `eval_str...
Miss Islington (bot) [Sat, 15 Jun 2024 13:10:01 +0000 (15:10 +0200)] 
[3.12] Add some more edge-case tests for `inspect.get_annotations` with `eval_str=True` (GH-120550) (#120552)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
16 months ago[3.12] gh-120128: fix description of argument to ipaddress.collapse_addresses() ...
Miss Islington (bot) [Sat, 15 Jun 2024 12:12:45 +0000 (14:12 +0200)] 
[3.12] gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131) (#120136)

gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131)

The argument to collapse_addresses() is now described as an *iterable*
(rather than *iterator*).
(cherry picked from commit f878d46e5614f08a9302fcb6fc611ef49e9acf2f)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
16 months ago[3.12] gh-120544: Add `else: fail()` to tests where exception is expected (GH-120545...
Miss Islington (bot) [Sat, 15 Jun 2024 11:54:22 +0000 (13:54 +0200)] 
[3.12] gh-120544: Add `else: fail()` to tests where exception is expected (GH-120545) (#120547)

gh-120544: Add `else: fail()` to tests where exception is expected (GH-120545)
(cherry picked from commit 42ebdd83bb194f054fe5a10b3caa0c3a95be3679)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.12] gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498) (#120549)
Miss Islington (bot) [Sat, 15 Jun 2024 11:21:05 +0000 (13:21 +0200)] 
[3.12] gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498) (#120549)

gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498)
(cherry picked from commit c501261c919ceb97c850ef9427a93326f06a8f2e)

Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.12] gh-119819: Conditional skip of logging tests that require multiprocessing...
Miss Islington (bot) [Sat, 15 Jun 2024 00:32:28 +0000 (02:32 +0200)] 
[3.12] gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (GH-120476) (#120532)

gh-119819: Conditional skip of logging tests that require multiprocessing subprocess support (GH-120476)

Skip tests that require multiprocessing subprocess support.
(cherry picked from commit 92f6d400f76b6a04dddd944568870f689c8fab5f)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
16 months ago[3.12] gh-120361: Add `nonmember` test with enum flags inside to `test_enum` (GH...
Miss Islington (bot) [Fri, 14 Jun 2024 17:59:12 +0000 (19:59 +0200)] 
[3.12] gh-120361: Add `nonmember` test with enum flags inside to `test_enum` (GH-120364) (#120512)

gh-120361: Add `nonmember` test with enum flags inside to `test_enum` (GH-120364)

* gh-120361: Add `nonmember` test with enum flags inside to `test_enum`
(cherry picked from commit 7fadfd82ebf6ea90b38cb3f2a046a51f8601a205)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
16 months ago[3.12] gh-114053: Fix bad interaction of PEP 695, PEP 563 and `inspect.get_annotation...
Miss Islington (bot) [Thu, 13 Jun 2024 21:35:21 +0000 (23:35 +0200)] 
[3.12] gh-114053: Fix bad interaction of PEP 695, PEP 563 and `inspect.get_annotations` (GH-120270) (#120475)

gh-114053: Fix bad interaction of PEP 695, PEP 563 and `inspect.get_annotations` (GH-120270)
(cherry picked from commit 42351c3b9a357ec67135b30ed41f59e6f306ac52)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
16 months ago[3.12] GH-119054: Add "Renaming and deleting" section to pathlib docs. (GH-120465...
Miss Islington (bot) [Thu, 13 Jun 2024 20:31:52 +0000 (22:31 +0200)] 
[3.12] GH-119054: Add "Renaming and deleting" section to pathlib docs. (GH-120465) (#120473)

GH-119054: Add "Renaming and deleting" section to pathlib docs. (GH-120465)

Add dedicated subsection for `pathlib.Path.rename()`, `replace()`,
`unlink()` and `rmdir()`.
(cherry picked from commit d88a1f2e156cd1072119afa91d4f4dc4037c1b21)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
16 months ago[3.12] gh-71587: Drop local reference cache to `_strptime` module in `_datetime`...
neonene [Thu, 13 Jun 2024 18:47:46 +0000 (03:47 +0900)] 
[3.12] gh-71587: Drop local reference cache to `_strptime` module in `_datetime` (gh-120431)

The _strptime module object was cached in a static local variable (in the datetime.strptime() implementation).  That's a problem when it crosses isolation boundaries, such as reinitializing the runtme or between interpreters.  This change fixes the problem by dropping the static variable, instead always relying on the normal sys.modules cache (via PyImport_Import()).

(cherry picked from commit 127c1d2771749853e287632c086b6054212bf12a, AKA gh-120224)

16 months ago[3.12] GH-119054: Add "Creating files and directories" section to pathlib docs. ...
Barney Gale [Thu, 13 Jun 2024 18:21:27 +0000 (19:21 +0100)] 
[3.12] GH-119054: Add "Creating files and directories" section to pathlib docs. (GH-120186) (#120464)

Add dedicated subsection for `pathlib.Path.touch()`, `mkdir()`,
`symlink_to()` and `hardlink_to()`. Also note that `open()`, `write_text()`
and `write_bytes()` are often used to create files.

(cherry picked from commit c2d810b6d4deeea530648a8d0983e3a2adf6c942)

16 months ago[3.12] gh-119146: Update ``regexp`` in `build.yml` to not trigger the jobs on `*...
Miss Islington (bot) [Thu, 13 Jun 2024 12:39:05 +0000 (14:39 +0200)] 
[3.12] gh-119146: Update ``regexp`` in `build.yml` to not trigger the jobs on `*.md` and `*.ini` files. (GH-120435) (#120448)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.12] gh-93691: fix too broad source locations of for statement iterators (GH-120330...
Irit Katriel [Thu, 13 Jun 2024 10:38:36 +0000 (11:38 +0100)] 
[3.12] gh-93691: fix too broad source locations of for statement iterators (GH-120330 (#120405)

[3.12] gh-93691: fix too broad source locations of for statement iterators (GH-120330).
(cherry picked from commit 97b69db167be28a33688db436551a6c3c3ea4662)

16 months ago[3.12] gh-101575: document Decimal.__round__() (GH-101737) (GH-120395)
Miss Islington (bot) [Thu, 13 Jun 2024 07:10:17 +0000 (09:10 +0200)] 
[3.12] gh-101575: document Decimal.__round__() (GH-101737) (GH-120395)

gh-101575: document Decimal.__round__() (GH-101737)
(cherry picked from commit 7dd8c37a067f9fcb6a2a658d6a93b294cc2e6fb4)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
16 months ago[3.12] Fix typos in documentation (GH-120338) (#120439)
Xie Yanbo [Thu, 13 Jun 2024 06:32:35 +0000 (14:32 +0800)] 
[3.12] Fix typos in documentation (GH-120338) (#120439)

(cherry picked from commit ce3879bd45e068f8e2a5a214acd234ca44cad53b)

16 months ago[3.12] gh-120343: Fix column offsets of multiline tokens in tokenize (GH-120391)...
Miss Islington (bot) [Wed, 12 Jun 2024 19:10:35 +0000 (21:10 +0200)] 
[3.12] gh-120343: Fix column offsets of multiline tokens in tokenize (GH-120391) (#120428)

(cherry picked from commit 4b5d3e0e721a952f4ac9d17bee331e6dfe543dcd)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
16 months ago[3.12] gh-120345: Fix incorrect use of the :class: role with the "()" suffix (GH...
Miss Islington (bot) [Wed, 12 Jun 2024 14:42:06 +0000 (16:42 +0200)] 
[3.12] gh-120345: Fix incorrect use of the :class: role with the "()" suffix (GH-120347) (GH-120412)

* Remove "()" when refer to a class as a type.
* Use :func: when refer to a callable.
* Fix reference to the datetime.astimezone() method.
(cherry picked from commit 92c9c6ae147e1e658bbc8d454f8c7b2c4dea31d1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago[3.12] gh-120155: Add assertion to sre.c match_getindex() (GH-120402) (#120410)
Miss Islington (bot) [Wed, 12 Jun 2024 13:57:45 +0000 (15:57 +0200)] 
[3.12] gh-120155: Add assertion to sre.c match_getindex() (GH-120402) (#120410)

gh-120155: Add assertion to sre.c match_getindex() (GH-120402)

Add an assertion to help static analyzers to detect that i*2 cannot
overflow.
(cherry picked from commit 42b25dd61ff3593795c4cc2ffe876ab766098b24)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months agogh-120198: Fix race condition when editing __class__ with an audit hook active (GH...
Ken Jin [Wed, 12 Jun 2024 13:06:24 +0000 (21:06 +0800)] 
gh-120198: Fix race condition when editing __class__ with an audit hook active (GH-120195)

Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
17 months ago[3.12] gh-120343: Do not reset byte_col_offset_diff after multiline tokens (GH-120352...
Miss Islington (bot) [Tue, 11 Jun 2024 17:22:16 +0000 (19:22 +0200)] 
[3.12] gh-120343: Do not reset byte_col_offset_diff after multiline tokens (GH-120352) (#120356)

(cherry picked from commit 1b62bcee941e54244b3ce6476aef8913604987c9)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
17 months ago[3.12] Fix typo in ElementTree docs (GH-120342) (#120358)
Miss Islington (bot) [Tue, 11 Jun 2024 17:19:06 +0000 (19:19 +0200)] 
[3.12] Fix typo in ElementTree docs (GH-120342) (#120358)

Fix typo in ElementTree docs (GH-120342)
(cherry picked from commit 0335662fe1f663fe96e3e4acf0f34c5959d06b00)

Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
17 months ago[3.12] gh-120268: Prohibit passing ``None`` to ``_pydatetime.date.fromtimestamp`...
Miss Islington (bot) [Tue, 11 Jun 2024 09:54:20 +0000 (11:54 +0200)] 
[3.12] gh-120268: Prohibit passing ``None`` to ``_pydatetime.date.fromtimestamp`` (GH-120269) (GH-120283)

This makes the pure Python implementation consistent with the C implementation.
(cherry picked from commit 34f5ae69fe9ab0f5b23311d5c396d0cbb5902913)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
17 months ago[3.12] gh-120298: Fix use-after-free in `list_richcompare_impl` (GH-120303) (#120339)
Miss Islington (bot) [Tue, 11 Jun 2024 07:22:59 +0000 (09:22 +0200)] 
[3.12] gh-120298: Fix use-after-free in `list_richcompare_impl` (GH-120303) (#120339)

gh-120298: Fix use-after-free in `list_richcompare_impl` (GH-120303)
(cherry picked from commit 141babad9b4eceb83371bf19ba3a36b50dd05250)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.12] gh-65454: avoid triggering call to a PropertyMock in NonCallableMock.__setattr...
Miss Islington (bot) [Tue, 11 Jun 2024 06:07:25 +0000 (08:07 +0200)] 
[3.12] gh-65454: avoid triggering call to a PropertyMock in NonCallableMock.__setattr__ (GH-120019) (#120337)

gh-65454: avoid triggering call to a PropertyMock in NonCallableMock.__setattr__ (GH-120019)
(cherry picked from commit 9e9ee50421c857b443e2060274f17fb884d54473)

Co-authored-by: blhsing <blhsing@gmail.com>
17 months ago[3.12] gh-119600: mock: do not access attributes of original when new_callable is...
Miss Islington (bot) [Tue, 11 Jun 2024 06:01:02 +0000 (08:01 +0200)] 
[3.12] gh-119600: mock: do not access attributes of original when new_callable is set (GH-119601) (#120335)

gh-119600: mock: do not access attributes of original when new_callable is set (GH-119601)

In order to patch flask.g e.g. as in GH-84982, that
proxies getattr must not be invoked. For that,
mock must not try to read from the original
object. In some cases that is unavoidable, e.g.
when doing autospec. However, patch("flask.g",
new_callable=MagicMock) should be entirely safe.
(cherry picked from commit 422c4fc855afd18bcc6415902ea1d85a50cb7ce1)

Co-authored-by: Robert Collins <robert.collins@cognite.com>
17 months ago[3.12] GH-115983: skip building shared modules for testing under WASI (GH-116528...
Miss Islington (bot) [Mon, 10 Jun 2024 13:27:04 +0000 (15:27 +0200)] 
[3.12] GH-115983: skip building shared modules for testing under WASI (GH-116528) (#120316)

GH-115983: skip building shared modules for testing under WASI (GH-116528)
(cherry picked from commit 8c094c3095feb4de2efebd00f67fb6cc3b2bc240)

Co-authored-by: Brett Cannon <brett@python.org>
17 months ago[3.12] bpo-24766: doc= argument to subclasses of property not handled correctly ...
Serhiy Storchaka [Mon, 10 Jun 2024 10:32:45 +0000 (13:32 +0300)] 
[3.12] bpo-24766: doc= argument to subclasses of property not handled correctly (GH-2487) (GH-120312)

(cherry picked from commit 4829522b8d3e1a28930f1cccfcc9635e035a0eb4)

Co-authored-by: E. M. Bray <erik.bray@lri.fr>
17 months ago[3.12] gh-120155: Fix Coverity issue in zoneinfo load_data() (GH-120232) (#120311)
Miss Islington (bot) [Mon, 10 Jun 2024 10:12:25 +0000 (12:12 +0200)] 
[3.12] gh-120155: Fix Coverity issue in zoneinfo load_data() (GH-120232) (#120311)

gh-120155: Fix Coverity issue in zoneinfo load_data() (GH-120232)

Declare the 'rv' varaible at the top of the load_data() function to
make sure that it's initialized before the first 'goto error' which
uses 'rv' (return rv).

Fix the Coverity issue:

Error: UNINIT (CWE-457):
Python-3.12.2/Modules/_zoneinfo.c:1233:5: skipped_decl: Jumping over declaration of ""rv"".
Python-3.12.2/Modules/_zoneinfo.c:1284:5: uninit_use: Using uninitialized value ""rv"".
  1282|       }
  1283|
  1284|->     return rv;
  1285|   }
  1286|
(cherry picked from commit b90bd3e5bbc136f53b24ee791824acd6b17e0d42)

Co-authored-by: Victor Stinner <vstinner@python.org>
17 months ago[3.12] gh-119666: fix multiple class-scope comprehensions referencing __class__ ...
Miss Islington (bot) [Mon, 10 Jun 2024 04:37:15 +0000 (06:37 +0200)] 
[3.12] gh-119666: fix multiple class-scope comprehensions referencing __class__ (GH-120295) (#120300)

17 months ago[3.12] gh-120276: Fix incorrect email.header.Header maxlinelen default (GH-120277...
Miss Islington (bot) [Sat, 8 Jun 2024 17:26:01 +0000 (19:26 +0200)] 
[3.12] gh-120276: Fix incorrect email.header.Header maxlinelen default (GH-120277) (GH-120278)

(cherry picked from commit 7c016deae62308dd1b4e2767fc6abf04857c7843)

Co-authored-by: Clinton <pygeek@users.noreply.github.com>
17 months ago[3.12] gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123...
Miss Islington (bot) [Sat, 8 Jun 2024 16:28:21 +0000 (18:28 +0200)] 
[3.12] gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123) (#120274)

gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123)
(cherry picked from commit 5d59b870effa0f576acf7264cfcbfca2b36e34e3)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
17 months ago[3.12] gh-120244: Fix re.sub() reference leak (GH-120245) (GH-120265)
Miss Islington (bot) [Sat, 8 Jun 2024 11:10:44 +0000 (13:10 +0200)] 
[3.12] gh-120244: Fix re.sub() reference leak (GH-120245) (GH-120265)

(cherry picked from commit 38a25e9560cf0ff0b80d9e90bce793ff24c6e027)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
17 months ago[3.12] bpo-37755: Use configured output in pydoc instead of pager (GH-15105) (GH...
Serhiy Storchaka [Sat, 8 Jun 2024 09:46:25 +0000 (12:46 +0300)] 
[3.12] bpo-37755: Use configured output in pydoc instead of pager (GH-15105) (GH-120262)

If the Helper() class was initialized with an output, the topics, keywords
and symbols help still use the pager instead of the output.
Change the behavior so  the output is used if available while keeping the
previous behavior if no output was configured.
(cherry picked from commit 2080425154d235b4b7dcc9a8a2f58e71769125ca)

Co-authored-by: Enrico Tröger <enrico.troeger@uvena.de>
17 months ago[3.12] gh-120242: Fix handling of `[setUp,tearDown]Class` in `test_datetime` (GH...
Miss Islington (bot) [Sat, 8 Jun 2024 08:09:55 +0000 (10:09 +0200)] 
[3.12] gh-120242: Fix handling of `[setUp,tearDown]Class` in `test_datetime` (GH-120243) (#120260)

gh-120242: Fix handling of `[setUp,tearDown]Class` in `test_datetime` (GH-120243)
(cherry picked from commit 95f4db88d5ab7d900f05d0418b2a2e77bf9ff126)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
17 months ago[3.12] gh-120200: Fix `inspect.iscoroutinefunction(inspect) is True` corner case...
Nikita Sobolev [Fri, 7 Jun 2024 16:41:45 +0000 (19:41 +0300)] 
[3.12] gh-120200: Fix `inspect.iscoroutinefunction(inspect) is True` corner case (GH-120214) (#120239)

* [3.12] gh-120200: Fix `inspect.iscoroutinefunction(inspect) is True` corner case (GH-120214)
(cherry picked from commit 10fb1b8f36ab2fc3d2fe7392d5735dd19c5e2365)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
17 months ago[3.12] gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (GH-120228...
Miss Islington (bot) [Fri, 7 Jun 2024 16:26:03 +0000 (18:26 +0200)] 
[3.12] gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (GH-120228) (#120240)

gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (GH-120228)

Don't hardcode 'dest' in HAVE_SUBOFFSETS_IN_LAST_DIM() macro of
memoryobject.c, but use its 'view' parameter instead.

Fix the Coverity issue:

Error: COPY_PASTE_ERROR (CWE-398):
Python-3.12.2/Objects/memoryobject.c:273:14: original: ""dest->suboffsets + (dest->ndim - 1)"" looks like the original copy.
Python-3.12.2/Objects/memoryobject.c:274:14: copy_paste_error: ""dest"" in ""src->suboffsets + (dest->ndim - 1)"" looks like a copy-paste error.
Python-3.12.2/Objects/memoryobject.c:274:14: remediation: Should it say ""src"" instead?
GH-  272|       assert(dest->ndim > 0 && src->ndim > 0);
GH-  273|       return (!HAVE_SUBOFFSETS_IN_LAST_DIM(dest) &&
GH-  274|->             !HAVE_SUBOFFSETS_IN_LAST_DIM(src) &&
GH-  275|               dest->strides[dest->ndim-1] == dest->itemsize &&
GH-  276|               src->strides[src->ndim-1] == src->itemsize);
(cherry picked from commit 90b75405260467814c93738a3325645918d4ea51)

Co-authored-by: Victor Stinner <vstinner@python.org>
17 months ago[3.12] gh-120155: Fix optimize_and_assemble_code_unit() error handling (#120231)
Victor Stinner [Fri, 7 Jun 2024 15:17:06 +0000 (17:17 +0200)] 
[3.12] gh-120155: Fix optimize_and_assemble_code_unit() error handling (#120231)

gh-120155: Fix optimize_and_assemble_code_unit() error handling

Don't use 'g' before it's being initialized: don't use the 'error'
label if consts_dict_keys_inorder() failed.

Fix the Coverity issue:

Error: UNINIT (CWE-457):
Python-3.12.2/Python/compile.c:7670:5: skipped_decl: Jumping over declaration of ""g"".
Python-3.12.2/Python/compile.c:7714:5: uninit_use_in_call: Using uninitialized value ""g.g_block_list"" when calling ""_PyCfgBuilder_Fini"".
Python-3.12.2/Python/compile.c:7714:5: uninit_use_in_call: Using uninitialized value ""g.g_entryblock"" when calling ""_PyCfgBuilder_Fini"".
  7712|       Py_XDECREF(consts);
  7713|       instr_sequence_fini(&optimized_instrs);
  7714|->     _PyCfgBuilder_Fini(&g);
  7715|       return co;
  7716|   }

17 months ago[3.12] gh-110383: Improve 'old string formatting' text in tutorial (GH-120219) (...
Miss Islington (bot) [Fri, 7 Jun 2024 13:43:59 +0000 (15:43 +0200)] 
[3.12] gh-110383: Improve 'old string formatting' text in tutorial (GH-120219) (#120230)

(cherry picked from commit 225aab7f70d804174cc3a75bc04a5bb1545e5adb)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
17 months ago[3.12] gh-120211: Fix tkinter.ttk with Tcl/Tk 9.0 (GH-120213) (GH-120216)
Miss Islington (bot) [Fri, 7 Jun 2024 11:30:50 +0000 (13:30 +0200)] 
[3.12] gh-120211: Fix tkinter.ttk with Tcl/Tk 9.0 (GH-120213) (GH-120216)

* Use new methods for tracing Tcl variable.
* Fix Combobox.current() for empty combobox.
(cherry picked from commit d68a22e7a68ae09f7db61d5a1a3bd9c0360cf3ee)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.12] gh-112672: Fix builtin Tkinter with Tcl 9.0 (GH-112681) (GH-120209)
Miss Islington (bot) [Fri, 7 Jun 2024 10:18:42 +0000 (12:18 +0200)] 
[3.12] gh-112672: Fix builtin Tkinter with Tcl 9.0 (GH-112681) (GH-120209)

* Add declaration of Tcl_AppInit(), missing in Tcl 9.0.
* Use Tcl_Size instead of int where needed.

(cherry picked from commit e0799352823289fafb8131341abd751923ee9c08)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.12] gh-110383: Clarify "non-integral" wording in pow() docs (GH-119688) (#120207)
Miss Islington (bot) [Fri, 7 Jun 2024 09:53:55 +0000 (11:53 +0200)] 
[3.12] gh-110383: Clarify "non-integral" wording in pow() docs (GH-119688) (#120207)

(cherry picked from commit 6646a9da26d12fc54263b22dd2916a2f710f1db7)

Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
17 months ago[3.12] gh-120154: Fix Emscripten/WASI pattern in case statement for LDSHARED… (#120204)
Victor Stinner [Fri, 7 Jun 2024 09:49:54 +0000 (11:49 +0200)] 
[3.12] gh-120154: Fix Emscripten/WASI pattern in case statement for LDSHARED… (#120204)

gh-120154: Fix Emscripten/WASI pattern in case statement for LDSHARED (#120173)

Fix Emscripten/WASI pattern in case statement for LDSHARED

(cherry picked from commit 47816f465e833a5257a82b759b1081e06381e528)

Co-authored-by: Michael Allwright <contact@allwright.io>
17 months ago[3.12] gh-120164: Fix test_os.test_win32_mkdir_700() (GH-120177) (#120203)
Miss Islington (bot) [Fri, 7 Jun 2024 09:35:08 +0000 (11:35 +0200)] 
[3.12] gh-120164: Fix test_os.test_win32_mkdir_700() (GH-120177) (#120203)

gh-120164: Fix test_os.test_win32_mkdir_700() (GH-120177)

Don't compare the path to avoid encoding issues.

(cherry picked from commit d5ba4fc9bc9b2d9eff2a90893e8d500e0c367237)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
17 months ago[3.12] Add Plausible for docs metrics (GH-119977) (#120194)
Miss Islington (bot) [Fri, 7 Jun 2024 07:42:37 +0000 (09:42 +0200)] 
[3.12] Add Plausible for docs metrics (GH-119977) (#120194)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Julien Palard <julien@palard.fr>
17 months ago[3.12] GH-119054: Add "Reading directories" section to pathlib docs (GH-119956) ...
Barney Gale [Fri, 7 Jun 2024 00:24:44 +0000 (01:24 +0100)] 
[3.12] GH-119054: Add "Reading directories" section to pathlib docs (GH-119956) (#120184)

Add a dedicated subsection for `Path.iterdir()`-related methods,
specifically `iterdir()`, `glob()`, `rglob()` and `walk()`.

(cherry picked from commit 14e1506a6d7056c38fbbc0797268dcf783f91243)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
17 months agoPost 3.12.4
Thomas Wouters [Thu, 6 Jun 2024 22:25:42 +0000 (00:25 +0200)] 
Post 3.12.4

17 months agoPython 3.12.4 v3.12.4
Thomas Wouters [Thu, 6 Jun 2024 18:20:06 +0000 (20:20 +0200)] 
Python 3.12.4

17 months ago[3.12] Restore decimal context after decimal doctests (GH-120149) (GH-120168)
Miss Islington (bot) [Thu, 6 Jun 2024 17:31:36 +0000 (19:31 +0200)] 
[3.12] Restore decimal context after decimal doctests (GH-120149) (GH-120168)

The modified context caused tests failures in several other tests.
(cherry picked from commit 2d7ff6e0e7d4c08ba84079a5c19a4a485626e1de)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.12] gh-120111: Don't use cirrus M1 macOS runners on fork (GH-120116) (GH-120153)
Łukasz Langa [Thu, 6 Jun 2024 12:30:20 +0000 (08:30 -0400)] 
[3.12] gh-120111: Don't use cirrus M1 macOS runners on fork (GH-120116) (GH-120153)

(cherry picked from commit fd104dfcb838d735ef8128e3539d7a730d403422)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
17 months ago[3.12] typing docs: fix indentation of TypedDict deprecation notice (#120124)
Alex Waygood [Wed, 5 Jun 2024 17:37:24 +0000 (18:37 +0100)] 
[3.12] typing docs: fix indentation of TypedDict deprecation notice (#120124)

17 months ago[3.12] gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contex...
Miss Islington (bot) [Wed, 5 Jun 2024 12:02:52 +0000 (14:02 +0200)] 
[3.12] gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657) (#120106)

gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657)
(cherry picked from commit 5c02ea8bae2287a828840f5734966da23dc573dc)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
17 months ago[3.12] gh-119819: Update logging configuration to support joinable multiproc… (GH...
Miss Islington (bot) [Wed, 5 Jun 2024 06:59:15 +0000 (08:59 +0200)] 
[3.12] gh-119819: Update logging configuration to support joinable multiproc… (GH-120090) (GH-120092)

(cherry picked from commit 983efcf15b2503fe0c05d5e03762385967962b33)

17 months ago[3.12] gh-120078: Fix struct_time attr typo tm_day -> tm_mday in Doc/library/time...
Miss Islington (bot) [Wed, 5 Jun 2024 00:29:28 +0000 (02:29 +0200)] 
[3.12] gh-120078: Fix struct_time attr typo tm_day -> tm_mday in Doc/library/time.rst (GH-120084)

(cherry picked from commit b6b0dcbfc054f581b6f78602e4c2e9474e3efe21)

Co-authored-by: shurj0 <60540027+shurj0@users.noreply.github.com>
17 months ago[3.12] gh-119311: Fix name mangling with PEP 695 generic classes (#119464) (#119644)
Jelle Zijlstra [Tue, 4 Jun 2024 19:55:45 +0000 (12:55 -0700)] 
[3.12] gh-119311: Fix name mangling with PEP 695 generic classes (#119464) (#119644)

* [3.12] gh-119311: Fix name mangling with PEP 695 generic classes (#119464)

Fixes #119311. Fixes #119395.

(cherry picked from commit a9a74da4a0ca0645f049e67b6434a95e30592c32)

17 months ago[3.12] gh-119819: Update test to skip if _multiprocessing is unavailable. (GH-120067...
Miss Islington (bot) [Tue, 4 Jun 2024 19:43:52 +0000 (21:43 +0200)] 
[3.12] gh-119819: Update test to skip if _multiprocessing is unavailable. (GH-120067) (GH-120071)

(cherry picked from commit 109e1082ea92f89d42cd70f2cc7ca6fba6be9bab)

17 months ago[3.12] gh-120048: Make `test_imaplib` faster (GH-120050) (#120070)
Miss Islington (bot) [Tue, 4 Jun 2024 19:25:17 +0000 (21:25 +0200)] 
[3.12] gh-120048: Make `test_imaplib` faster (GH-120050) (#120070)

The `test_imaplib` was taking 40+ minutes in the refleak build bots because
the tests waiting on a client `self._setup()` was creating a client that
prevented progress until its connection timed out, which scaled with the
global timeout.

We should set `connect=False` for the tests that don't want `_setup()` to
create a client.

(cherry picked from commit 710cbea6604d27c7d59ae4953bf522b997a82cc7)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.12] gh-120039: Reduce expected timeout in test_siginterrupt_off (GH-120047) (...
Miss Islington (bot) [Tue, 4 Jun 2024 18:10:41 +0000 (20:10 +0200)] 
[3.12] gh-120039: Reduce expected timeout in test_siginterrupt_off (GH-120047) (#120061)

The process is expected to time out. In the refleak builds,
`support.SHORT_TIMEOUT` is often five minutes and we run the tests six
times, so test_signal was taking >30 minutes.
(cherry picked from commit d419d468ff4aaf6bc673354d0ee41b273d09dd3f)

Co-authored-by: Sam Gross <colesbury@gmail.com>
17 months ago[3.12] gh-89928: Fix integer conversion of device numbers (GH-31794) (GH-120054)
Serhiy Storchaka [Tue, 4 Jun 2024 17:12:13 +0000 (20:12 +0300)] 
[3.12] gh-89928: Fix integer conversion of device numbers (GH-31794) (GH-120054)

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
(cherry picked from commit 7111d9605f9db7aa0b095bb8ece7ccc0b8115c3f)

17 months ago[3.12] gh-119819: Fix regression to allow logging configuration with multipr… (GH...
Miss Islington (bot) [Tue, 4 Jun 2024 12:41:02 +0000 (14:41 +0200)] 
[3.12] gh-119819: Fix regression to allow logging configuration with multipr… (GH-120030) (GH-120034)

(cherry picked from commit 99d945c0c006e3246ac00338e37c443c6e08fc5c)

17 months ago[3.12] gh-118868: logging QueueHandler fix passing of kwargs (GH-118869) (GH-120031)
Miss Islington (bot) [Tue, 4 Jun 2024 12:17:46 +0000 (14:17 +0200)] 
[3.12] gh-118868: logging QueueHandler fix passing of kwargs (GH-118869) (GH-120031)

(cherry picked from commit dce14bb2dce7887df40ae5c13b0d13e0dafceff7)

17 months ago[3.12] gh-119070: Update test_shebang_executable_extension to always use non-installe...
Miss Islington (bot) [Tue, 4 Jun 2024 11:27:58 +0000 (13:27 +0200)] 
[3.12] gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846) (GH-120016)

gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846)
(cherry picked from commit 5c48eb0cc6c3e84aafda0a734a05ecec14fc0ccf)

17 months ago[3.12] gh-111499: Fix PYTHONMALLOCSTATS at Python exit (#120021) (#120023)
Victor Stinner [Tue, 4 Jun 2024 09:58:49 +0000 (11:58 +0200)] 
[3.12] gh-111499: Fix PYTHONMALLOCSTATS at Python exit (#120021) (#120023)

gh-111499: Fix PYTHONMALLOCSTATS at Python exit (#120021)

Call _PyObject_DebugMallocStats() earlier in Py_FinalizeEx(), before
the interpreter is deleted.

(cherry picked from commit 5a1205b641df133932ed4c65b9a4ff5724e89963)

17 months ago[3.12] gh-119821: Fix refleak in LOAD_FROM_DICT_OR_GLOBALS (#119975)
Jelle Zijlstra [Mon, 3 Jun 2024 19:26:25 +0000 (12:26 -0700)] 
[3.12] gh-119821: Fix refleak in LOAD_FROM_DICT_OR_GLOBALS (#119975)

17 months ago[3.12] Use Cirrus M1 macOS runners for CI (GH-119979) (GH-119987)
Łukasz Langa [Mon, 3 Jun 2024 16:15:54 +0000 (12:15 -0400)] 
[3.12] Use Cirrus M1 macOS runners for CI (GH-119979) (GH-119987)

(cherry picked from commit 6acb32fac3511c1d5500cac66f1d6397dcdab835)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Ee Durbin <ee@python.org>
17 months ago[3.12] GH-119054: Add "Reading and writing files" section to pathlib docs (GH-119524...
Barney Gale [Sun, 2 Jun 2024 20:14:29 +0000 (21:14 +0100)] 
[3.12] GH-119054: Add "Reading and writing files" section to pathlib docs (GH-119524) (#119955)

Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.

(cherry picked from commit bd6d4ed6454378e48dab06f50a9be0bae6baa3a2)

17 months ago[3.12] GH-119054: Add "Querying file type and status" section to pathlib docs (GH...
Barney Gale [Sun, 2 Jun 2024 19:38:00 +0000 (20:38 +0100)] 
[3.12] GH-119054: Add "Querying file type and status" section to pathlib docs (GH-119055) (#119952)

Add a dedicated subsection for `Path.stat()`-related methods, specifically
`stat()`, `lstat()`, `exists()`, `is_*()`, and `samefile()`.

(cherry picked from commit 81d63362302187e5cb838c9a7cd857181142e530)

17 months ago[3.12] Improve documentation for typing.get_type_hints (GH-119928) (#119944)
Miss Islington (bot) [Sun, 2 Jun 2024 15:21:47 +0000 (17:21 +0200)] 
[3.12] Improve documentation for typing.get_type_hints (GH-119928) (#119944)

- Explicit list of what it does that is different from
  "just return __annotations__"
- Remove reference to PEP 563; adding the future import doesn't
  do anything to type aliases, and in general it will never make
  get_type_hints() less likely to fail.
- Remove example, as the Annotated docs already have a similar
  example, and it's unbalanced to have one example about this
  one edge case but not about other behaviors of the function.

(cherry picked from commit aa9fe98e0649f0a151942914ef4e2810ca6126c2)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
17 months ago[3.12] gh-119016: Remove outdated sentences from the "classes" tutorial (GH-119130...
Miss Islington (bot) [Sat, 1 Jun 2024 21:26:07 +0000 (23:26 +0200)] 
[3.12] gh-119016: Remove outdated sentences from the "classes" tutorial (GH-119130) (#119926)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
17 months ago[3.12] gh-116145: Update macOS installer to Tcl/Tk 8.6.14 (GH-116151) (GH-119922)
Miss Islington (bot) [Sat, 1 Jun 2024 20:23:05 +0000 (22:23 +0200)] 
[3.12] gh-116145: Update macOS installer to Tcl/Tk 8.6.14 (GH-116151) (GH-119922)

(cherry picked from commit 4fa95c6ec392b9fc80ad720cc4a8bd2786fc2835)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
17 months ago[3.12] GH-89727: Fix `shutil.rmtree()` recursion error on deep trees (GH-119808)...
Barney Gale [Sat, 1 Jun 2024 19:39:35 +0000 (20:39 +0100)] 
[3.12] GH-89727: Fix `shutil.rmtree()` recursion error on deep trees (GH-119808) (#119919)

Implement `shutil._rmtree_safe_fd()` using a list as a stack to avoid emitting recursion errors on deeply nested trees.

`shutil._rmtree_unsafe()` was fixed in a150679f90.

(cherry picked from commit 53b1981fb0cda6c656069e992f172fc6aad7c99c)

17 months ago[3.12] Add unique() recipe to itertools docs (gh-119911) (gh-119917)
Miss Islington (bot) [Sat, 1 Jun 2024 17:06:18 +0000 (19:06 +0200)] 
[3.12] Add unique() recipe to itertools docs (gh-119911) (gh-119917)

17 months ago[3.12] gh-113892: Add a extra check to `ProactorEventLoop.sock_connect` to ensure...
Miss Islington (bot) [Sat, 1 Jun 2024 16:29:34 +0000 (18:29 +0200)] 
[3.12] gh-113892: Add a extra check to `ProactorEventLoop.sock_connect` to ensure that the given socket is in non-blocking mode (GH-119519) (#119913)

(cherry picked from commit cf3bba3f0671d2c9fee099e3ab0f78b98b176131)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
17 months ago[3.12] Revert "[3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) (#1… (#119905)
Victor Stinner [Sat, 1 Jun 2024 15:08:07 +0000 (17:08 +0200)] 
[3.12] Revert "[3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) (#1… (#119905)

Revert "[3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) (#119505)"

This reverts commit 078da88ad19e8f7474b6943edd39b7e61511bd20.

The change modified how negative values, like termios.TIOCSWINSZ, was
treated and is actually backward incompatible.

17 months ago[3.12] gh-119821: Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS (#119822...
Jelle Zijlstra [Sat, 1 Jun 2024 04:56:38 +0000 (21:56 -0700)] 
[3.12] gh-119821: Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS (#119822) (#119890)

The implementation basically copies LOAD_GLOBAL. Possibly it could be deduplicated,
but that seems like it may get hairy since the two operations have different operands.

This is important to fix in 3.14 for PEP 649, but it's a bug in earlier versions too,
and we should backport to 3.13 and 3.12 if possible.

(cherry picked from commit 80a4e3899420faaa012c82b4e82cdb6675a6a944)

17 months ago[3.12] contextlib docs: Clean up redundant 'up' after 'cleanup' (GH-119873)
Miss Islington (bot) [Fri, 31 May 2024 17:27:57 +0000 (19:27 +0200)] 
[3.12] contextlib docs: Clean up redundant 'up' after 'cleanup' (GH-119873)

Reported by Michael Kass on docs@
(cherry picked from commit f3fc800d5f17b144a752a262102b750bedcdaa14)

17 months ago[3.12] gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions...
Miss Islington (bot) [Fri, 31 May 2024 17:24:11 +0000 (19:24 +0200)] 
[3.12] gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364) (#119870)

gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364)
(cherry picked from commit 015b1fdd0ae03f94a5dfda051b020810d1c952dd)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
17 months ago[3.12] gh-119585: Fix crash involving `PyGILState_Release()` and `PyThreadState_Clear...
Sam Gross [Fri, 31 May 2024 15:42:09 +0000 (11:42 -0400)] 
[3.12] gh-119585: Fix crash involving `PyGILState_Release()` and `PyThreadState_Clear()` (GH-119753) (#119861)

Make sure that `gilstate_counter` is not zero in when calling
`PyThreadState_Clear()`. A destructor called from `PyThreadState_Clear()` may
call back into `PyGILState_Ensure()` and `PyGILState_Release()`. If
`gilstate_counter` is zero, it will try to create a new thread state before
the current active thread state is destroyed, leading to an assertion failure
or crash.
(cherry picked from commit bcc1be39cb1d04ad9fc0bd1b9193d3972835a57c)

17 months ago[3.12] gh-103194: Fix Tkinter’s Tcl value type handling for Tcl 8.7/9.0 (GH-103846...
Serhiy Storchaka [Fri, 31 May 2024 09:15:53 +0000 (12:15 +0300)] 
[3.12] gh-103194: Fix Tkinter’s Tcl value type handling for Tcl 8.7/9.0 (GH-103846) (GH-119831)

Some of standard Tcl types were renamed, removed, or no longer
registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl
values to Python values to avoid returning a Tcl_Obj where the primary
Python types (int, bool, str, bytes) were returned in older Tcl.
(cherry picked from commit 94e9585e99abc2d060cedc77b3c03e06b4a0a9c4)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
17 months ago[3.12] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (GH-119807)
Miss Islington (bot) [Thu, 30 May 2024 21:23:38 +0000 (23:23 +0200)] 
[3.12] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (GH-119807)

(cherry picked from commit 9732ed5ca94cd8fe9ca2fc7ba5a42dfa2b7791ea)

Co-authored-by: James De Bias <81095953+DBJim@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.12] gh-109218: Improve documentation for the complex() constructor (GH-119687...
Serhiy Storchaka [Thu, 30 May 2024 20:52:44 +0000 (23:52 +0300)] 
[3.12] gh-109218: Improve documentation for the complex() constructor (GH-119687) (ПР-119805)

* Remove the equivalence with real+imag*1j which can be incorrect in corner
  cases (non-finite numbers, the sign of zeroes).
* Separately document the three roles of the constructor: parsing a string,
  converting a number, and constructing a complex from components.
* Document positional-only parameters of complex(), float(), int() and bool()
  as positional-only.
* Add examples for complex() and int().
* Specify the grammar of the string for complex().
* Improve the grammar of the string for float().
* Describe more explicitly the behavior when real and/or imag arguments are
  complex numbers. (This will be deprecated in future.)
(cherry picked from commit ec1ba264607b2b7b98d2602f5536a1d02981efc6)