]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years ago[3.12] gh-105603: Change the PyInterpreterConfig.own gil Field (gh-105620) (gh-105731)
Miss Islington (bot) [Tue, 13 Jun 2023 17:42:56 +0000 (10:42 -0700)] 
[3.12] gh-105603: Change the PyInterpreterConfig.own gil Field (gh-105620) (gh-105731)

We are changing it to be more flexible that a strict bool can be for possible future expanded used cases.
(cherry picked from commit b97e14a806477af4225777d215ac38c0d9b845f0)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-105718: Fix buffer allocation in tokenizer with readline (GH-105728) (...
Miss Islington (bot) [Tue, 13 Jun 2023 15:53:51 +0000 (08:53 -0700)] 
[3.12] gh-105718: Fix buffer allocation in tokenizer with readline (GH-105728) (#105729)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2 years ago[3.12] gh-105084: Tests: Use setuptools+wheel from sysconfig.get_config_var('WHEEL_PK...
Miro Hrončok [Tue, 13 Jun 2023 10:54:11 +0000 (12:54 +0200)] 
[3.12] gh-105084: Tests: Use setuptools+wheel from sysconfig.get_config_var('WHEEL_PKG_DIR') if set (#105056) (#105424)

Includes part of the changes from afa759fb800be416f69e3e9c9b3efe68006316f5,
to make this apply.

Co-Authored-By: Lysandros Nikolaou <lisandrosnik@gmail.com>
(cherry picked from commit bd98b65e974b7a1e086a51e7b55131582f7a0491)

2 years ago[3.12] gh-105713: Document that tokenize raises when mixing tabs/spaces (GH-105723...
Miss Islington (bot) [Tue, 13 Jun 2023 10:48:43 +0000 (03:48 -0700)] 
[3.12] gh-105713: Document that tokenize raises when mixing tabs/spaces (GH-105723) (#105725)

* gh-105713: Document that tokenize raises when mixing tabs/spaces
* Update Doc/whatsnew/3.12.rst

(cherry picked from commit ed8217b493e19cea0f3f539e55b592c09ceb9323)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-105375: Improve error handling in _Unpickler_SetInputStream() (#105667...
Erlend E. Aasland [Tue, 13 Jun 2023 09:15:19 +0000 (11:15 +0200)] 
[3.12] gh-105375: Improve error handling in _Unpickler_SetInputStream() (#105667) (#105720)

Prevent exceptions from possibly being overwritten in case of multiple
failures.

(cherry picked from commit 217589d4f3246d67c6ef0eb0be2b1c33987cf260)

2 years ago[3.12] gh-105375: Explicitly initialise all {Pickler,Unpickler}Object fields (GH...
Miss Islington (bot) [Mon, 12 Jun 2023 22:12:17 +0000 (15:12 -0700)] 
[3.12] gh-105375: Explicitly initialise all {Pickler,Unpickler}Object fields (GH-105686) (#105710)

All fields must be explicitly initialised to prevent manipulation of
uninitialised fields in dealloc.

Align initialisation order with the layout of the object structs.

(cherry picked from commit ca3cc4b95d66f7527ebe0ba4cdb1907082d9bfc8)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105436: The environment block should end with two null wchar_t values ...
Miss Islington (bot) [Mon, 12 Jun 2023 16:50:58 +0000 (09:50 -0700)] 
[3.12] gh-105436: The environment block should end with two null wchar_t values (GH-105495) (#105700)

gh-105436: The environment block should end with two null wchar_t values (GH-105495)
(cherry picked from commit 4f7d3b602d47d61137e82145f601dccfe6f6cd3c)

Co-authored-by: Dora203 <66343334+sku2000@users.noreply.github.com>
2 years ago[3.12] gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386...
Miss Islington (bot) [Mon, 12 Jun 2023 16:24:21 +0000 (09:24 -0700)] 
[3.12] gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386) (GH-105697)

gh-103968: PyType_FromMetaclass: Allow metaclasses with tp_new=NULL (GH-105386)
(cherry picked from commit 2b90796be6959d5ef46b38c434a514fce25be971)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 years ago[3.12] ARM64 clamping bug also exists in MSVC 14.35 (GH-105679) (#105695)
Miss Islington (bot) [Mon, 12 Jun 2023 16:02:30 +0000 (09:02 -0700)] 
[3.12] ARM64 clamping bug also exists in MSVC 14.35 (GH-105679) (#105695)

ARM64 clamping bug also exists in MSVC 14.35 (GH-105679)
(cherry picked from commit 58f0bda34126ed790000451874b96140737f40ed)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.12] gh-105673: Fix uninitialized warning in sysmodule.c (GH-105674) (#105675)
Miss Islington (bot) [Mon, 12 Jun 2023 09:15:45 +0000 (02:15 -0700)] 
[3.12] gh-105673: Fix uninitialized warning in sysmodule.c (GH-105674) (#105675)

In sys_add_xoption(), 'value' may be uninitialized for some error paths.
(cherry picked from commit a8d69fe92c65d636fc454cfb1825c357eb2e6325)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.12] gh-105375: Harden pyexpat initialisation (#105606) (#105669)
Erlend E. Aasland [Sun, 11 Jun 2023 21:35:13 +0000 (23:35 +0200)] 
[3.12] gh-105375: Harden pyexpat initialisation (#105606) (#105669)

(cherry picked from commit 20a56d8becba1a5a958b167fdb43b1a1b9228095)

Add proper error handling to add_errors_module() to prevent exceptions
from possibly being overwritten.

2 years ago[3.12] gh-105375: Improve error handling in the sys extension module (GH-105611)...
Miss Islington (bot) [Sun, 11 Jun 2023 21:12:17 +0000 (14:12 -0700)] 
[3.12] gh-105375: Improve error handling in the sys extension module (GH-105611) (#105665)

In _PySys_AddXOptionWithError() and sys_add_xoption(),
bail on first error to prevent exceptions from possibly being
overwritten.
(cherry picked from commit 41cddc2e93a285b81fa30ac542b088bd9d0112e9)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105375: Improve error handling in _ctypes (GH-105593) (#105663)
Miss Islington (bot) [Sun, 11 Jun 2023 20:25:27 +0000 (13:25 -0700)] 
[3.12] gh-105375: Improve error handling in _ctypes (GH-105593) (#105663)

Prevent repeated PyLong_FromVoidPtr() from possibly overwriting the
current exception.
(cherry picked from commit e8998e46a7ce8ad336e0941a6da6e50cb88d1e47)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105375: Improve error handling in PyUnicode_BuildEncodingMap() (GH-105491...
Miss Islington (bot) [Sun, 11 Jun 2023 20:01:18 +0000 (13:01 -0700)] 
[3.12] gh-105375: Improve error handling in PyUnicode_BuildEncodingMap() (GH-105491) (#105661)

Bail on first error to prevent exceptions from possibly being overwritten.
(cherry picked from commit 555be81026fe1205d16c02f6321221381174cd07)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105375: Improve PyErr_WarnExplicit() error handling (GH-105610) (#105659)
Miss Islington (bot) [Sun, 11 Jun 2023 19:51:30 +0000 (12:51 -0700)] 
[3.12] gh-105375: Improve PyErr_WarnExplicit() error handling (GH-105610) (#105659)

Bail on first error to prevent exceptions from possibly being
overwritten.
(cherry picked from commit 567d6ae8e77579173510fc948ac06b2ababf3d40)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105375: Improve posix error handling (GH-105592) (#105598)
Miss Islington (bot) [Sun, 11 Jun 2023 19:33:30 +0000 (12:33 -0700)] 
[3.12] gh-105375: Improve posix error handling (GH-105592) (#105598)

Fix a bug where an IndexError could end up being overwritten.
(cherry picked from commit f668f73bc88cce0112b304d87aa998fb28013c71)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] Fix typo in configparser module docstring (GH-105652) (#105653)
Miss Islington (bot) [Sun, 11 Jun 2023 14:31:04 +0000 (07:31 -0700)] 
[3.12] Fix typo in configparser module docstring (GH-105652) (#105653)

Fix typo in configparser module docstring (GH-105652)

"zc.buildbot" -> "zc.buildout"
(cherry picked from commit 845e593c4ec97dd9f73b50536c1e1e7ed10ceecd)

Co-authored-by: litlighilit <97860435+litlighilit@users.noreply.github.com>
2 years ago[3.12] gh-105375: Improve error handling in the builtins extension module (GH-105585...
Miss Islington (bot) [Sun, 11 Jun 2023 11:17:48 +0000 (04:17 -0700)] 
[3.12] gh-105375: Improve error handling in the builtins extension module (GH-105585) (#105649)

(cherry picked from commit d4fa52934a282df51cff800eee5caeb94a229547)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105375: Improve _decimal error handling (GH-105605) (#105647)
Miss Islington (bot) [Sun, 11 Jun 2023 10:55:18 +0000 (03:55 -0700)] 
[3.12] gh-105375: Improve _decimal error handling (GH-105605) (#105647)

Fix a bug where an exception could end up being overwritten.
(cherry picked from commit c932f7284977ebf813313157c52d716ba225a7ac)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105375: Harden _datetime initialisation (GH-105604) (#105645)
Miss Islington (bot) [Sun, 11 Jun 2023 10:46:33 +0000 (03:46 -0700)] 
[3.12] gh-105375: Harden _datetime initialisation (GH-105604) (#105645)

Improve error handling so init bails on the first exception.
(cherry picked from commit 16d49680b56e00c53c00683b949138e584669fd3)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105375: Harden _ssl initialisation (GH-105599) (#105642)
Miss Islington (bot) [Sun, 11 Jun 2023 10:26:52 +0000 (03:26 -0700)] 
[3.12] gh-105375: Harden _ssl initialisation (GH-105599) (#105642)

Add proper error handling to prevent reference leaks and overwritten
exceptions.
(cherry picked from commit 01f4230460454d4a849a5ba93320142c1a0c93a8)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105375: Improve array.array exception handling (GH-105594) (#105644)
Miss Islington (bot) [Sun, 11 Jun 2023 10:24:22 +0000 (03:24 -0700)] 
[3.12] gh-105375: Improve array.array exception handling (GH-105594) (#105644)

Fix a bug where 'tp_richcompare' could end up overwriting an exception.
(cherry picked from commit 35cff545db7c7912046c0ce5627db2e4d2b60f57)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-99108: Mention HACL\* in the hashlib docs. (GH-105634) (#105635)
Miss Islington (bot) [Sat, 10 Jun 2023 19:10:04 +0000 (12:10 -0700)] 
[3.12] gh-99108: Mention HACL\* in the hashlib docs. (GH-105634) (#105635)

gh-99108: Mention HACL\* in the hashlib docs. (GH-105634)
(cherry picked from commit 3a314f7c3df0dd7c37da7d12b827f169ee60e1ea)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.12] Cleanup and clarify our hashlib docs. (GH-105624) (#105632)
Miss Islington (bot) [Sat, 10 Jun 2023 18:49:59 +0000 (11:49 -0700)] 
[3.12] Cleanup and clarify our hashlib docs. (GH-105624) (#105632)

Cleanup and clarify our hashlib docs. (GH-105624)

Clarify and improve our hashlib docs. Now with 50% less mess!
(cherry picked from commit 0d1d6ab966ff4e4d651d0dee0ec9a2f868ef42da)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.12] gh-105375: Improve error handling in `zoneinfo` module (GH-105586) (#105612)
Miss Islington (bot) [Fri, 9 Jun 2023 23:22:10 +0000 (16:22 -0700)] 
[3.12] gh-105375: Improve error handling in `zoneinfo` module (GH-105586) (#105612)

Fix bugs where exceptions could end up being overwritten
because of deferred error handling.

(cherry picked from commit 33c92c4f15539806c8aff8574ff30a8b307e3e4d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105375: Harden error handling in `_testcapi/heaptype.c` (GH-105608) (#105615)
Miss Islington (bot) [Fri, 9 Jun 2023 23:21:42 +0000 (16:21 -0700)] 
[3.12] gh-105375: Harden error handling in `_testcapi/heaptype.c` (GH-105608) (#105615)

Bail on first error in heapctypesubclasswithfinalizer_finalize()
(cherry picked from commit d636d7dfe714e7168b342c7ea5f9f9d3b3569ed0)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] Docs: fix formatting in 2023-06-09-12-59-18 NEWS item (GH-105607) (#105614)
Miss Islington (bot) [Fri, 9 Jun 2023 21:53:53 +0000 (14:53 -0700)] 
[3.12] Docs: fix formatting in 2023-06-09-12-59-18 NEWS item (GH-105607) (#105614)

(cherry picked from commit 91441bf7cbaefbd328ee7efa59a06e661f61542e)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105549: Tokenize separately NUMBER and NAME tokens and allow 0-prefixed...
Miss Islington (bot) [Fri, 9 Jun 2023 21:40:07 +0000 (14:40 -0700)] 
[3.12] gh-105549: Tokenize separately NUMBER and NAME tokens and allow 0-prefixed literals (GH-105555) (#105602)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years ago[3.12] gh-105375: Improve error handling in _elementtree (GH-105591) (#105600)
Miss Islington (bot) [Fri, 9 Jun 2023 21:15:24 +0000 (14:15 -0700)] 
[3.12] gh-105375: Improve error handling in _elementtree (GH-105591) (#105600)

Fix bugs where exceptions could end up being overwritten.
(cherry picked from commit 00b599ab5a76023fa0083d7cc5d3c569342a5191)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105375: Improve errnomodule error handling (#105590) (#105596)
Erlend E. Aasland [Fri, 9 Jun 2023 20:36:53 +0000 (22:36 +0200)] 
[3.12] gh-105375: Improve errnomodule error handling (#105590) (#105596)

(cherry picked from commit eede1d2f48b4fe7f7918952d9ebeb744b58668c1)

Bail immediately if an exception is set, to prevent exceptions from
being overwritten.

2 years ago[3.12] gh-105375: Improve _pickle error handling (#105475) (#105584)
Erlend E. Aasland [Fri, 9 Jun 2023 18:08:32 +0000 (20:08 +0200)] 
[3.12] gh-105375: Improve _pickle error handling (#105475) (#105584)

(cherry picked from commit 89aac6f6b7b3af046ec137121c90732289e79efc)

Error handling was deferred in some cases, which could potentially lead
to exceptions being overwritten.

2 years ago[3.12] gh-105375: Improve error handling in compiler_enter_scope() (GH-105494) (...
Miss Islington (bot) [Fri, 9 Jun 2023 17:23:45 +0000 (10:23 -0700)] 
[3.12] gh-105375: Improve error handling in compiler_enter_scope() (GH-105494) (#105581)

(cherry picked from commit 6c832ddcf28187f86100c790afb16a0223d945d0)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105557: Remove duplicate sqlite3 test method (GH-105558) (#105561)
Miss Islington (bot) [Fri, 9 Jun 2023 17:15:55 +0000 (10:15 -0700)] 
[3.12] gh-105557: Remove duplicate sqlite3 test method (GH-105558) (#105561)

test_func_return_too_large_int() was defined twice.
Keep only the redefined method, as that also checks the tracebacks.
(cherry picked from commit b8fa7bda4f286503447dc12327b789bbfc836458)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105564: Don't include artificial newlines in the line attribute of tokens...
Miss Islington (bot) [Fri, 9 Jun 2023 16:58:14 +0000 (09:58 -0700)] 
[3.12] gh-105564: Don't include artificial newlines in the line attribute of tokens (GH-105565) (#105579)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years ago[3.12] Clarify the supported cases in the tokenize module (GH-105569) (#105573)
Miss Islington (bot) [Fri, 9 Jun 2023 16:00:42 +0000 (09:00 -0700)] 
[3.12] Clarify the supported cases in the tokenize module (GH-105569) (#105573)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years ago[3.12] Miscellaneous improvements to the typing docs (GH-105529) (#105567)
Miss Islington (bot) [Fri, 9 Jun 2023 15:37:33 +0000 (08:37 -0700)] 
[3.12] Miscellaneous improvements to the typing docs (GH-105529) (#105567)

Miscellaneous improvements to the typing docs (GH-105529)

Mostly, these are changes so that we use shorter sentences and shorter paragraphs. In particular, I've tried to make the first sentence introducing each object in the typing API short and declarative.
(cherry picked from commit 8e755923c97d689ba7c7fe8deb50c1b169263264)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-102304: Fix Py_INCREF() for limited C API 3.9 (#105553)
Victor Stinner [Fri, 9 Jun 2023 10:32:46 +0000 (12:32 +0200)] 
[3.12] gh-102304: Fix Py_INCREF() for limited C API 3.9 (#105553)

* gh-102304: Fix Py_INCREF() for limited C API 3.9 (#105550)

When Python is built in debug mode (Py_REF_DEBUG macro), Py_INCREF()
and Py_DECREF() of the limited C API 3.9 (and older) now call
Py_IncRef() and Py_DecRef(), since _Py_IncRef() and _Py_DecRef() were
added to Python 3.10.

(cherry picked from commit 7ba0fd9f87ad75f8eda8e002c2fc71049b815f33)

* gh-102304: Remove Py_INCREF() doc change (#105552)

Py_INCREF() was made compatible again with Python 3.9 and older in
the limited API of Python debug mode.

(cherry picked from commit 58e4b69f698e6fd0694a58f18679bbe0e7e50e91)

2 years ago[3.12] gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348) (GH-105520)
Miss Islington (bot) [Fri, 9 Jun 2023 01:01:51 +0000 (18:01 -0700)] 
[3.12] gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348) (GH-105520)

* revert enum pickling from by-name to by-value

(cherry picked from commit 4ff5690e591b7d11cf11e34bf61004e2ea58ab3c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2 years ago[3.12] CI: Configure macOS build as per updated devguide recommendations (GH-105533...
Miss Islington (bot) [Thu, 8 Jun 2023 23:00:53 +0000 (16:00 -0700)] 
[3.12] CI: Configure macOS build as per updated devguide recommendations (GH-105533) (#105536)

(cherry picked from commit a5f23d411062f9f29f8a7d7ddefe60d5d8e17d2e)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-100227: Lock Around Modification of the Global Allocators State (gh-105516...
Miss Islington (bot) [Thu, 8 Jun 2023 22:35:53 +0000 (15:35 -0700)] 
[3.12] gh-100227: Lock Around Modification of the Global Allocators State (gh-105516) (gh-105532)

The risk of a race with this state is relatively low, but we play it safe anyway. We do avoid using the lock in performance-sensitive cases where the risk of a race is very, very low.
(cherry picked from commit 68dfa496278aa21585eb4654d5f7ef13ef76cb50)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-102832: IDLE - update stackviewer open (GH-105528) (#105534)
Miss Islington (bot) [Thu, 8 Jun 2023 22:29:24 +0000 (15:29 -0700)] 
[3.12] gh-102832: IDLE - update stackviewer open (GH-105528) (#105534)

gh-102832: IDLE - update stackviewer open (GH-105528)

Use 'last_exc' instead of 'last_value' in 3.12/3.
(cherry picked from commit bb3454c1a75c90da3c34c060eb23403fed3fd958)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 years ago[3.12] gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer ...
Miss Islington (bot) [Thu, 8 Jun 2023 21:57:33 +0000 (14:57 -0700)] 
[3.12] gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339) (#105526)

gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339)
(cherry picked from commit 3ee921d84f06da9dfa8aa29e0d33778b9dbf8f23)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 years ago[3.12] gh-100227: Lock Around Adding Global Audit Hooks (gh-105515) (gh-105525)
Eric Snow [Thu, 8 Jun 2023 21:05:47 +0000 (15:05 -0600)] 
[3.12] gh-100227: Lock Around Adding Global Audit Hooks (gh-105515) (gh-105525)

The risk of a race with this state is relatively low, but we play it safe anyway.
(cherry picked from commit e822a676f1f3bef6c5413e9b856db481c08ac2a5)

2 years ago[3.12] gh-100227: Lock Around Use of the Global "atexit" State (gh-105514) (gh-105517)
Miss Islington (bot) [Thu, 8 Jun 2023 19:27:44 +0000 (12:27 -0700)] 
[3.12] gh-100227: Lock Around Use of the Global "atexit" State (gh-105514) (gh-105517)

The risk of a race with this state is relatively low, but we play it safe anyway.
(cherry picked from commit 7799c8e678f759c7787785c6287140abe641d1b9)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-104310: Rename the New Function in importlib.util (gh-105255) (gh-105518)
Miss Islington (bot) [Thu, 8 Jun 2023 19:00:04 +0000 (12:00 -0700)] 
[3.12] gh-104310: Rename the New Function in importlib.util (gh-105255) (gh-105518)

The original name wasn't as clear as it could have been. This change includes the following:

* rename the function
* change the default value for "disable_check" to False
* add clues to the docstring that folks should probably not use the function

---------

(cherry picked from commit 34c63b86d3c33a85acf55a0c5c118304754e145d)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2 years ago[3.12] test_types: Replace raw assert statements (GH-105500) (#105507)
Miss Islington (bot) [Thu, 8 Jun 2023 15:19:11 +0000 (08:19 -0700)] 
[3.12] test_types: Replace raw assert statements (GH-105500) (#105507)

(cherry picked from commit a8eb7372eebe182fd4ef7381a742d84a368a7d1b)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.12] Further improve docs for `typing.Annotated` (GH-105498) (#105503)
Miss Islington (bot) [Thu, 8 Jun 2023 15:12:35 +0000 (08:12 -0700)] 
[3.12] Further improve docs for `typing.Annotated` (GH-105498) (#105503)

Further improve docs for `typing.Annotated` (GH-105498)
(cherry picked from commit d213c2990f0db62ed39fc5468977f989c2658675)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-105431: Remove unused stuff from `test_typing.NewTypeTests` (GH-105432...
Miss Islington (bot) [Thu, 8 Jun 2023 06:57:21 +0000 (23:57 -0700)] 
[3.12] gh-105431: Remove unused stuff from `test_typing.NewTypeTests` (GH-105432) (#105489)

gh-105431: Remove unused stuff from `test_typing.NewTypeTests` (GH-105432)
(cherry picked from commit 9d35a71a76cb033598ce136ea655d9e452fe3af0)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.12] GH-104996: Defer joining of `pathlib.PurePath()` arguments. (GH-104999) (GH...
Barney Gale [Wed, 7 Jun 2023 23:25:45 +0000 (00:25 +0100)] 
[3.12] GH-104996: Defer joining of `pathlib.PurePath()` arguments. (GH-104999) (GH-105483)

Joining of arguments is moved to `_load_parts`, which is called when a
normalized path is needed.

(cherry picked from commit ffeaec7e60c88d585deacb10264ba7a96e5e52df)

2 years ago[3.12] gh-103171: Forward-port new tests for runtime-checkable protocols decorated...
Miss Islington (bot) [Wed, 7 Jun 2023 22:54:42 +0000 (15:54 -0700)] 
[3.12] gh-103171: Forward-port new tests for runtime-checkable protocols decorated with `@final` (GH-105473) (#105474)

Forward-port of the tests that were added to the 3.11 branch in GH-105445
(cherry picked from commit f5df347fcf5fe029edbe6bf274da0f4880401852)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-105390: Add explicit type cast (GH-105466) (#105472)
Miss Islington (bot) [Wed, 7 Jun 2023 22:46:24 +0000 (15:46 -0700)] 
[3.12] gh-105390: Add explicit type cast (GH-105466) (#105472)

2 years ago[3.12] gh-94673: Ensure subtypes are readied only once in math.trunc() (gh-105465...
Miss Islington (bot) [Wed, 7 Jun 2023 20:11:10 +0000 (13:11 -0700)] 
[3.12] gh-94673: Ensure subtypes are readied only once in math.trunc() (gh-105465) (gh-105471)

Fixes a typo in d2e2e53.
(cherry picked from commit 5394bf92aa6516feb3322d8372d1579bd9c1417b)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
2 years ago[3.12] gh-90015: Document that PEP-604 unions do not support forward references ...
Miss Islington (bot) [Wed, 7 Jun 2023 18:11:48 +0000 (11:11 -0700)] 
[3.12] gh-90015: Document that PEP-604 unions do not support forward references (GH-105366) (#105460)

gh-90015: Document that PEP-604 unions do not support forward references (GH-105366)
(cherry picked from commit fbdee000de47ae96fbf53ce8908e8efbb23cfba4)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] Fix grammar and improve clarity for an deprecation message. (GH-105457) (...
Miss Islington (bot) [Wed, 7 Jun 2023 17:41:04 +0000 (10:41 -0700)] 
[3.12] Fix grammar and improve clarity for an deprecation message. (GH-105457) (#105458)

2 years ago[3.12] typing: Improve documentation of generic classes and aliases (GH-105369) ...
Miss Islington (bot) [Wed, 7 Jun 2023 15:04:14 +0000 (08:04 -0700)] 
[3.12] typing: Improve documentation of generic classes and aliases (GH-105369) (#105453)

typing: Improve documentation of generic classes and aliases (GH-105369)
(cherry picked from commit d63a7c3694d5c4484fcaa01c33590b1d4bc2559e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-105437: Improve tests of type params names for PEP 695 (GH-105438) (#105452)
Miss Islington (bot) [Wed, 7 Jun 2023 14:35:12 +0000 (07:35 -0700)] 
[3.12] gh-105437: Improve tests of type params names for PEP 695 (GH-105438) (#105452)

(cherry picked from commit 76883af6bf28b7e810df172bd6762bf2cb64df08)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.12] gh-105430: Remove `typing._Immutable` unused internal helper (GH-105434) ...
Miss Islington (bot) [Wed, 7 Jun 2023 14:30:39 +0000 (07:30 -0700)] 
[3.12] gh-105430: Remove `typing._Immutable` unused internal helper (GH-105434) (#105451)

gh-105430: Remove `typing._Immutable` unused internal helper (GH-105434)
(cherry picked from commit 18309ad94bb1ae0b092f34dc3fd54199876a6ebd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.12] gh-97797: Improve documentation for typing.Annotated (GH-105365) (#105448)
Miss Islington (bot) [Wed, 7 Jun 2023 13:57:25 +0000 (06:57 -0700)] 
[3.12] gh-97797: Improve documentation for typing.Annotated (GH-105365) (#105448)

gh-97797: Improve documentation for typing.Annotated (GH-105365)
(cherry picked from commit e26d296984b2b6279231922ab0940d904aa6144e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] Improve docs for `typing.TypeAlias` (GH-105372) (#105446)
Miss Islington (bot) [Wed, 7 Jun 2023 13:45:54 +0000 (06:45 -0700)] 
[3.12] Improve docs for `typing.TypeAlias` (GH-105372) (#105446)

Improve docs for `typing.TypeAlias` (GH-105372)
(cherry picked from commit c5ec51ec8f4508e1f01f6d98ac8364a13da9bec7)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-105435: Fix spurious NEWLINE token if file ends with comment without a...
Miss Islington (bot) [Wed, 7 Jun 2023 13:07:57 +0000 (06:07 -0700)] 
[3.12] gh-105435: Fix spurious NEWLINE token if file ends with comment without a newline (GH-105442) (#105444)

2 years ago[3.12] gh-105375: Improve error handling in sqlite3 collation callback (GH-105412...
Miss Islington (bot) [Wed, 7 Jun 2023 11:43:18 +0000 (04:43 -0700)] 
[3.12] gh-105375: Improve error handling in sqlite3 collation callback (GH-105412) (#105440)

Check for error after each call to PyUnicode_FromStringAndSize().
(cherry picked from commit a24a780d937109a0982d807473ae410cc75b0e3b)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-105390: Correctly raise TokenError instead of SyntaxError for tokenize...
Miss Islington (bot) [Wed, 7 Jun 2023 11:38:36 +0000 (04:38 -0700)] 
[3.12] gh-105390: Correctly raise TokenError instead of SyntaxError for tokenize errors (GH-105399) (#105439)

2 years ago[3.12] gh-89886: Use Autoconf quadrigraphs where appropriate (#105226) (#105423)
Erlend E. Aasland [Wed, 7 Jun 2023 07:41:17 +0000 (09:41 +0200)] 
[3.12] gh-89886: Use Autoconf quadrigraphs where appropriate (#105226) (#105423)

2 years ago[3.12] Improve code examples in `typing.rst` (GH-105346) (#105422)
Miss Islington (bot) [Wed, 7 Jun 2023 07:00:22 +0000 (00:00 -0700)] 
[3.12] Improve code examples in `typing.rst` (GH-105346) (#105422)

Improve code examples in `typing.rst` (GH-105346)
(cherry picked from commit 81c81328a4fa13fead6f8cc9053a1a32a62a0279)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] typing docs: Make the PEPs list an expandable section, hidden by default ...
Miss Islington (bot) [Wed, 7 Jun 2023 06:48:44 +0000 (23:48 -0700)] 
[3.12] typing docs: Make the PEPs list an expandable section, hidden by default (GH-105353) (#105420)

typing docs: Make the PEPs list an expandable section, hidden by default (GH-105353)
(cherry picked from commit d7645124f56c8832a7630a7f76c99e2630e685d7)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.12] GH-95088: Clarify rules for parsing an item key for format strings (GH-103779...
Miss Islington (bot) [Wed, 7 Jun 2023 03:56:16 +0000 (20:56 -0700)] 
[3.12] GH-95088: Clarify rules for parsing an item key for format strings (GH-103779) (#105419)

GH-95088: Clarify rules for parsing an item key for format strings (GH-103779)
(cherry picked from commit 3e7316d7e8969febb56fbc7416d483b073bd1702)

Co-authored-by: achhina <amanschhina@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.12] `typing.NewType` docs: the future performance improvements are now in the...
Miss Islington (bot) [Wed, 7 Jun 2023 03:55:37 +0000 (20:55 -0700)] 
[3.12] `typing.NewType` docs: the future performance improvements are now in the past (GH-105354) (#105414)

`typing.NewType` docs: the future performance improvements are now in the past (GH-105354)
(cherry picked from commit 5f65ff0370e1123084ff300a5ff02cd57623b575)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-105286: Further improvements to `typing.py` docstrings (GH-105363) (#105416)
Miss Islington (bot) [Wed, 7 Jun 2023 00:51:16 +0000 (17:51 -0700)] 
[3.12] gh-105286: Further improvements to `typing.py` docstrings (GH-105363) (#105416)

gh-105286: Further improvements to `typing.py` docstrings (GH-105363)
(cherry picked from commit 9a89f1bf1e7bb819fe7240be779c99a84f47ea46)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years agoMerge branch '3.12' of https://github.com/python/cpython into 3.12
Thomas Wouters [Tue, 6 Jun 2023 19:47:00 +0000 (21:47 +0200)] 
Merge branch '3.12' of https://github.com/python/cpython into 3.12

2 years agoPost 3.12.0b2
Thomas Wouters [Tue, 6 Jun 2023 19:46:44 +0000 (21:46 +0200)] 
Post 3.12.0b2

2 years agogh-92658: Fix typo in docs and tests for `HV_GUID_PARENT` (GH-105267)
Miss Islington (bot) [Tue, 6 Jun 2023 19:27:10 +0000 (12:27 -0700)] 
gh-92658: Fix typo in docs and tests for `HV_GUID_PARENT` (GH-105267)

(cherry picked from commit 3907de12b57b14f674cdcc80ae64350a23af53a0)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.12] sliding_window() recipe: Raise ValueError for non-positive window sizes....
Miss Islington (bot) [Tue, 6 Jun 2023 19:00:17 +0000 (12:00 -0700)] 
[3.12] sliding_window() recipe:  Raise ValueError for non-positive window sizes.  Add more tests. (GH-105403) (GH-105405)

2 years ago[3.12] gh-94172: Update keyfile removal documentation (GH-105392) (#105402)
Miss Islington (bot) [Tue, 6 Jun 2023 18:14:55 +0000 (11:14 -0700)] 
[3.12] gh-94172: Update keyfile removal documentation (GH-105392) (#105402)

gh-94172: Update keyfile removal documentation (GH-105392)

Remove the "deprecated:: 3.6" markup, since the parameters (like
keyfile and certfile) got removed in Python 3.12.
(cherry picked from commit 2b8e6e5712a83657333948bc387c81db02549b13)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.12] gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763) (#105352)
Victor Stinner [Tue, 6 Jun 2023 14:22:04 +0000 (16:22 +0200)] 
[3.12] gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763) (#105352)

gh-102304: Fix Py_INCREF() stable ABI in debug mode (#104763)

When Python is built in debug mode (if the Py_REF_DEBUG macro is
defined), the Py_INCREF() and Py_DECREF() function are now always
implemented as opaque functions to avoid leaking implementation
details like the "_Py_RefTotal" variable or the
_Py_DecRefTotal_DO_NOT_USE_THIS() function.

* Remove _Py_IncRefTotal_DO_NOT_USE_THIS() and
  _Py_DecRefTotal_DO_NOT_USE_THIS() from the stable ABI.
* Remove _Py_NegativeRefcount() from limited C API.

(cherry picked from commit 92022d8416d9e175800b65c4d71d4e4fb47adcb0)

2 years agoPython 3.12.0b2 v3.12.0b2
Thomas Wouters [Tue, 6 Jun 2023 14:12:06 +0000 (16:12 +0200)] 
Python 3.12.0b2

2 years ago[3.12] GH-105162: Account for `INSTRUMENTED_RESUME` in gen.close/throw. (GH-105187...
Miss Islington (bot) [Tue, 6 Jun 2023 14:06:44 +0000 (07:06 -0700)] 
[3.12] GH-105162: Account for `INSTRUMENTED_RESUME` in gen.close/throw. (GH-105187) (#105378)

GH-105162: Account for `INSTRUMENTED_RESUME` in gen.close/throw. (GH-105187)
(cherry picked from commit 601ae09f0c8eda213b9050892f5ce9b91f0aa522)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2 years ago[3.12] gh-104411: Update test_getint for Tcl 9.0 (GH-104412) (#105356)
Miss Islington (bot) [Tue, 6 Jun 2023 14:04:07 +0000 (07:04 -0700)] 
[3.12] gh-104411: Update test_getint for Tcl 9.0 (GH-104412) (#105356)

gh-104411: Update test_getint for Tcl 9.0 (GH-104412)
(cherry picked from commit 2c49c759e880a32539f50c31dbd35d2bc4b4e030)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2 years ago[3.12] gh-104399: Use newer libtommath APIs when necessary (GH-104407) (#105343)
Miss Islington (bot) [Tue, 6 Jun 2023 14:01:28 +0000 (07:01 -0700)] 
[3.12] gh-104399: Use newer libtommath APIs when necessary (GH-104407) (#105343)

gh-104399: Use newer libtommath APIs when necessary (GH-104407)
(cherry picked from commit 00d73caf804c0474980e471347d6385757af975f)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2 years ago[3.12] gh-102304: doc: Add links to Stable ABI and Limited C API (#105345) (#105371)
Victor Stinner [Tue, 6 Jun 2023 13:11:28 +0000 (15:11 +0200)] 
[3.12] gh-102304: doc: Add links to Stable ABI and Limited C API (#105345) (#105371)

* gh-102304: doc: Add links to Stable ABI and Limited C API (#105345)

* Add "limited-c-api" and "stable-api" references.
* Rename "stable-abi-list" reference to "limited-api-list".
* Makefile: Document files regenerated by "make regen-limited-abi"
* Remove first empty line in generated files:

  - Lib/test/test_stable_abi_ctypes.py
  - PC/python3dll.c

(cherry picked from commit bae415ad02c79cf3a2eec4aa6969221a12e6716f)

* gh-102304: Fix up Simple ABI doc (GH-105351)

(cherry picked from commit 0202aa002e06acef9aa55ace0d939103df19cadd)

2 years ago[3.12] gh-105259: Ensure we don't show newline characters for trailing NEWLINE tokens...
Miss Islington (bot) [Tue, 6 Jun 2023 12:47:45 +0000 (05:47 -0700)] 
[3.12] gh-105259: Ensure we don't show newline characters for trailing NEWLINE tokens (GH-105364) (#105367)

2 years ago[3.12] gh-90005: Don't link with libbsd if not needed (#105236) (#105360)
Erlend E. Aasland [Tue, 6 Jun 2023 10:58:13 +0000 (12:58 +0200)] 
[3.12] gh-90005: Don't link with libbsd if not needed (#105236) (#105360)

The regression was introduced with commit 5b946cada.
Restore pre gh-29696 behaviour.

2 years ago[3.12] gh-105324: Fix tokenize module main function for stdin (GH-105325) (#105330)
Miss Islington (bot) [Mon, 5 Jun 2023 19:44:20 +0000 (12:44 -0700)] 
[3.12] gh-105324: Fix tokenize module main function for stdin (GH-105325) (#105330)

2 years ago[3.12] gh-89412: Add missing attributes (added in 3.10) to traceback module docs...
Miss Islington (bot) [Mon, 5 Jun 2023 17:02:14 +0000 (10:02 -0700)] 
[3.12] gh-89412: Add missing attributes (added in 3.10) to traceback module docs (GH-105046) (#105327)

(cherry picked from commit a4f72fa39a9d391c7b931ba1906d81da4ae01949)

Co-authored-by: Jakub Kuczys <me@jacken.men>
2 years ago[3.12] gh-97908: CAPI docs: Remove repeated struct names from member docs (GH-100054...
Miss Islington (bot) [Mon, 5 Jun 2023 16:24:12 +0000 (09:24 -0700)] 
[3.12] gh-97908: CAPI docs: Remove repeated struct names from member docs (GH-100054) (#105057)

And add raw HTML fragments to keep old links working.
(cherry picked from commit 1668b41dc477bc9562e4c50ab36a232839b4621b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 years ago[3.12] What's New in 3.12: List 'Improved Modules' alphabetically (GH-105315) (#105321)
Hugo van Kemenade [Mon, 5 Jun 2023 15:28:03 +0000 (18:28 +0300)] 
[3.12] What's New in 3.12: List 'Improved Modules' alphabetically (GH-105315) (#105321)

2 years ago[3.12] Clarify that error messages are better with PEP 701 (GH-105150) (#105169)
Miss Islington (bot) [Mon, 5 Jun 2023 15:09:11 +0000 (08:09 -0700)] 
[3.12] Clarify that error messages are better with PEP 701 (GH-105150) (#105169)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
2 years ago[3.12] gh-105286: Improve `typing.py` docstrings (#105287) (#105319)
Alex Waygood [Mon, 5 Jun 2023 15:05:21 +0000 (16:05 +0100)] 
[3.12] gh-105286: Improve `typing.py` docstrings (#105287) (#105319)

gh-105286: Improve `typing.py` docstrings (#105287)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.12] gh-105280: Ensure `isinstance([], collections.abc.Mapping)` always evaluates...
Miss Islington (bot) [Mon, 5 Jun 2023 14:51:26 +0000 (07:51 -0700)] 
[3.12] gh-105280: Ensure `isinstance([], collections.abc.Mapping)` always evaluates to `False` (GH-105281) (#105318)

gh-105280: Ensure `isinstance([], collections.abc.Mapping)` always evaluates to `False` (GH-105281)
(cherry picked from commit 08756dbba647440803d2ba4545ba0ab2f0cdfe1c)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-105237: Allow calling `issubclass(X, typing.Protocol)` again (GH-105239...
Miss Islington (bot) [Mon, 5 Jun 2023 14:06:25 +0000 (07:06 -0700)] 
[3.12] gh-105237: Allow calling `issubclass(X, typing.Protocol)` again (GH-105239) (#105316)

gh-105237: Allow calling `issubclass(X, typing.Protocol)` again (GH-105239)
(cherry picked from commit cdfb201bfa35b7c50de5099c6d9078c806851d98)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-105164: Detect annotations inside match blocks (GH-105177) (#105313)
Miss Islington (bot) [Mon, 5 Jun 2023 13:42:31 +0000 (06:42 -0700)] 
[3.12] gh-105164: Detect annotations inside match blocks (GH-105177) (#105313)

(cherry picked from commit 69d1245685cf95ddc678633e978a56673da64865)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.12] gh-98963: Restore the ability to have a dict-less property. (GH-105262) (...
Miss Islington (bot) [Mon, 5 Jun 2023 03:45:12 +0000 (20:45 -0700)] 
[3.12] gh-98963: Restore the ability to have a dict-less property. (GH-105262) (#105297)

gh-98963: Restore the ability to have a dict-less property. (GH-105262)

Ignore doc string assignment failures in `property` as has been the
behavior of all past Python releases.  (the docstring is discarded)
(cherry picked from commit 418befd75d4d0d1cba83d8b81e1a7bcc9a65be8e)

This fixes a behavior regression in 3.12beta1 where an AttributeError was being raised in a situation it has never been in the past. It keeps the existing unusual single situation where AttributeError does get raised.

Existing widely deployed projects depend on this not raising an exception.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.12] gh-104882: Docs: fix description of relationship between `socket.getblocking...
Miss Islington (bot) [Sun, 4 Jun 2023 16:07:59 +0000 (09:07 -0700)] 
[3.12] gh-104882: Docs: fix description of relationship between `socket.getblocking()` and `socket.gettimeout()` (GH-105026) (#105283)

gh-104882: Docs: fix description of relationship between `socket.getblocking()` and `socket.gettimeout()` (GH-105026)
(cherry picked from commit 5a5ed7a3e616a372f054a1dd2e9a31ba32a87a67)

Co-authored-by: Joe Geisbauer <joegeisbauer@gmail.com>
2 years ago[3.12] Fix typo in Python 3.12 What's New (GH-105278) (#105282)
Miss Islington (bot) [Sun, 4 Jun 2023 15:50:27 +0000 (08:50 -0700)] 
[3.12] Fix typo in Python 3.12 What's New (GH-105278) (#105282)

Fix typo in Python 3.12 What's New (GH-105278)
(cherry picked from commit 9a90c9ace2ed878715107bf4ae39e5967d7c931f)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2 years ago[3.12] gh-104690 Disallow thread creation and fork at interpreter finalization (GH...
Miss Islington (bot) [Sun, 4 Jun 2023 04:32:00 +0000 (21:32 -0700)] 
[3.12] gh-104690 Disallow thread creation and fork at interpreter finalization (GH-104826) (#105277)

gh-104690 Disallow thread creation and fork at interpreter finalization (GH-104826)

Disallow thread creation and fork at interpreter finalization.

in the following functions, check if interpreter is finalizing and raise `RuntimeError` with appropriate message:
* `_thread.start_new_thread` and thus `threading`
* `posix.fork`
* `posix.fork1`
* `posix.forkpty`
* `_posixsubprocess.fork_exec` when a `preexec_fn=` is supplied.

---------

(cherry picked from commit ce558e69d4087dd3653207de78345fbb8a2c7835)

Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.12] gh-89415: Mention new `IP_*` constants in `socket` module in the docs (GH...
Miss Islington (bot) [Sat, 3 Jun 2023 15:29:18 +0000 (08:29 -0700)] 
[3.12] gh-89415: Mention new `IP_*` constants in `socket` module in the docs (GH-105266) (#105270)

gh-89415: Mention new `IP_*` constants in `socket` module in the docs (GH-105266)
(cherry picked from commit eaff9c39aa1a70d401521847cc35bec883ae9772)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.12] gh-105080: Fixed inconsistent signature on derived classes (GH-105217) (#105257)
Miss Islington (bot) [Fri, 2 Jun 2023 23:05:49 +0000 (16:05 -0700)] 
[3.12] gh-105080: Fixed inconsistent signature on derived classes (GH-105217) (#105257)

gh-105080: Fixed inconsistent signature on derived classes (GH-105217)
(cherry picked from commit 9ad199ba36791711f596393ca9a20dbf118ef858)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2 years ago[3.12] gh-104614: Fix potential ref. leak in _testcapimodule/get_basic_static_type...
Miss Islington (bot) [Fri, 2 Jun 2023 17:09:51 +0000 (10:09 -0700)] 
[3.12] gh-104614: Fix potential ref. leak in _testcapimodule/get_basic_static_type() (GH-105225) (#105248)

(cherry picked from commit e01b04c9075c6468ed57bc883693ec2a06a6dd8e)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years ago[3.12] gh-102778: update documentation of PyErr_PrintEx and traceback.print_last...
Miss Islington (bot) [Fri, 2 Jun 2023 16:04:22 +0000 (09:04 -0700)] 
[3.12] gh-102778: update documentation of PyErr_PrintEx and traceback.print_last() regarding sys.last_exc (GH-105190) (#105246)

gh-102778: update documentation of PyErr_PrintEx and traceback.print_last() regarding sys.last_exc (GH-105190)
(cherry picked from commit 0dafc785ee6629dbcb9bec6f7aee43a56cd0b26e)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 years ago[3.12] gh-105194: Fix format specifier escaped characters in f-strings (GH-105231...
Miss Islington (bot) [Fri, 2 Jun 2023 12:53:27 +0000 (05:53 -0700)] 
[3.12] gh-105194: Fix format specifier escaped characters in f-strings (GH-105231) (#105234)

2 years ago[3.12] gh-105184: document that marshal functions can fail and need to be checked...
Miss Islington (bot) [Fri, 2 Jun 2023 08:24:25 +0000 (01:24 -0700)] 
[3.12] gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185) (#105218)

gh-105184: document that marshal functions can fail and need to be checked with PyErr_Occurred (GH-105185)
(cherry picked from commit ee26ca13a129da8cf549409d0a1b2e892ff2b4ec)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>