]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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>
17 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>
17 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>
17 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)

17 months ago[3.12] gh-109218: Refactor tests for the complex() constructor (GH-119635) (GH-119796)
Miss Islington (bot) [Thu, 30 May 2024 18:05:38 +0000 (20:05 +0200)] 
[3.12] gh-109218: Refactor tests for the complex() constructor (GH-119635) (GH-119796)

* Share common classes.
* Use exactly representable floats and exact tests.
* Check the sign of zero components.
* Remove duplicated tests (mostly left after merging int and long).
* Reorder tests in more consistent way.
* Test more error messages.
* Add tests for missed cases.
(cherry picked from commit bf098d4157158e1e4b2ea78aba4ac82d72e24cff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 months ago[3.12] gh-119779: Fix pyporting howto docs (GH-119785) (#119789)
Miss Islington (bot) [Thu, 30 May 2024 15:57:36 +0000 (17:57 +0200)] 
[3.12] gh-119779: Fix pyporting howto docs (GH-119785) (#119789)

gh-119779: Fix pyporting howto docs (GH-119785)
(cherry picked from commit 6fb191be15fd49da10506de29b6393ffdf59b894)

Co-authored-by: Awbert <119314310+SweetyAngel@users.noreply.github.com>
17 months agogh-119690: Adds Unicode support for named pipes in _winapi (GH-119717)
Steve Dower [Thu, 30 May 2024 14:40:23 +0000 (15:40 +0100)] 
gh-119690: Adds Unicode support for named pipes in _winapi (GH-119717)

Also backports a minor improvement to test_audit.

17 months ago[3.12] gh-118055: Update the finder glossary entry (GH-118278) (GH-119774)
Miss Islington (bot) [Thu, 30 May 2024 08:57:36 +0000 (10:57 +0200)] 
[3.12] gh-118055: Update the finder glossary entry (GH-118278) (GH-119774)

gh-118055: Update the finder glossary entry (GH-118278)
(cherry picked from commit db009348b4b7a4b0aec39472ea074c1b5feeba9b)

Co-authored-by: Lincoln <71312724+Lincoln-developer@users.noreply.github.com>
17 months ago[3.12] subprocess docs: Fix semantically important typo (GH-119752) (#119758)
Miss Islington (bot) [Thu, 30 May 2024 07:50:23 +0000 (09:50 +0200)] 
[3.12] subprocess docs: Fix semantically important typo (GH-119752) (#119758)

subprocess docs: Fix semantically important typo (GH-119752)

GH-25416 accidentally replaced a reference to the *stderr* argument of
`subprocess.run` with a reference to the *stdin* argument.  *stdin* is
not affected by the `check_output` option.
(cherry picked from commit 2cc3502f98bb9aea386ab55443fc077ddcdde91d)

Co-authored-by: Zachary Ware <zach@python.org>
17 months ago[3.12] GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (GH-119766)...
Miss Islington (bot) [Thu, 30 May 2024 04:30:37 +0000 (06:30 +0200)] 
[3.12] GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (GH-119766) (#119768)

GH-89727: Fix FD leak on `os.fwalk()` generator finalization. (GH-119766)

Follow-up to 3c890b50. Ensure we `os.close()` open file descriptors when
the `os.fwalk()` generator is finalized.
(cherry picked from commit a5fef800d31648d19cecc240a2fa0dc71371753e)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
17 months ago[3.12] GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) (#119765)
Miss Islington (bot) [Thu, 30 May 2024 03:32:14 +0000 (05:32 +0200)] 
[3.12] GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) (#119765)

GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638)

Implement `os.fwalk()` using a list as a stack to avoid emitting recursion
errors on deeply nested trees.
(cherry picked from commit 3c890b503c740767d0eb9a0e74b47f17a1e69452)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
17 months ago[3.12] gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and...
Miss Islington (bot) [Thu, 30 May 2024 03:24:50 +0000 (05:24 +0200)] 
[3.12] gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and Tests (GH-119480) (#119761)

gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and Tests (GH-119480)
(cherry picked from commit bf4ff3ad2e362801e87c85fffd9e140b774cef26)

Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
Co-authored-by: Carl Meyer <carl@oddbird.net>
17 months ago[3.12] GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (GH...
Barney Gale [Wed, 29 May 2024 20:53:08 +0000 (21:53 +0100)] 
[3.12] GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (GH-119634) (#119749)

* GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (#119634)

Make `shutil._rmtree_unsafe()` call `os.walk()`, which is implemented
without recursion.

`shutil._rmtree_safe_fd()` is not affected and can still raise a recursion
error.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a150679f90c6e3f017bd75cac3b8f727063cc4aa)

17 months agogh-119070: Avoid test crash due to Unicode in stderr output (GH-119747)
Steve Dower [Wed, 29 May 2024 20:51:30 +0000 (21:51 +0100)] 
gh-119070: Avoid test crash due to Unicode in stderr output (GH-119747)

17 months agogh-119070: Fix py.exe handling of /usr/bin/env commands missing extension (GH-119426)
Steve Dower [Wed, 29 May 2024 19:12:55 +0000 (20:12 +0100)] 
gh-119070: Fix py.exe handling of /usr/bin/env commands missing extension (GH-119426)

17 months ago[3.12] gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` (GH-119705...
Miss Islington (bot) [Wed, 29 May 2024 07:18:04 +0000 (09:18 +0200)] 
[3.12] gh-119704: Fix reference leak in the ``Python/Python-tokenize.c`` (GH-119705) (#119708)

17 months ago[3.12] gh-119538: Add missing expat build dependencies (GH-119647) (#119686)
Miss Islington (bot) [Tue, 28 May 2024 22:10:49 +0000 (00:10 +0200)] 
[3.12] gh-119538: Add missing expat build dependencies (GH-119647) (#119686)

xmltok_impl.c and xmltok_ns.c are _included_ in xmltok.c by the C
pre-processor.

(cherry picked from commit 606be663622c6784aed4ffa55b877adbd6fe8e54)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
17 months ago[3.12] gh-119118: Fix performance regression in tokenize module (GH-119615) (#119683)
Miss Islington (bot) [Tue, 28 May 2024 20:49:02 +0000 (22:49 +0200)] 
[3.12] gh-119118: Fix performance regression in tokenize module (GH-119615) (#119683)

- Cache line object to avoid creating a Unicode object
  for all of the tokens in the same line.
- Speed up byte offset to column offset conversion by using the
  smallest buffer possible to measure the difference.

(cherry picked from commit d87b0151062e36e67f9e42e1595fba5bf23a485c)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
17 months ago[3.12] gh-119011: `type.__type_params__` now return an empty tuple (GH-119296) (...
Jelle Zijlstra [Tue, 28 May 2024 19:54:47 +0000 (12:54 -0700)] 
[3.12] gh-119011: `type.__type_params__` now return an empty tuple (GH-119296) (#119681)

(cherry picked from commit 6b240c2308a044e38623900ccb8fa58c3549d4ae)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
17 months ago[3.12] gh-119581: Add a test of InitVar with name shadowing (GH-119582) (#119673)
Miss Islington (bot) [Tue, 28 May 2024 17:42:01 +0000 (19:42 +0200)] 
[3.12] gh-119581: Add a test of InitVar with name shadowing (GH-119582) (#119673)

gh-119581: Add a test of InitVar with name shadowing (GH-119582)
(cherry picked from commit 6ec371223dff4da7719039e271f35a16a5b861c6)

Co-authored-by: Steven Troxler <steven.troxler@gmail.com>
17 months ago[3.12] Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409...
Miss Islington (bot) [Tue, 28 May 2024 14:55:43 +0000 (16:55 +0200)] 
[3.12] Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409) (GH-119482)

Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409)
(cherry picked from commit ffa24aab107b5bc3c6ad31a6a245c226bf24b208)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
17 months ago[3.12] [doc] Clarify the nature of the root logger in the `logging` documentation...
Miss Islington (bot) [Tue, 28 May 2024 14:04:19 +0000 (16:04 +0200)] 
[3.12] [doc] Clarify the nature of the root logger in the `logging` documentation (GH-119440) (GH-119652)

(cherry picked from commit b407ad38fb93585332c370b8fa56905fb238cdfd)

17 months ago[3.12] Re-order imports to align with zipp 3.18.2 (GH-119587) (#119590)
Miss Islington (bot) [Tue, 28 May 2024 12:49:38 +0000 (14:49 +0200)] 
[3.12] Re-order imports to align with zipp 3.18.2 (GH-119587) (#119590)

Re-order imports to align with zipp 3.18.2 (GH-119587)
(cherry picked from commit 5482a939ac18f4cd861d212c759960af8fa2b19d)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
17 months agogh-118263: Add additional arguments to path_t (Argument Clinic type) in posixmodule...
Nice Zombies [Tue, 28 May 2024 10:13:01 +0000 (12:13 +0200)] 
gh-118263: Add additional arguments to path_t (Argument Clinic type) in posixmodule (GH-119608)

17 months ago[3.12] gh-116860: Remove outdated `test_parserhack` from `test_future` (GH-116861...
Miss Islington (bot) [Tue, 28 May 2024 09:50:26 +0000 (11:50 +0200)] 
[3.12] gh-116860: Remove outdated `test_parserhack` from `test_future` (GH-116861) (#119648)

gh-116860: Remove outdated `test_parserhack` from `test_future` (GH-116861)
(cherry picked from commit 669175bf8edc2c02d48401bac0e4c7d99a33f15b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
17 months ago[3.12] Misc cleanups and wording improvements for the itertools docs (gh-119631)
Raymond Hettinger [Mon, 27 May 2024 18:43:08 +0000 (13:43 -0500)] 
[3.12] Misc cleanups and wording improvements for the itertools docs (gh-119631)

17 months ago[3.12] gh-119580: Improve version added section for convenience variable (GH-119583...
Miss Islington (bot) [Mon, 27 May 2024 18:04:01 +0000 (20:04 +0200)] 
[3.12] gh-119580: Improve version added section for convenience variable (GH-119583) (#119625)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
17 months ago[3.12] Docs: Only install sphinx-autobuild for `make htmllive` (GH-119607) (#119622)
Miss Islington (bot) [Mon, 27 May 2024 17:35:57 +0000 (19:35 +0200)] 
[3.12] Docs: Only install sphinx-autobuild for `make htmllive` (GH-119607) (#119622)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
17 months ago[3.12] gh-119467: Fix Py_buffer.format type and correct documentation typo (GH-119475...
Miss Islington (bot) [Mon, 27 May 2024 12:22:23 +0000 (14:22 +0200)] 
[3.12] gh-119467: Fix Py_buffer.format type and correct documentation typo (GH-119475) (#119603)

gh-119467: Fix Py_buffer.format type and correct documentation typo (GH-119475)
(cherry picked from commit 3b26cd8ca0e6c65e4b61effea9aa44d06e926797)

Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com>
17 months ago[3.12] Fix typos in HISTORY documentation (GH-119453) (#119598)
Miss Islington (bot) [Mon, 27 May 2024 08:04:05 +0000 (10:04 +0200)] 
[3.12] Fix typos in HISTORY documentation (GH-119453) (#119598)

Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
17 months ago[3.12] docs: fix a few typos identified by codespell (GH-119516) (#119571)
Hugo van Kemenade [Sun, 26 May 2024 08:15:57 +0000 (11:15 +0300)] 
[3.12] docs: fix a few typos identified by codespell (GH-119516) (#119571)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
17 months ago[3.12] FAQ: Add reference to Python version numbering scheme (GH-119225) (#119545)
Miss Islington (bot) [Sat, 25 May 2024 14:19:35 +0000 (16:19 +0200)] 
[3.12] FAQ: Add reference to Python version numbering scheme (GH-119225) (#119545)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>