]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
23 months ago[3.12] gh-112618: Make Annotated cache typed (#112619) (#112628)
Alex Waygood [Sun, 3 Dec 2023 00:41:03 +0000 (00:41 +0000)] 
[3.12] gh-112618: Make Annotated cache typed (#112619) (#112628)

23 months ago[3.12] gh-112316: Improve docs of `inspect.signature` and `Signature.from_callable...
Alex Waygood [Sat, 2 Dec 2023 22:38:11 +0000 (22:38 +0000)] 
[3.12] gh-112316: Improve docs of `inspect.signature` and `Signature.from_callable` (#112317) (#112629)

gh-112316: Improve docs of `inspect.signature` and `Signature.from_callable` (#112317)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
23 months ago[3.12] gh-109413: libregrtest: Backport `.py`-file changes from #112558 (#112605)
Alex Waygood [Fri, 1 Dec 2023 18:54:38 +0000 (18:54 +0000)] 
[3.12] gh-109413: libregrtest: Backport `.py`-file changes from #112558 (#112605)

23 months ago[3.12] gh-109413: libregrtest: enable mypy's `--strict-optional` check on most files...
Alex Waygood [Fri, 1 Dec 2023 17:13:22 +0000 (17:13 +0000)] 
[3.12] gh-109413: libregrtest: enable mypy's `--strict-optional` check on most files (#112586) (#112602)

gh-109413: libregrtest: enable mypy's `--strict-optional` check on most files (#112586)

Co-authored-by: Victor Stinner <vstinner@python.org>
23 months ago[3.12] Bump mypy to 1.7.1 (#112581) (#112601)
Alex Waygood [Fri, 1 Dec 2023 17:10:38 +0000 (17:10 +0000)] 
[3.12] Bump mypy to 1.7.1 (#112581) (#112601)

23 months ago[3.12] gh-112367: Only free perf trampoline arenas at shutdown (GH-112368) (#112590)
Pablo Galindo Salgado [Fri, 1 Dec 2023 16:05:31 +0000 (16:05 +0000)] 
[3.12] gh-112367: Only free perf trampoline arenas at shutdown (GH-112368) (#112590)

(cherry picked from commit a73aa48e6bec900be7edd3431deaa5fc1d809e6f)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
23 months ago[3.12] gh-109413: regrtest: add WorkerRunTests class (GH-112588) (#112593)
Miss Islington (bot) [Fri, 1 Dec 2023 14:46:42 +0000 (15:46 +0100)] 
[3.12] gh-109413: regrtest: add WorkerRunTests class (GH-112588) (#112593)

gh-109413: regrtest: add WorkerRunTests class (GH-112588)
(cherry picked from commit f8ff80f63536e96b004d29112452a8f1738fde37)

Co-authored-by: Victor Stinner <vstinner@python.org>
23 months ago[3.12] gh-111058: Change coro.cr_frame/gen.gi_frame to be None for a closed coroutine...
Miss Islington (bot) [Fri, 1 Dec 2023 14:13:15 +0000 (15:13 +0100)] 
[3.12] gh-111058: Change coro.cr_frame/gen.gi_frame to be None for a closed coroutine/generator. (GH-112428) (#112589)

23 months ago[3.12] gh-82565: Add tests for pickle and unpickle with bad files (GH-16606) (GH...
Miss Islington (bot) [Fri, 1 Dec 2023 14:12:46 +0000 (15:12 +0100)] 
[3.12] gh-82565: Add tests for pickle and unpickle with bad files (GH-16606) (GH-112591)

(cherry picked from commit 058444308abee79bb1b3358883adfa8c97bd043a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
23 months ago[3.12] gh-104231: Add more tests for str(), repr(), ascii(), and bytes() (GH-112551...
Serhiy Storchaka [Fri, 1 Dec 2023 08:16:47 +0000 (10:16 +0200)] 
[3.12] gh-104231: Add more tests for str(), repr(), ascii(), and bytes() (GH-112551) (GH-112555)

(cherry picked from commit 2223899adce858a09ebeaaf82111e6cda9b42415)

23 months ago[3.12] gh-66819: More IDLE htest updates (GH-112574) (#112575)
Miss Islington (bot) [Fri, 1 Dec 2023 07:20:28 +0000 (08:20 +0100)] 
[3.12] gh-66819: More IDLE htest updates (GH-112574) (#112575)

Revise htest.py docstring and move 2 specs to alphabetical position.
(cherry picked from commit e44f1940bd6d2ba4a3f8ac4585b3cf4f9cb93e49)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
23 months ago[3.12] gh-112356: LOAD_GLOBAL can only include one PUSH_NULL (#112566)
Dennis Sweeney [Fri, 1 Dec 2023 00:35:49 +0000 (19:35 -0500)] 
[3.12] gh-112356: LOAD_GLOBAL can only include one PUSH_NULL (#112566)

23 months ago[3.12] gh-111699: Move smtpd note to dedicated section in What's New Python 3.12...
Miss Islington (bot) [Thu, 30 Nov 2023 13:00:08 +0000 (14:00 +0100)] 
[3.12] gh-111699: Move smtpd note to dedicated section in What's New Python 3.12 doc (GH-112544) (GH-112552)

Relocate smtpd deprecation notice to it's own section rather than under
'locale' in docs for What's New in Python 3.12 doc
(cherry picked from commit 1ff212debdc094c28928011cff9f4eea8de34d44)

Co-authored-by: Matt Prodani <mp5908@nyu.edu>
23 months ago[3.12] IDLE: fix config_key htest (GH-112545) (#112546)
Miss Islington (bot) [Thu, 30 Nov 2023 08:29:59 +0000 (09:29 +0100)] 
[3.12] IDLE: fix config_key htest (GH-112545) (#112546)

Change 'Dialog' to 'Window' in two places to match the name of the config_key class being tested.
(cherry picked from commit 81261fa67ff82b03c255733b0d1abbbb8a228187)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
23 months ago[3.12] [Enum] update class creation for RuntimeError changes (GH-111815) (GH-112526)
Miss Islington (bot) [Wed, 29 Nov 2023 21:49:52 +0000 (22:49 +0100)] 
[3.12] [Enum] update class creation for RuntimeError changes (GH-111815) (GH-112526)

(cherry picked from commit f9e6ce03953e9ee988d55324dc715b0ef2303cfb)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
23 months ago[3.12] Add more C API tests (GH-112522) (GH-112525)
Miss Islington (bot) [Wed, 29 Nov 2023 20:02:57 +0000 (21:02 +0100)] 
[3.12] Add more C API tests (GH-112522) (GH-112525)

Add tests for PyObject_Str(), PyObject_Repr(), PyObject_ASCII() and
PyObject_Bytes().
(cherry picked from commit e0449b9a7fffc0c0eed806bf4cbb8f1f65397bbb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months ago[3.12] gh-112509: Fix keys being present in both required_keys and optional_keys...
Miss Islington (bot) [Wed, 29 Nov 2023 17:55:06 +0000 (18:55 +0100)] 
[3.12] gh-112509: Fix keys being present in both required_keys and optional_keys in TypedDict (GH-112512) (#112530)

(cherry picked from commit 403886942376210662610627b01fea6acd77d331)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
23 months ago[3.12] gh-110930: Correct book title by Alan D. Moore (GH-112490) (#112523)
Miss Islington (bot) [Wed, 29 Nov 2023 15:55:46 +0000 (16:55 +0100)] 
[3.12] gh-110930: Correct book title by Alan D. Moore (GH-112490) (#112523)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
23 months ago[3.12] gh-112503: Fix test_sys on WASI (gh-112505)
Eric Snow [Wed, 29 Nov 2023 00:36:07 +0000 (17:36 -0700)] 
[3.12] gh-112503: Fix test_sys on WASI (gh-112505)

Skip tests if no interpreters module.gh-110713 added some tests that use the interpreters module but did not accommodated builds that don't support subinterpreters (incl. an interpreters module).  We fix that here by catching ImportError and skipping tests as appropriate.

23 months ago[3.12] gh-105716: Fix Refleaks in test_interpreters (gh-112500)
Eric Snow [Tue, 28 Nov 2023 19:42:49 +0000 (12:42 -0700)] 
[3.12] gh-105716: Fix Refleaks in test_interpreters (gh-112500)

gh-110707 (0122b4d) added some tests that didn't close file descriptors they created, leading to failures on the refleak buildbots.  This closes the leaking file descriptors, resolving the failure.

23 months ago[3.12] gh-112431: Unconditionally call `hash -r` (GH-112432) (GH-112493)
Miss Islington (bot) [Tue, 28 Nov 2023 09:44:03 +0000 (10:44 +0100)] 
[3.12] gh-112431: Unconditionally call `hash -r` (GH-112432) (GH-112493)

gh-112431: Unconditionally call `hash -r` (GH-112432)

The `activate` script calls `hash -r` in two places to make sure the shell picks
up the environment changes the script makes. Before that, it checks to
see if the shell running the script is bash or zsh.

`hash -r` is specified by POSIX and is not exclusive to bash and zsh.
This guard prevents the script from calling `hash -r` in other
`GH-!/bin/sh`-compatible shells like dash.
(cherry picked from commit a194938f33a71e727e53490815bae874eece1460)

Co-authored-by: James Morris <6653392+J-M0@users.noreply.github.com>
23 months ago[3.12] gh-109802: Increase test coverage for complexobject.c (GH-112452) (GH-112489)
Miss Islington (bot) [Tue, 28 Nov 2023 08:33:44 +0000 (09:33 +0100)] 
[3.12] gh-109802: Increase test coverage for complexobject.c (GH-112452) (GH-112489)

(cherry picked from commit f14d741daa1b9e5b9c9fc1edba93d0fa92b5ba8d)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
23 months ago[3.12] gh-112105: Make completer delims work on libedit (gh-112106) (gh-112487)
Miss Islington (bot) [Tue, 28 Nov 2023 06:42:54 +0000 (07:42 +0100)] 
[3.12] gh-112105: Make completer delims work on libedit (gh-112106) (gh-112487)

gh-112105: Make completer delims work on libedit (gh-112106)
(cherry picked from commit 2df26d83486b8f9ac6b7df2a9a4669508aa61983)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
23 months ago[3.12] gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LIMITED_API...
Miss Islington (bot) [Tue, 28 Nov 2023 02:42:27 +0000 (03:42 +0100)] 
[3.12] gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LIMITED_API (gh-111707) (gh-111787)

This should have been done in gh-104148.

(A similar fix has already be done for that slot's value macros, and backported to 3.12.  See gh-110968.)
(cherry picked from commit 836e0a75d565ecb7e2485fee88dbe67e649a1d5f)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
23 months ago[3.12] gh-109894: Fix initialization of static `MemoryError` in subinterpreter (gh...
Miss Islington (bot) [Tue, 28 Nov 2023 02:41:53 +0000 (03:41 +0100)] 
[3.12] gh-109894: Fix initialization of static `MemoryError` in subinterpreter (gh-110911) (gh-111238)

Fixes GH-109894

* set `interp.static_objects.last_resort_memory_error.args` to empty tuple to avoid crash on `PyErr_Display()` call
* allow `_PyExc_InitGlobalObjects()` to be called on subinterpreter init

---------

(cherry picked from commit 47d3e2ed930a9f3d228aed4f62133737dae74cf7)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
23 months ago[3.12] gh-110310: Add a Per-Interpreter XID Registry for Heap Types (gh-110311) ...
Eric Snow [Tue, 28 Nov 2023 02:36:29 +0000 (19:36 -0700)] 
[3.12] gh-110310: Add a Per-Interpreter XID Registry for Heap Types (gh-110311) (gh-110714)

We do the following:

* add a per-interpreter XID registry (PyInterpreterState.xidregistry)
* put heap types there (keep static types in _PyRuntimeState.xidregistry)
* clear the registries during interpreter/runtime finalization
* avoid duplicate entries in the registry (when _PyCrossInterpreterData_RegisterClass() is called more than once for a type)
* use Py_TYPE() instead of PyObject_Type() in _PyCrossInterpreterData_Lookup()

The per-interpreter registry helps preserve isolation between interpreters.  This is important when heap types are registered, which is something we haven't been doing yet but I will likely do soon.

(cherry-picked from commit 80dc39e1dc2abc809f448cba5d2c5b9c1c631e11)

23 months ago[3.12] gh-105716: Support Background Threads in Subinterpreters Consistently (gh...
Eric Snow [Tue, 28 Nov 2023 02:01:05 +0000 (19:01 -0700)] 
[3.12] gh-105716: Support Background Threads in Subinterpreters Consistently (gh-109921) (gh-110707)

The existence of background threads running on a subinterpreter was preventing interpreters from getting properly destroyed, as well as impacting the ability to run the interpreter again. It also affected how we wait for non-daemon threads to finish.

We add PyInterpreterState.threads.main, with some internal C-API functions.

(cherry-picked from commit 1dd9dee45d2591b4e701039d1673282380696849)

23 months ago[3.12] gh-109793: Allow Switching Interpreters During Finalization (gh-109794) (gh...
Eric Snow [Tue, 28 Nov 2023 00:58:02 +0000 (17:58 -0700)] 
[3.12] gh-109793: Allow Switching Interpreters During Finalization (gh-109794) (gh-110705)

Essentially, we should check the thread ID rather than the thread state pointer.

23 months ago[3.12] gh-112414: Add additional unit tests for calling `repr()` on a namespace packa...
Miss Islington (bot) [Tue, 28 Nov 2023 00:39:01 +0000 (01:39 +0100)] 
[3.12] gh-112414: Add additional unit tests for calling `repr()` on a namespace package (GH-112475) (#112480)

gh-112414: Add additional unit tests for calling `repr()` on a namespace package (GH-112475)
(cherry picked from commit cf2054059c08ef1c5546f24874191f341dc94eb9)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
23 months ago[3.12] Docs: fix markup for `importlib.machinery.NamespaceLoader` (GH-112479) (#112481)
Miss Islington (bot) [Tue, 28 Nov 2023 00:21:47 +0000 (01:21 +0100)] 
[3.12] Docs: fix markup for `importlib.machinery.NamespaceLoader` (GH-112479) (#112481)

Docs: fix markup for `importlib.machinery.NamespaceLoader` (GH-112479)
(cherry picked from commit 2e632fa07d13a58be62f59be4e656ad58b378f9b)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
23 months ago[3.12] gh-106931: Intern Statically Allocated Strings Globally (gh-107272) (gh-110713)
Eric Snow [Mon, 27 Nov 2023 23:51:12 +0000 (16:51 -0700)] 
[3.12] gh-106931: Intern Statically Allocated Strings Globally (gh-107272) (gh-110713)

We tried this before with a dict and for all interned strings.  That ran into problems due to interpreter isolation.  However, exclusively using a per-interpreter cache caused some inconsistency that can eliminate the benefit of interning.  Here we circle back to using a global cache, but only for statically allocated strings.  We also use a more-basic _Py_hashtable_t for that global cache instead of a dict.

Ideally we would only have the global cache, but the optional isolation of each interpreter's allocator means that a non-static string object must not outlive its interpreter.  Thus we would have to store a copy of each such interned string in the global cache, tied to the main interpreter.

(cherry-picked from commit b72947a8d26915156323ccfd04d273199ecb870c)

23 months ago[3.12] Correct documentation for AF_PACKET (GH-112339) (#112477)
Miss Islington (bot) [Mon, 27 Nov 2023 23:48:59 +0000 (00:48 +0100)] 
[3.12] Correct documentation for AF_PACKET (GH-112339) (#112477)

Correct documentation for AF_PACKET (GH-112339)

Protocol in the address tuple should *not* be in the network-byte-order, because it is converted internally[1].

[1] https://github.com/python/cpython/blob/89ddea4886942b0c27a778a0ad3f0d5ac5f518f0/Modules/socketmodule.cGH-L2144

network byte order doesn't make sense for a python level int anyways. It's a fixed size C serialization concept.
(cherry picked from commit 562d7149c6944fb9e4c7be80664b2f2d5a12a3ea)

Co-authored-by: Eugene Toder <eltoder@users.noreply.github.com>
23 months ago[3.12] gh-105699: Revert gh-107783 "Re-enable the Multiple-Interpreters Stress Tests...
Eric Snow [Mon, 27 Nov 2023 22:39:04 +0000 (15:39 -0700)] 
[3.12] gh-105699: Revert gh-107783 "Re-enable the Multiple-Interpreters Stress Tests" (gh-112474)

Revert "[3.12] gh-105699: Re-enable the Multiple-Interpreters Stress Tests (gh-107572) (#107783)"

This reverts commit a4aac7d3eafc413ae75f26ca1a1246bdba23c7fb.

The stress tests are still failing on FreeBSD.

23 months ago[3.12] gh-109853: Fix sys.path[0] For Subinterpreters (gh-109994) (gh-110701)
Eric Snow [Mon, 27 Nov 2023 22:21:12 +0000 (15:21 -0700)] 
[3.12] gh-109853: Fix sys.path[0] For Subinterpreters (gh-109994) (gh-110701)

This change makes sure sys.path[0] is set properly for subinterpreters.  Before, it wasn't getting set at all.

This change does not address the broader concerns from gh-109853.

(cherry-picked from commit a040a32ea2f13f16172394d3e3e3f80f47f25a68)

23 months ago[3.12] gh-76785: Use Pending Calls When Releasing Cross-Interpreter Data (gh-109556...
Eric Snow [Mon, 27 Nov 2023 21:49:48 +0000 (14:49 -0700)] 
[3.12] gh-76785: Use Pending Calls When Releasing Cross-Interpreter Data (gh-109556) (gh-112288)

This fixes some crashes in the _xxinterpchannels module, due to a race between interpreters.
(cherry picked from commit fd7e08a6f35581e1189b9bf12feb51f7167a86c5)

23 months ago[3.12] gh-105699: Re-enable the Multiple-Interpreters Stress Tests (gh-107572) (...
Miss Islington (bot) [Mon, 27 Nov 2023 21:48:08 +0000 (22:48 +0100)] 
[3.12] gh-105699: Re-enable the Multiple-Interpreters Stress Tests (gh-107572) (#107783)

We had disabled them due to crashes they exposed, which have since been fixed.
(cherry picked from commit f9e3ff1ea4b2c8b787360409d55f2037652b7456)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: T. Wouters <thomas@python.org>
23 months ago[3.12] gh-68166: Tkinter: Add tests and examples for element_create() (GH-111453...
Miss Islington (bot) [Mon, 27 Nov 2023 20:14:37 +0000 (21:14 +0100)] 
[3.12] gh-68166: Tkinter: Add tests and examples for element_create() (GH-111453) (GH-111857)

* Remove mention of "vsapi" element type from the documentation.
* Add tests for element_create() and other ttk.Style methods.
* Add examples for element_create() in the documentation.
(cherry picked from commit 005d1e8fc81539c60c6b21ebba34de3edd5bb232)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months ago[3.12] gh-112388: Fix an error that was causing the parser to try to overwrite tokeni...
Miss Islington (bot) [Mon, 27 Nov 2023 19:02:57 +0000 (20:02 +0100)] 
[3.12] gh-112388: Fix an error that was causing the parser to try to overwrite tokenizer errors (GH-112410) (#112466)

gh-112388: Fix an error that was causing the parser to try to overwrite tokenizer errors (GH-112410)
(cherry picked from commit 2c8b19174274c183eb652932871f60570123fe99)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
23 months ago[3.12] gh-112387: Fix error positions for decoded strings with backwards tokenize...
Miss Islington (bot) [Mon, 27 Nov 2023 18:57:34 +0000 (19:57 +0100)] 
[3.12] gh-112387: Fix error positions for decoded strings with backwards tokenize errors (GH-112409) (#112468)

gh-112387: Fix error positions for decoded strings with backwards tokenize errors (GH-112409)
(cherry picked from commit 45d648597b1146431bf3d91041e60d7f040e70bf)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
23 months ago[3.12] bpo-41422: Visit the Pickler's and Unpickler's memo in tp_traverse (GH-21664...
Miss Islington (bot) [Mon, 27 Nov 2023 18:42:48 +0000 (19:42 +0100)] 
[3.12] bpo-41422: Visit the Pickler's and Unpickler's memo in tp_traverse (GH-21664) (GH-112464)

(cherry picked from commit 967f2a3052c2d22e31564b428a9aa8cc63dc2a9f)

Co-authored-by: kale-smoothie <34165060+kale-smoothie@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months ago[3.12] gh-112438: Fix support of format units with the "e" prefix in nested tuples...
Miss Islington (bot) [Mon, 27 Nov 2023 17:57:30 +0000 (18:57 +0100)] 
[3.12] gh-112438: Fix support of format units with the "e" prefix in nested tuples in PyArg_Parse (gh-112439) (GH-112460)

(cherry picked from commit 4eea1e82369fbf7a795d1956e7a8212a1b58009f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months ago[3.12] gh-84443: SSLSocket.recv_into() now support buffer protocol with itemsize...
Miss Islington (bot) [Mon, 27 Nov 2023 17:30:53 +0000 (18:30 +0100)] 
[3.12] gh-84443: SSLSocket.recv_into() now support buffer protocol with itemsize != 1 (GH-20310) (GH-112458)

It is also no longer use __len__().

(cherry picked from commit 812360fddda86d7aff5823f529ab720f57ddc411)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months ago[3.12] GH-101100: Fix reference warnings for ``socket`` methods (GH-110114) (#112455)
Miss Islington (bot) [Mon, 27 Nov 2023 15:04:18 +0000 (16:04 +0100)] 
[3.12] GH-101100: Fix reference warnings for ``socket`` methods (GH-110114) (#112455)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months ago[3.12] Move What's New In Python 3.12 entries to the right section (GH-112447) (...
Miss Islington (bot) [Mon, 27 Nov 2023 12:02:16 +0000 (13:02 +0100)] 
[3.12] Move What's New In Python 3.12 entries to the right section (GH-112447) (#112450)

Move What's New In Python 3.12 entries to the right section (GH-112447)

Jython and ctypes removals are unrelated to C API Removals.
(cherry picked from commit d44ee42cd7c9a40e1d7096b95476fe47156f571f)

Co-authored-by: Victor Stinner <vstinner@python.org>
23 months ago[3.12] Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442) (#112444)
Miss Islington (bot) [Mon, 27 Nov 2023 09:34:19 +0000 (10:34 +0100)] 
[3.12] Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442) (#112444)

Docs: fix typo in doc for sqlite3.Cursor.execute (GH-112442)
(cherry picked from commit fb79e1ed4a985a487a02bb8585cc1bd2933dfa7c)

Co-authored-by: Tom Levy <tomlevy93@gmail.com>
23 months ago[3.12] gh-112414: Fix `AttributeError` when calling `repr()` on a namespace package...
Miss Islington (bot) [Mon, 27 Nov 2023 08:53:57 +0000 (09:53 +0100)] 
[3.12] gh-112414: Fix `AttributeError` when calling `repr()` on a namespace package imported with a custom loader (GH-112425) (#112440)

gh-112414: Fix `AttributeError` when calling `repr()` on a namespace package imported with a custom loader (GH-112425)
(cherry picked from commit 0622839cfedacbb48eba27180fd0f0586fe97771)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
23 months ago[3.12] gh-112358: Fix Python 3.12 regression with subclassing struct.Struct (GH-11242...
Mark Dickinson [Mon, 27 Nov 2023 08:25:06 +0000 (08:25 +0000)] 
[3.12] gh-112358: Fix Python 3.12 regression with subclassing struct.Struct (GH-112424) (#112426)

* [3.12] gh-112358: Fix Python 3.12 regression with subclassing struct.Struct. (GH-112424)

Revert commit c8c0afc7137ab9f22bf59d591084948ca967c97c (PR GH-94532),
which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.
This caused issues with code in the wild that subclasses `struct.Struct`..
(cherry picked from commit 9fe60340d7e8dc22b3aec205c557bc69a1b2d18c)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* Remove unrelated test

23 months ago[3.12] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112420)
Hugo van Kemenade [Sun, 26 Nov 2023 12:22:13 +0000 (14:22 +0200)] 
[3.12] gh-101100: Fix Sphinx reference warnings (GH-112416) (#112420)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
23 months ago[3.12] gh-112331: Fix reference manual description of attribute lookup mechanics...
Miss Islington (bot) [Sat, 25 Nov 2023 22:26:31 +0000 (23:26 +0100)] 
[3.12] gh-112331: Fix reference manual description of attribute lookup mechanics (gh-112375) (#112412)

23 months ago[3.12] Descriptor HowTo: Sync the error-messages with the C code. Add tests. (gh...
Miss Islington (bot) [Sat, 25 Nov 2023 22:24:43 +0000 (23:24 +0100)] 
[3.12] Descriptor HowTo:  Sync the error-messages with the C code. Add tests. (gh-112403) (gh-112411)

23 months ago[3.12] gh-101100 : Fix Sphinx warnings in `library/doctest.rst` (GH-112399) (#112402)
Miss Islington (bot) [Sat, 25 Nov 2023 19:26:00 +0000 (20:26 +0100)] 
[3.12] gh-101100 : Fix Sphinx warnings in `library/doctest.rst` (GH-112399) (#112402)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
23 months ago[3.12] gh-94722: fix DocTest.__eq__ for case of no line number on one side (GH-112385...
Miss Islington (bot) [Sat, 25 Nov 2023 17:56:46 +0000 (18:56 +0100)] 
[3.12] gh-94722: fix DocTest.__eq__ for case of no line number on one side (GH-112385) (#112400)

gh-94722: fix DocTest.__eq__ for case of no line number on one side (GH-112385)
(cherry picked from commit fbb9027a037ff1bfaf3f596df033ca45743ee980)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
23 months ago[3.12] gh-101100: Define `_tkinter` module to fix references (GH-112382) (#112392)
Miss Islington (bot) [Sat, 25 Nov 2023 08:00:21 +0000 (09:00 +0100)] 
[3.12] gh-101100: Define `_tkinter` module to fix references (GH-112382) (#112392)

gh-101100: Define `_tkinter` module to fix references (GH-112382)

Define _tkinter module to fix references
(cherry picked from commit 6b961b8ceaba372b78d03feaceb4837bf7236694)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
23 months ago[3.12] gh-101100: Define `test.regrtest` module to fix references (GH-112381) (#112390)
Miss Islington (bot) [Sat, 25 Nov 2023 07:59:09 +0000 (08:59 +0100)] 
[3.12] gh-101100: Define `test.regrtest` module to fix references (GH-112381) (#112390)

gh-101100: Define `test.regrtest` module to fix references (GH-112381)

Define test.regrtest module to fix references
(cherry picked from commit d525d01e2794e7e736527eaa7ee309ca1252f5bd)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
23 months ago[3.12] gh-59254: mention in open() doc that line buffering is for writing (GH-112318...
Miss Islington (bot) [Fri, 24 Nov 2023 18:15:54 +0000 (19:15 +0100)] 
[3.12] gh-59254: mention in open() doc that line buffering is for writing (GH-112318) (#112378)

gh-59254: mention in open() doc that line buffering is for writing (GH-112318)
(cherry picked from commit fafae08cc7caa25f2bd6b29106b50ef76c3e296f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
23 months ago[3.12] Remove bogus annotations from the descriptor howto guide (GH-112349) (#112352)
Miss Islington (bot) [Thu, 23 Nov 2023 23:07:14 +0000 (00:07 +0100)] 
[3.12] Remove bogus annotations from the descriptor howto guide (GH-112349) (#112352)

Remove bogus annotations from the descriptor howto guide (GH-112349)
(cherry picked from commit d9fc15222e96942e30ea8b0561dec5c82ecb4663)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
23 months ago[3.12] GH-109052: Use the base opcode when comparing code objects (GH-112329)
Tian Gao [Thu, 23 Nov 2023 18:18:17 +0000 (10:18 -0800)] 
[3.12] GH-109052: Use the base opcode when comparing code objects (GH-112329)

23 months ago[3.12] Fix docstring and var name of itertools recipe (GH-112113) (#112310)
Miss Islington (bot) [Wed, 22 Nov 2023 05:41:53 +0000 (06:41 +0100)] 
[3.12] Fix docstring and var name of itertools recipe (GH-112113) (#112310)

Fix docstring and var name of itertools recipe (GH-112113)

`prepend()` works with arbitrary iterables, not only iterators. In fact,
the example given uses a `list`, which is iterable, but not an iterator.
(cherry picked from commit 6c47eaccfa2550c140a24bc6e520d968731d9689)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
23 months ago[3.12] GH-111963: Clarify sys.monitoring.free_tool_id's limitations (GH-112304)
Miss Islington (bot) [Tue, 21 Nov 2023 23:06:13 +0000 (00:06 +0100)] 
[3.12] GH-111963: Clarify sys.monitoring.free_tool_id's limitations (GH-112304)

(cherry picked from commit 46500c42f09a8342efde48ad74327d5225158ff3)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
23 months ago[3.12] gh-110950: add upstream Tk fixes to macOS installer. (GH-111041) (#112294)
Miss Islington (bot) [Tue, 21 Nov 2023 08:46:13 +0000 (09:46 +0100)] 
[3.12] gh-110950: add upstream Tk fixes to macOS installer. (GH-111041) (#112294)

Add upstream Tk patches for three problems affecting tkinter users:

- Update macOS installer to include a fix accepted by upstream Tcl/Tk
for a crash encountered after the first :meth:`tkinter.Tk` instance
is destroyed. (gh-92603)

- Update macOS installer to include an upstream Tcl/Tk fix
for the ``ttk::ThemeChanged`` error encountered in Tkinter. (gh-71383)

- Update macOS installer to include an upstream Tcl/Tk fix for the
``Secure coding is not enabled for restorable state!`` warning
encountered in Tkinter on macOS 14 Sonoma. (gh-110950)

(cherry picked from commit d67f947c72af8a215db2fd285e5de9b1e671fde1)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Ned Deily <nad@python.org>
23 months ago[3.12] gh-112243: Don't include comments in f-string debug expressions (GH-112284...
Pablo Galindo Salgado [Mon, 20 Nov 2023 15:38:57 +0000 (15:38 +0000)] 
[3.12] gh-112243: Don't include comments in f-string debug expressions (GH-112284) (#112285)

(cherry picked from commit d59feb5dbe5395615d06c30a95e6a6a9b7681d4d)

23 months ago[3.12] gh-73561: Omit interface scope from IPv6 when used as Host header (GH-93324...
Miss Islington (bot) [Sun, 19 Nov 2023 23:25:36 +0000 (00:25 +0100)] 
[3.12] gh-73561: Omit interface scope from IPv6 when used as Host header (GH-93324) (#112272)

gh-73561: Omit interface scope from IPv6 when used as Host header (GH-93324)

Omit the `@interface_scope` from an IPv6 address when used as Host header by `http.client`.

---------

(cherry picked from commit ce1096f974d3158a92e050f9226700775b8db398)

 [Google LLC]

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
23 months ago[3.12] gh-112266: Remove `(if defined)` part from `__dict__` and `__weakref__` docstr...
Miss Islington (bot) [Sun, 19 Nov 2023 18:59:50 +0000 (19:59 +0100)] 
[3.12] gh-112266: Remove `(if defined)` part from `__dict__` and `__weakref__` docstrings (GH-112268) (#112270)

gh-112266: Remove `(if defined)` part from `__dict__` and `__weakref__` docstrings (GH-112268)
(cherry picked from commit f8129146ef9e1b71609ef4becc5d508061970733)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
23 months ago[3.12] gh-112186: Improve test case `test_loop_is_closed_resource_warnings` (GH-11218...
Miss Islington (bot) [Sun, 19 Nov 2023 15:19:12 +0000 (16:19 +0100)] 
[3.12] gh-112186: Improve test case `test_loop_is_closed_resource_warnings` (GH-112187) (#112255)

(cherry picked from commit 18c692946953e586db432fd06c856531a2b05127)

Co-authored-by: DPR <dpr-0xff@pm.me>
23 months ago[3.12] gh-110383: Explained which error message is generated when there is an unhandl...
Miss Islington (bot) [Sun, 19 Nov 2023 12:29:24 +0000 (13:29 +0100)] 
[3.12] gh-110383: Explained which error message is generated when there is an unhandled exception (GH-111574) (#112264)

Co-authored-by: Unique-Usman <86585626+Unique-Usman@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
23 months ago[3.12] gh-110383: Fix documentation profile cumtime fix (GH-112221) (#112262)
Miss Islington (bot) [Sun, 19 Nov 2023 10:03:07 +0000 (11:03 +0100)] 
[3.12] gh-110383: Fix documentation profile cumtime fix (GH-112221) (#112262)

Co-authored-by: Alex Ptakhin <me@aptakhin.name>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
23 months ago[3.12] IDLE: Fix test_debugger bug and buildbot failures (GH-112258) (#112259)
Miss Islington (bot) [Sun, 19 Nov 2023 06:53:37 +0000 (07:53 +0100)] 
[3.12] IDLE: Fix test_debugger bug and buildbot failures (GH-112258) (#112259)

IDLE: Fix test_debugger bug and buildbot failures (GH-112258)

Missing "requires('gui')" causes Tk() to fail when no gui.
This caused CI Hypothesis test to fail, but I did not understand
the its error message. Then buildbots failed.

IdbTest failed on draft Bdb replacement because so different.
Simplified version works on old and new.
(cherry picked from commit 14fd86a59d0d91fe72641efeb14a59d99127dec3)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
23 months ago[3.12] gh-79871: IDLE - Fix and test debugger module (GH-11451) (#112256)
Miss Islington (bot) [Sun, 19 Nov 2023 04:35:59 +0000 (05:35 +0100)] 
[3.12] gh-79871: IDLE - Fix and test debugger module (GH-11451) (#112256)

gh-79871: IDLE - Fix and test debugger module (GH-11451)

Add docstrings to the debugger module. Fix two bugs: initialize Idb.botframe (should be in Bdb); In Idb.in_rpc_code, check whether prev_frame is None before trying to use it. Make other code changes.

Expand test_debugger coverage from 19% to 66%.
---------

(cherry picked from commit adedcfa06b553242d8033f6d9bebbcb3bc0dbb4d)

Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
23 months ago[3.12] gh-112155: Run `typing.py` doctests during tests (GH-112156) (#112230)
Nikita Sobolev [Sat, 18 Nov 2023 11:13:37 +0000 (14:13 +0300)] 
[3.12] gh-112155: Run `typing.py` doctests during tests (GH-112156) (#112230)

23 months ago[3.12] gh-112194: Convert more examples to doctests in `typing.py` (GH-112195) (...
Miss Islington (bot) [Fri, 17 Nov 2023 18:28:35 +0000 (19:28 +0100)] 
[3.12] gh-112194: Convert more examples to doctests in `typing.py` (GH-112195) (#112208)

gh-112194: Convert more examples to doctests in `typing.py` (GH-112195)
(cherry picked from commit 949b2cc6eae6ef4f3312dfd4e2650a138446fe77)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
23 months ago[3.12] gh-94309: "What's new in Python 3.12": improve deprecation notice for typing...
Miss Islington (bot) [Fri, 17 Nov 2023 12:37:12 +0000 (13:37 +0100)] 
[3.12] gh-94309: "What's new in Python 3.12": improve deprecation notice for typing.Hashable and typing.Sized (GH-112196) (#112200)

gh-94309: "What's new in Python 3.12": improve deprecation notice for typing.Hashable and typing.Sized (GH-112196)
(cherry picked from commit fb4cddb0cc6c9b94929f846da8e95aeec3849212)

Co-authored-by: Ori Avtalion <ori@avtalion.name>
23 months ago[3.12] gh-112165: Fix typo in `__main__.py` (GH-112183) (#112184)
Miss Islington (bot) [Fri, 17 Nov 2023 01:11:46 +0000 (02:11 +0100)] 
[3.12] gh-112165: Fix typo in `__main__.py` (GH-112183) (#112184)

gh-112165: Fix typo in `__main__.py` (GH-112183)

Change '[2]' to '[1]' to get second argument.
(cherry picked from commit 8cd70eefc7f3363cfa0d43f34522c3072fa9e160)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
23 months ago[3.12] Remove `imp_dummy_def` from `Tools/c-analyzer/cpython/ignored.tsv` (gh-112122...
Miss Islington (bot) [Thu, 16 Nov 2023 21:09:34 +0000 (22:09 +0100)] 
[3.12] Remove `imp_dummy_def` from `Tools/c-analyzer/cpython/ignored.tsv` (gh-112122) (gh-112177)

It was removed in 3.12, no need to keep the ignore.
(cherry picked from commit 762eb58220992d1ab809b9a281d47c0cd48a5aec)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
23 months ago[3.12] gh-109538: Catch closed loop runtime error and issue warning (GH-111983) ...
DPR [Thu, 16 Nov 2023 17:40:55 +0000 (01:40 +0800)] 
[3.12] gh-109538: Catch closed loop runtime error and issue warning (GH-111983) (#112142)

* [3.12] gh-109538: Avoid RuntimeError when StreamWriter is deleted with closed loop (GH-111983)

Issue a ResourceWarning instead.

(cherry picked from commit e0f512797596282bff63260f8102592aad37cdf1)
gh-109538: Avoid RuntimeError when StreamWriter is deleted with closed loop (#111983)

Issue a ResourceWarning instead.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
(cherry picked from commit e0f512797596282bff63260f8102592aad37cdf1)

* Fix missing warnings import

23 months ago[3.12] gh-111811: Fix test_recursive_repr for WASI (GH-112130) (#112131)
Miss Islington (bot) [Thu, 16 Nov 2023 17:11:33 +0000 (18:11 +0100)] 
[3.12] gh-111811: Fix test_recursive_repr for WASI (GH-112130) (#112131)

gh-111811: Fix test_recursive_repr for WASI (GH-112130)
(cherry picked from commit 7218bac8c84115a8e9a18a4a8f3146235068facb)

Co-authored-by: Kushal Das <mail@kushaldas.in>
23 months ago[3.12] GH-112152: Fix typo in `typing.override` docstring (GH-112158) (#112162)
Miss Islington (bot) [Thu, 16 Nov 2023 15:32:47 +0000 (16:32 +0100)] 
[3.12] GH-112152: Fix typo in `typing.override` docstring (GH-112158) (#112162)

GH-112152: Fix typo in `typing.override` docstring (GH-112158)
(cherry picked from commit 12c7e9d573de57343cf018fb4e67521aba46c90f)

Co-authored-by: Qua27 <92877777+Qua27@users.noreply.github.com>
23 months ago[3.12] gh-112088: Run autoreconf in GHA check_generated_files (GH-112090) (#112159)
Victor Stinner [Thu, 16 Nov 2023 14:55:40 +0000 (15:55 +0100)] 
[3.12] gh-112088: Run autoreconf in GHA check_generated_files (GH-112090) (#112159)

gh-112088: Run autoreconf in GHA check_generated_files (#112090)

The "Check if generated files are up to date" job of GitHub Actions
now runs the "autoreconf -ivf -Werror" command instead of the "make
regen-configure" command to avoid depending on the external quay.io
server.

Add Tools/build/regen-configure.sh script to regenerate the configure
with an Ubuntu container image. The
"quay.io/tiran/cpython_autoconf:271" container image
(https://github.com/tiran/cpython_autoconf) is no longer used.

(cherry picked from commit d9fd33a869d2be769ff596530f63ee099465b037)

23 months ago[3.12] gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH...
Miss Islington (bot) [Thu, 16 Nov 2023 12:34:29 +0000 (13:34 +0100)] 
[3.12] gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504) (GH-112148)

gh-110812: Isolating Extension Modules HOWTO: List GC-related gotchas (GH-111504)
(cherry picked from commit 985679f05d1b72965bfbed99d1499c22815375e4)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
23 months ago[3.12] gh-111062: CI: Move OS test jobs to reusable workflows (gh-111568)
Hugo van Kemenade [Thu, 16 Nov 2023 00:44:39 +0000 (02:44 +0200)] 
[3.12] gh-111062: CI: Move OS test jobs to reusable workflows (gh-111568)

CI: Move OS test jobs to reusable workflows

Co-authored-by: Donghee Na <donghee.na@python.org>
23 months ago[3.12] Fix typo in perf profiling docs (GH-112112) (#112117)
Miss Islington (bot) [Wed, 15 Nov 2023 15:48:04 +0000 (16:48 +0100)] 
[3.12] Fix typo in perf profiling docs (GH-112112) (#112117)

Fix typo in perf profiling docs (GH-112112)
(cherry picked from commit 0cfdd6e3d17fee8c1c1f4b42b2146abcb43aa34b)

Co-authored-by: Ryuji Tsutsui <ryu22e+github@gmail.com>
23 months ago[3.12] gh-111942: Fix SystemError in the TextIOWrapper constructor (GH-112061) (GH...
Victor Stinner [Wed, 15 Nov 2023 13:55:46 +0000 (14:55 +0100)] 
[3.12] gh-111942: Fix SystemError in the TextIOWrapper constructor (GH-112061) (GH-112089)

In non-debug more the check for the "errors" argument is skipped,
and then PyUnicode_AsUTF8() can fail, but its result was not checked.

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 9302f05f9af07332c414b3c19003efd1b1763cf3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months ago[3.12] gh-108303: Delete `imp_dummy` test file (GH-112110) (#112114)
Miss Islington (bot) [Wed, 15 Nov 2023 13:08:05 +0000 (14:08 +0100)] 
[3.12] gh-108303: Delete `imp_dummy` test file (GH-112110) (#112114)

gh-108303: Delete `imp_dummy` test file (GH-112110)
(cherry picked from commit 422c0f030170490c001575303d9e628a0298d457)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
23 months ago[3.12] Docs: Add the time to the HTML last updated format (GH-110091) (#112102)
Miss Islington (bot) [Wed, 15 Nov 2023 05:20:14 +0000 (06:20 +0100)] 
[3.12] Docs: Add the time to the HTML last updated format (GH-110091) (#112102)

Docs: Add the time to the HTML last updated format (GH-110091)
(cherry picked from commit 6c214dea7c503eb42bd130d43e8880f39bff0350)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
23 months ago[3.12] gh-111942: Fix crashes in TextIOWrapper.reconfigure() (GH-111976) (GH-112058)
Miss Islington (bot) [Tue, 14 Nov 2023 16:15:10 +0000 (17:15 +0100)] 
[3.12] gh-111942: Fix crashes in TextIOWrapper.reconfigure() (GH-111976) (GH-112058)

* Fix crash when encoding is not string or None.
* Fix crash when both line_buffering and write_through raise exception
  when converted ti int.
* Add a number of tests for constructor and reconfigure() method
  with invalid arguments.

(cherry picked from commit ee06fffd38cb51ce1c045da9d8336d9ce13c318a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months ago[3.12] gh-110944: Move pty helper to test.support and add basic pdb completion test...
Miss Islington (bot) [Tue, 14 Nov 2023 12:25:19 +0000 (13:25 +0100)] 
[3.12] gh-110944: Move pty helper to test.support and add basic pdb completion test (GH-111826) (GH-112024)

gh-110944: Move pty helper to test.support and add basic pdb completion test (GH-111826)
(cherry picked from commit 1c7ed7e9ebc53290c831d7b610219fa737153a1b)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
23 months ago[3.12] gh-111622: Fix doc for items views (GH-112051) (#112052)
Miss Islington (bot) [Tue, 14 Nov 2023 09:38:19 +0000 (10:38 +0100)] 
[3.12] gh-111622: Fix doc for items views (GH-112051) (#112052)

They are set-like even when some values are not hashable,
but work even better when all are.
(cherry picked from commit e31d65e0b7bb6d6fee4e8df54e10976b4cfab1de)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
23 months ago[3.12] gh-111460: Restore ncurses widechar support on macOS (GH-111878) (gh-112034)
Miss Islington (bot) [Tue, 14 Nov 2023 01:59:01 +0000 (02:59 +0100)] 
[3.12] gh-111460: Restore ncurses widechar support on macOS (GH-111878) (gh-112034)

gh-111460: Restore ncurses widechar support on macOS (GH-111878)
(cherry picked from commit d2f305dfd183025a95592319b280fcf4b20c8694)

Co-authored-by: Davide Rizzo <sorcio@gmail.com>
23 months ago[3.12] gh-112007: Re-organize help utility intro message (GH-112017) (#112047)
Miss Islington (bot) [Mon, 13 Nov 2023 19:55:33 +0000 (20:55 +0100)] 
[3.12] gh-112007: Re-organize help utility intro message (GH-112017) (#112047)

gh-112007: Re-organize help utility intro message (GH-112017)

Most important: move how-to-quit sentence to the end and mention 'q'.
Re-group the other sentences and improve some wording.
---------

(cherry picked from commit b28bb130bbc2ad956828819967d83e06d30a65c5)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
23 months agogh-111856: Fix os.fstat on windows with FAT32 and exFAT filesystem (GH-112038)
Miss Islington (bot) [Mon, 13 Nov 2023 16:25:01 +0000 (17:25 +0100)] 
gh-111856: Fix os.fstat on windows with FAT32 and exFAT filesystem (GH-112038)

(cherry picked from commit 29af7369dbbbba8cefafb196e977bce8189a527d)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
23 months ago[3.12] gh-102837: more tests for the math module (GH-111930)(GH-102523) (GH-112030)
Petr Viktorin [Mon, 13 Nov 2023 14:54:40 +0000 (15:54 +0100)] 
[3.12] gh-102837: more tests for the math module (GH-111930)(GH-102523) (GH-112030)

* gh-102837: improve test coverage for math module (GH-102523)

(Only the test changes from GH-102523 are cherry-picked)

- input checks for math_1(L989), math_1a(L1023), math_2(L1064,L1071), hypot(L2682), log(L2307), ldexp(L2168), ceil(L1165), floor(L1236,L1239) and dist(L2587,L2588,L2628).
- improve fsum coverage for exceptional cases (L1433,L1438,L1451,L1497), ditto fmod(L2378)

(all line numbers are wrt the main branch at 5e6661bce9)

* gh-102837: more tests for the math module (GH-111930)

Add tests to improve coverage:

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8204

(cherry picked from commit c61de456db0186b65d479d41e84127832205d30d)

---------

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
23 months ago[3.12] gh-111681: minor fixes to typing doctests; remove unused imports in `test_typi...
Alex Waygood [Mon, 13 Nov 2023 14:08:57 +0000 (14:08 +0000)] 
[3.12] gh-111681: minor fixes to typing doctests; remove unused imports in `test_typing` (#111682) (#112035)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
23 months ago[3.12] Bump mypy to 1.7.0 (GH-111961) (#112033)
Alex Waygood [Mon, 13 Nov 2023 13:59:56 +0000 (13:59 +0000)] 
[3.12] Bump mypy to 1.7.0 (GH-111961) (#112033)

23 months ago[3.12] Docs: Add `make htmllive` to rebuild and reload HTML files in your browser...
Miss Islington (bot) [Mon, 13 Nov 2023 08:15:11 +0000 (09:15 +0100)] 
[3.12] Docs: Add `make htmllive` to rebuild and reload HTML files in your browser (GH-111900) (#112022)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
23 months ago[3.12] gh-111944: Add assignment expression parentheses requirements (GH-111977)...
Miss Islington (bot) [Mon, 13 Nov 2023 00:17:54 +0000 (01:17 +0100)] 
[3.12] gh-111944: Add assignment expression parentheses requirements (GH-111977) (#112010)

Augment the list of places where parentheses are
required around assignnment statements.  In particular,
'a := 0' and 'a = b := 1' are syntax errors.
(cherry picked from commit 9a2f25d374f027f6509484d66e1c7bba03977b99)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
23 months ago[3.12] gh-112001: Fix test_builtins_have_signatures in test_inspect (GH-112002) ...
Miss Islington (bot) [Sun, 12 Nov 2023 13:20:36 +0000 (14:20 +0100)] 
[3.12] gh-112001: Fix test_builtins_have_signatures in test_inspect (GH-112002) (GH-112003)

(cherry picked from commit 40752c1c1e8cec80e99a2c9796f4fde2f8b5d3e2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
23 months ago[3.12] gh-111933: fix broken link to A.Neumaier article (gh-111937) (gh-111993)
Miss Islington (bot) [Sun, 12 Nov 2023 01:22:44 +0000 (02:22 +0100)] 
[3.12] gh-111933: fix broken link to A.Neumaier article (gh-111937) (gh-111993)

23 months ago[3.12] gh-111777: Fix assertion errors on incorrectly still-tracked GC object destruc...
Miss Islington (bot) [Sun, 12 Nov 2023 00:44:24 +0000 (01:44 +0100)] 
[3.12] gh-111777: Fix assertion errors on incorrectly still-tracked GC object destruction (GH-111778) (#111989)

gh-111777: Fix assertion errors on incorrectly still-tracked GC object destruction (GH-111778)

In PyObject_GC_Del, in Py_DEBUG mode, when warning about GC objects that
were not properly untracked before starting destruction, take care to
untrack the object _before_ warning, to avoid triggering a GC run and
causing the problem the code tries to warn about. Also make sure to save and
restore any pending exceptions, which the warning would otherwise clobber or
trigger an assertion error on.
(cherry picked from commit ce6a533c4bf1afa3775dfcaee5fc7d5c15a4af8c)

Co-authored-by: T. Wouters <thomas@python.org>
23 months ago[3.12] Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982) (#111992)
Miss Islington (bot) [Sun, 12 Nov 2023 00:39:03 +0000 (01:39 +0100)] 
[3.12] Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982) (#111992)

Fix undefined behaviour in datetime.time.fromisoformat() (GH-111982)

Fix undefined behaviour in datetime.time.fromisoformat() when parsing a string without a timezone. 'tzoffset' is not assigned to by parse_isoformat_time if it returns 0, but time_fromisoformat then passes tzoffset to another function, which is undefined behaviour (even if the function in question does not use the value).
(cherry picked from commit 21615f77b5a580e83589abae618dbe7c298700e2)

Co-authored-by: T. Wouters <thomas@python.org>
2 years ago[3.12] gh-110395: invalidate open kqueues after fork (GH-110517) (#111745)
Gregory P. Smith [Sat, 11 Nov 2023 17:21:52 +0000 (09:21 -0800)] 
[3.12] gh-110395: invalidate open kqueues after fork (GH-110517) (#111745)

* [3.12] gh-110395: invalidate open kqueues after fork (GH-110517)

Invalidate open select.kqueue instances after fork as the fd will be invalid in the child.
(cherry picked from commit a6c1c04d4d2339f0094422974ae3f26f8c7c8565)

Co-authored-by: Davide Rizzo <sorcio@gmail.com>
* move assert to after the child dying

this is in `main` via https://github.com/python/cpython/pull/111816/files

2 years ago[3.12] gh-111841: Fix os.putenv() and os.unsetenv() with embedded NUL on Windows...
Miss Islington (bot) [Sat, 11 Nov 2023 08:02:08 +0000 (09:02 +0100)] 
[3.12] gh-111841: Fix os.putenv() and os.unsetenv() with embedded NUL on Windows (GH-111842) (GH-111966)

(cherry picked from commit 0b06d2482d77e02c5d40e221f6046c9c355458b2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>