]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years ago[3.12] Remove Sphinx problem matcher to avoid annotating unchanged files (GH-108005...
Miss Islington (bot) [Wed, 16 Aug 2023 23:18:01 +0000 (16:18 -0700)] 
[3.12] Remove Sphinx problem matcher to avoid annotating unchanged files (GH-108005) (#108049)

Remove Sphinx problem matcher to avoid annotating unchanged files (GH-108005)
(cherry picked from commit 0d7f5d3ba3641f8c7d32facbb177bf70ee7520d1)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.12] GH-92584: Drop reference to Distutils in ``site.USER_BASE`` (GH-108031) (...
Miss Islington (bot) [Wed, 16 Aug 2023 23:17:23 +0000 (16:17 -0700)] 
[3.12] GH-92584: Drop reference to Distutils in ``site.USER_BASE`` (GH-108031) (#108039)

GH-92584: Drop reference to Distutils in ``site.USER_BASE`` (GH-108031)

Drop reference to Distutils in ``site.USER_BASE``
(cherry picked from commit f2a9dfdee9de381e4adf29a7f1e2aec56580bfda)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.12] gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688) (#107709)
Miss Islington (bot) [Wed, 16 Aug 2023 12:32:04 +0000 (05:32 -0700)] 
[3.12] gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688) (#107709)

gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688)

In future Tcl and Tk versions can be desynchronized.
(cherry picked from commit 3c8e8f3ceeae08fc43d885f5a4c65a3ee4b1a2c8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.12] Docs: Fix more Sphinx annotations in ctypes.rst (GH-107708) (#107717)
Miss Islington (bot) [Wed, 16 Aug 2023 12:30:58 +0000 (05:30 -0700)] 
[3.12] Docs: Fix more Sphinx annotations in ctypes.rst (GH-107708) (#107717)

Docs: Fix more Sphinx annotations in ctypes.rst (GH-107708)
(cherry picked from commit 8c9af6b9a0d6fc9cb237e96588d8dcab727e32b8)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.12] gh-100814: Fix exception for invalid callable value of Tkinter image option...
Miss Islington (bot) [Wed, 16 Aug 2023 12:30:31 +0000 (05:30 -0700)] 
[3.12] gh-100814: Fix exception for invalid callable value of Tkinter image option (GH-107692) (#107722)

gh-100814: Fix exception for invalid callable value of Tkinter image option (GH-107692)

Passing a callable object as an option value to a Tkinter image now raises
the expected TclError instead of an AttributeError.
(cherry picked from commit 50e3cc9748eb2103eb7ed6cc5a74d177df3cfb13)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.12] gh-107715: Escape class name in regular expression (GH-107716) (#107726)
Miss Islington (bot) [Wed, 16 Aug 2023 12:29:42 +0000 (05:29 -0700)] 
[3.12] gh-107715: Escape class name in regular expression (GH-107716) (#107726)

* gh-107715: Escape class name in regular expression (GH-107716)

This patch escapes the class name before embedding it in the regular expression
for `pat` in `doctest.DocTestFinder._find_lineno`. While class names do not
ordinarily contain special characters, it is possible to encounter these when a
class is created dynamically. Escaping the name will correctly return `None` in
this scenario, rather than potentially matching a different class or raising
`re.error` depending on the symbols used.
(cherry picked from commit 85793278793708ad6b7132a54ac9fb4b2c5bcac1)

Co-authored-by: Gertjan van Zwieten <git@gjvz.nl>
* Update 2023-08-07-14-12-07.gh-issue-107715.238r2f.rst

---------

Co-authored-by: Gertjan van Zwieten <git@gjvz.nl>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.12] gh-107178: Add the C API tests for the Abstract Objects Layer (GH-107179)...
Serhiy Storchaka [Wed, 16 Aug 2023 12:29:08 +0000 (15:29 +0300)] 
[3.12] gh-107178: Add the C API tests for the Abstract Objects Layer (GH-107179) (#107728)

Cover all the Mapping Protocol, almost all the Sequence Protocol
(except PySequence_Fast) and a part of the Object Protocol.

Move existing tests to Lib/test/test_capi/test_abstract.py and
Modules/_testcapi/abstract.c.

Add also tests for PyDict C API..
(cherry picked from commit 16c9415fba4972743f1944ebc44946e475e68bc4)

2 years ago[3.12] gh-107735: Add C API tests for PySys_GetObject() and PySys_SetObject() (GH...
Serhiy Storchaka [Wed, 16 Aug 2023 12:28:14 +0000 (15:28 +0300)] 
[3.12] gh-107735: Add C API tests for PySys_GetObject() and PySys_SetObject() (GH-107736) (#107740)

[3.12] gh-107735: Add C API tests for PySys_GetObject() and PySys_SetObject() (GH-107736).
(cherry picked from commit bea5f93196d213d6fbf4ba8984caf4c3cd1da882)

2 years ago[3.12] gh-86457: Fix signature for code.replace() (GH-23199) (#107744)
Serhiy Storchaka [Wed, 16 Aug 2023 12:27:32 +0000 (15:27 +0300)] 
[3.12] gh-86457: Fix signature for code.replace() (GH-23199) (#107744)

* [3.12] gh-86457: Fix signature for code.replace() (GH-23199)

Also add support of @text_signature in Argument Clinic..
(cherry picked from commit 0e6e32fb84b2f7cb668e0b9927637587081e38cd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Update 2023-08-07-16-30-48.gh-issue-95065.-im4R5.rst

2 years ago[3.12] README: remove unmaintained sections (GH-107703) (#107762)
Miss Islington (bot) [Wed, 16 Aug 2023 12:25:18 +0000 (05:25 -0700)] 
[3.12] README: remove unmaintained sections (GH-107703) (#107762)

README: remove unmaintained sections (GH-107703)
(cherry picked from commit 7a250fdc16bb6f1fe0a6b0df8bb502870405b5d6)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2 years ago[3.12] gh-91795: Update build optimization part of PCbuild/readme.txt (GH-91849)...
Miss Islington (bot) [Wed, 16 Aug 2023 12:24:47 +0000 (05:24 -0700)] 
[3.12] gh-91795: Update build optimization part of PCbuild/readme.txt (GH-91849) (#107776)

gh-91795: Update build optimization part of PCbuild/readme.txt (GH-91849)
(cherry picked from commit 906b73be5eada1995bd667a02c59f7a11998310f)

Co-authored-by: Fatih <77548106+fatihkabakk@users.noreply.github.com>
2 years ago[3.12] More actionable error message when spawn is incorrectly used. (GH-102203)...
Miss Islington (bot) [Wed, 16 Aug 2023 12:22:22 +0000 (05:22 -0700)] 
[3.12] More actionable error message when spawn is incorrectly used. (GH-102203) (#107990)

More actionable error message when spawn is incorrectly used. (GH-102203)
(cherry picked from commit a794ebeb028f7ef287c780d3890f816db9c21c51)

Co-authored-by: Yuxin Wu <ppwwyyxxc@gmail.com>
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2 years ago[3.12] gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior...
Miss Islington (bot) [Wed, 16 Aug 2023 12:21:57 +0000 (05:21 -0700)] 
[3.12] gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802) (#107998)

gh-99203: shutil.make_archive(): restore select CPython <= 3.10.5 behavior (GH-99802)

Restore following CPython <= 3.10.5 behavior of shutil.make_archive()
that went away as part of gh-93160:

Do not create an empty archive if root_dir is not a directory, and, in
that case, raise FileNotFoundError or NotADirectoryError regardless
of format choice. Beyond the brought-back behavior, the function may
now also raise these exceptions in dry_run mode.
(cherry picked from commit a86df298df5b02e2d69ea6879e9ed10a7adb85d0)

Co-authored-by: 6t8k <58048945+6t8k@users.noreply.github.com>
2 years ago[3.12] gh-106300: Improve errors testing in test_unittest.test_runner (GH-106737...
Miss Islington (bot) [Wed, 16 Aug 2023 10:13:35 +0000 (03:13 -0700)] 
[3.12] gh-106300: Improve errors testing in test_unittest.test_runner (GH-106737) (#108006)

gh-106300: Improve errors testing in test_unittest.test_runner (GH-106737)

Use a custom exception to prevent unintentional silence of actual errors.
(cherry picked from commit fd9d70a94de5b0756b52b9ae21e236e25545db4f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years ago[3.12] gh-106844: Fix issues in _winapi.LCMapStringEx (GH-107832) (#107874)
Serhiy Storchaka [Wed, 16 Aug 2023 10:10:42 +0000 (13:10 +0300)] 
[3.12] gh-106844: Fix issues in _winapi.LCMapStringEx (GH-107832) (#107874)

* Strings with length from 2**31-1 to 2**32-2 always caused MemoryError,
   it doesn't matter how much memory is available.
* Strings with length exactly 2**32-1 caused OSError.
* Strings longer than 2**32-1 characters were truncated due to integer overflow bug.
* Strings containing the null character were truncated at the first null character.

Now strings longer than 2**31-1 characters caused OverflowError and the null character is allowed..
(cherry picked from commit 04cc01453db2f0af72a06440831637f8bf512daf)

2 years ago[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (#107751)
Eric Snow [Wed, 16 Aug 2023 10:03:05 +0000 (04:03 -0600)] 
[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (#107751)

* Unrevert "[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567) (#107599)".

This reverts commit 6e4eec760648a71e1cd8f8f551997b1823b4bb9f (gh-107648).

* Initialize each interpreter's refchain properly.

* Skip test_basic_multiple_interpreters_deleted_no_reset on tracerefs builds.

2 years ago[3.12] gh-100061: Proper fix of the bug in the matching of possessive quantifiers...
Serhiy Storchaka [Wed, 16 Aug 2023 10:00:55 +0000 (13:00 +0300)] 
[3.12] gh-100061: Proper fix of the bug in the matching of possessive quantifiers (GH-102612) (#108003)

Restore the global Input Stream pointer after trying to match a sub-pattern.

.
(cherry picked from commit abd9cc52d94b8e2835322b62c29f09bb0e6fcfe9)

Co-authored-by: SKO <41810398+uyw4687@users.noreply.github.com>
2 years ago[3.12] gh-91051: fix segfault when using all 8 type watchers (GH-107853) (#107876)
Miss Islington (bot) [Wed, 16 Aug 2023 09:58:54 +0000 (02:58 -0700)] 
[3.12] gh-91051: fix segfault when using all 8 type watchers (GH-107853) (#107876)

* gh-91051: fix segfault when using all 8 type watchers (GH-107853)
(cherry picked from commit 66e4edd7346b1cd65ddff6da890a0d725e325116)

Co-authored-by: Carl Meyer <carl@oddbird.net>
2 years ago[3.12] gh-107963: Fix set_forkserver_preload to check the type of given list (GH...
Miss Islington (bot) [Tue, 15 Aug 2023 14:56:53 +0000 (07:56 -0700)] 
[3.12] gh-107963: Fix set_forkserver_preload to check the type of given list (GH-107965) (#107975)

gh-107963: Fix set_forkserver_preload to check the type of given list (GH-107965)
(cherry picked from commit 6515ec3d3d5acd3d0b99c88794bdec09f0831e5b)

gh-107963: Fix set_forkserver_preload to check the type of given list

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2 years ago[3.12] gh-107967: Fix infinite recursion on invalid escape sequence warning (GH-10796...
Miss Islington (bot) [Tue, 15 Aug 2023 12:41:55 +0000 (05:41 -0700)] 
[3.12] gh-107967: Fix infinite recursion on invalid escape sequence warning (GH-107968) (#107970)

gh-107967: Fix infinite recursion on invalid escape sequence warning (GH-107968)
(cherry picked from commit d66bc9e8a7a8d6774d912a4b9d151885c4d8de1d)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2 years ago[3.12] Add another example to the statistics docs (GH-107904) (#107941)
Miss Islington (bot) [Mon, 14 Aug 2023 14:58:54 +0000 (07:58 -0700)] 
[3.12] Add another example to the statistics docs (GH-107904) (#107941)

Add another example to the statistics docs (GH-107904)
(cherry picked from commit 2b6dc2accc315ce279d259ed39e058a225068531)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2 years ago[3.12] gh-107877: Update logging levels reference table with usage criteria. (GH...
Miss Islington (bot) [Mon, 14 Aug 2023 12:40:47 +0000 (05:40 -0700)] 
[3.12] gh-107877: Update logging levels reference table with usage criteria. (GH-107894) (#107922)

gh-107877: Update logging levels reference table with usage criteria. (GH-107894)
(cherry picked from commit cc2cf85d03cf29994a707aae5cc9a349a4165b84)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-107891: Fix typo in 3.12 whatsnew (GH-107892) (#107893)
Miss Islington (bot) [Mon, 14 Aug 2023 12:39:30 +0000 (05:39 -0700)] 
[3.12] gh-107891: Fix typo in 3.12 whatsnew  (GH-107892) (#107893)

gh-107891: Fix typo in 3.12 whatsnew  (GH-107892)
(cherry picked from commit 2e1f688fe0f0a612e54c09f5a7027a834dd8b8d5)

Co-authored-by: wookie184 <wookie1840@gmail.com>
2 years ago[3.12] Docs: Document PyBUF_MAX_NDIM (GH-107865) (#107871)
Miss Islington (bot) [Fri, 11 Aug 2023 20:29:57 +0000 (13:29 -0700)] 
[3.12] Docs: Document PyBUF_MAX_NDIM (GH-107865) (#107871)

Docs: Document PyBUF_MAX_NDIM (GH-107865)
(cherry picked from commit 637f7ff2c60f262659da0334f1cb672bd361f398)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.12] gh-91054: make code watcher tests resilient to other watchers (GH-107821)...
Miss Islington (bot) [Fri, 11 Aug 2023 14:13:14 +0000 (07:13 -0700)] 
[3.12] gh-91054: make code watcher tests resilient to other watchers (GH-107821) (#107835)

gh-91054: make code watcher tests resilient to other watchers (GH-107821)
(cherry picked from commit 2ec16fed14aae896e38dd5bd9e73e2eddc974439)

Co-authored-by: Carl Meyer <carl@oddbird.net>
2 years ago[3.12] gh-107810: Improve DeprecationWarning for metaclasses with custom tp_new ...
Miss Islington (bot) [Fri, 11 Aug 2023 14:12:50 +0000 (07:12 -0700)] 
[3.12] gh-107810: Improve DeprecationWarning for metaclasses with custom tp_new (GH-107834) (#107864)

gh-107810: Improve DeprecationWarning for metaclasses with custom tp_new (GH-107834)

(cherry picked from commit 16dcce21768ba381996a88ac8c255bf1490b3680)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2 years ago[3.12] Fix the long64 reader in umarshal.py (GH-107828) (#107849)
Miss Islington (bot) [Fri, 11 Aug 2023 09:59:45 +0000 (02:59 -0700)] 
[3.12] Fix the long64 reader in umarshal.py (GH-107828) (#107849)

Fix the long64 reader in umarshal.py (GH-107828)
(cherry picked from commit 50bbc56009ae7303d2482f28eb62f2603664b58f)

Co-authored-by: Martin DeMello <martindemello@gmail.com>
2 years ago[3.12] GH-107774: Add missing audit event for PEP 669 (GH-107775) (#107839)
Miss Islington (bot) [Fri, 11 Aug 2023 09:58:58 +0000 (02:58 -0700)] 
[3.12] GH-107774: Add missing audit event for PEP 669 (GH-107775) (#107839)

GH-107774: Add missing audit event for PEP 669 (GH-107775)
(cherry picked from commit 494e3d4436774a5ac1a569a635b8c5c881ef1c0c)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2 years ago[3.12] GH-107724: Fix the signature of `PY_THROW` callback functions. (GH-107725...
Miss Islington (bot) [Fri, 11 Aug 2023 09:58:27 +0000 (02:58 -0700)] 
[3.12] GH-107724: Fix the signature of `PY_THROW` callback functions. (GH-107725) (#107802)

GH-107724: Fix the signature of `PY_THROW` callback functions. (GH-107725)
(cherry picked from commit 52fbcf61b5a70993c2d32332ff0ad9f369d968d3)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2 years ago[3.12] GH-106684: Close `asyncio.StreamWriter` when `asyncio.StreamWriter` is not...
Miss Islington (bot) [Thu, 10 Aug 2023 09:24:22 +0000 (02:24 -0700)] 
[3.12] GH-106684:  Close `asyncio.StreamWriter` when `asyncio.StreamWriter` is not closed by application (GH-107650) (#107656)

GH-106684: raise `ResourceWarning` when `asyncio.StreamWriter` is not closed (GH-107650)
(cherry picked from commit 41178e41995992bbe417f94bce158de93f9e3188)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2 years ago[3.12] gh-107814: Avoid output from Nuget installation in find_python.bat (GH-107815...
Miss Islington (bot) [Thu, 10 Aug 2023 09:19:14 +0000 (02:19 -0700)] 
[3.12] gh-107814: Avoid output from Nuget installation in find_python.bat (GH-107815) (#107823)

gh-107814: Avoid output from Nuget installation in find_python.bat (GH-107815)
(cherry picked from commit 1e229e2c3d212accbd5fbe3a46cd42f8252b2868)

Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
2 years ago[3.12] gh-106052: Fix bug in the matching of possessive quantifiers (GH-106515) ...
Serhiy Storchaka [Wed, 9 Aug 2023 10:26:51 +0000 (13:26 +0300)] 
[3.12] gh-106052: Fix bug in the matching of possessive quantifiers (GH-106515) (#107796)

[3.12] gh-106052: Fix bug in the matching of possessive quantifiers (gh-106515)

It did not work in the case of a subpattern containing backtracking.

Temporary implement possessive quantifiers as equivalent greedy qualifiers
in atomic groups..
(cherry picked from commit 7b6e34e5baeb4162815ffa4d943b09a58e3f6580)

2 years ago[3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752)
Miss Islington (bot) [Tue, 8 Aug 2023 14:25:35 +0000 (07:25 -0700)] 
[3.12] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552) (#107752)

* gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)

PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts.  In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.

This change updates the documentation to reflect that perspective.  It also updates the docs relative to immortal objects in a handful of places.
(cherry picked from commit 5dc825d504ad08d64c9d1ce578f9deebbe012604)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* Fix a typo.

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-107442: Document all valid types for ctypes _as_parameter_ (GH-107443)... 107737/head
Miss Islington (bot) [Mon, 7 Aug 2023 12:33:25 +0000 (05:33 -0700)] 
[3.12] gh-107442: Document all valid types for ctypes _as_parameter_ (GH-107443) (#107707)

gh-107442: Document all valid types for ctypes _as_parameter_ (GH-107443)
(cherry picked from commit 6925c578a0e3cbb00858e64da813a7ffe79623c4)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2 years ago[3.12] Docs: Argument Clinic: Move the CConverter class to the reference (GH-107671...
Miss Islington (bot) [Mon, 7 Aug 2023 10:03:07 +0000 (03:03 -0700)] 
[3.12] Docs: Argument Clinic: Move the CConverter class to the reference (GH-107671) (#107701)

Docs: Argument Clinic: Move the CConverter class to the reference (GH-107671)
(cherry picked from commit a6675b1a597c67be972598ac8562883fabe48099)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.12] Improve cross-references in `runpy` docs (GH-107673) (#107698)
Miss Islington (bot) [Sun, 6 Aug 2023 22:48:48 +0000 (15:48 -0700)] 
[3.12] Improve cross-references in `runpy` docs (GH-107673) (#107698)

Improve cross-references in `runpy` docs (GH-107673)

- Add links to `__main__` and `sys.path` where appropriate
- Ensure each paragraph never has more than one link to the same thing, to avoid visual clutter from too many links
(cherry picked from commit 4e242d1ffb2d165443fe2680f7d1fef9fecbcfc0)

Co-authored-by: Kamil Turek <kamil.turek@hotmail.com>
2 years ago[3.12] Docs: Argument Clinic: Improve 'How to write a custom converter' (GH-107328...
Miss Islington (bot) [Sun, 6 Aug 2023 20:09:00 +0000 (13:09 -0700)] 
[3.12] Docs: Argument Clinic: Improve 'How to write a custom converter' (GH-107328) (#107669)

Docs: Argument Clinic: Improve 'How to write a custom converter' (GH-107328)

- Omit unneccesary wording and sentences
- Don't mention implementation details (no digression, explanation)

(cherry picked from commit 4a5b4221e381c541f3f73537b7b87580d100158b)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2 years ago[3.12] Docs: Fix Sphinx annotations in Doc/library/ctypes.rst (GH-107672) (#107685)
Miss Islington (bot) [Sun, 6 Aug 2023 20:08:38 +0000 (13:08 -0700)] 
[3.12] Docs: Fix Sphinx annotations in Doc/library/ctypes.rst (GH-107672) (#107685)

Docs: Fix Sphinx annotations in Doc/library/ctypes.rst (GH-107672)
(cherry picked from commit 71a7c96ffeb0d7fef06be3e57468896e030967a5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.12] GH-84435: Make pyspecific directives translatable (GH-19470) (#107681)
Miss Islington (bot) [Sun, 6 Aug 2023 14:17:45 +0000 (07:17 -0700)] 
[3.12] GH-84435: Make pyspecific directives translatable (GH-19470) (#107681)

GH-84435: Make pyspecific directives translatable (GH-19470)
(cherry picked from commit ecb05e0b9842ba03b42b4dec8767b1c18a4e28b3)

Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2 years ago[3.12] Do not use deprecated ``logger.warn()`` in pyspecific (GH-107694) (#107695)
Miss Islington (bot) [Sun, 6 Aug 2023 14:17:20 +0000 (07:17 -0700)] 
[3.12] Do not use deprecated ``logger.warn()`` in pyspecific (GH-107694) (#107695)

Do not use deprecated ``logger.warn()`` in pyspecific (GH-107694)
(cherry picked from commit 9564e31cbc95a723f2414537231bc4611b56644f)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 years ago[3.12] Docs: skip python-docs-theme 2023.7 to fix mobile menu (GH-107666) (#107690)
Miss Islington (bot) [Sun, 6 Aug 2023 13:15:39 +0000 (06:15 -0700)] 
[3.12] Docs: skip python-docs-theme 2023.7 to fix mobile menu (GH-107666) (#107690)

Docs: skip python-docs-theme 2023.7 to fix mobile menu (GH-107666)
(cherry picked from commit 9641c4d8e2bdf9b00dd9f373d4a74dfad000afd1)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.12] gh-107662: Switch 'any' and 'anext' in functions.rst (GH-107663) (#107664)
Miss Islington (bot) [Sun, 6 Aug 2023 13:14:42 +0000 (06:14 -0700)] 
[3.12] gh-107662: Switch 'any' and 'anext' in functions.rst (GH-107663) (#107664)

gh-107662: Switch 'any' and 'anext' in functions.rst (GH-107663)

Order was reversed in index at top, not in body.
(cherry picked from commit 9ebc6ecbc336d7b17cd158d1a4522f832df3e6e2)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 years agoPost 3.12.0rc1
Thomas Wouters [Sun, 6 Aug 2023 12:50:13 +0000 (14:50 +0200)] 
Post 3.12.0rc1

2 years agoPython 3.12.0rc1 v3.12.0rc1
Thomas Wouters [Sat, 5 Aug 2023 12:10:03 +0000 (14:10 +0200)] 
Python 3.12.0rc1

2 years ago[3.12] gh-107432 Fix incorrect indentation in annotations HOWTO (GH-107445) (#107654)
Miss Islington (bot) [Sat, 5 Aug 2023 12:08:04 +0000 (05:08 -0700)] 
[3.12] gh-107432 Fix incorrect indentation in annotations HOWTO (GH-107445) (#107654)

gh-107432 Fix incorrect indentation in annotations HOWTO (GH-107445)

gh-107432 Fix incorrect indentation in annotations document

Body text in https://docs.python.org/3/howto/annotations.html was
indented throughout, and was being rendered in blockquote elements.
(cherry picked from commit 5e2746d6e2fb0da29225ead7135f078c5f087b57)

Co-authored-by: Daniele Procida <daniele@vurt.org>
2 years ago[3.12] gh-107630: Revert "[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated...
Eric Snow [Sat, 5 Aug 2023 11:44:54 +0000 (05:44 -0600)] 
[3.12] gh-107630: Revert "[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567) (#107599)" (#107648)

Revert "[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567) (#107599)"

This reverts commit 58af2293c52a1ad3754d254690c0e54f787c545b.

2 years ago[3.12] Docs: Only include Plausible for html, not for epub etc (GH-107637) (#107642)
Miss Islington (bot) [Fri, 4 Aug 2023 20:20:46 +0000 (13:20 -0700)] 
[3.12] Docs: Only include Plausible for html, not for epub etc (GH-107637) (#107642)

Docs: Only include Plausible for html, not for epub etc (GH-107637)

Only include Plausible for html, not for epub etc
(cherry picked from commit 904b5319b3cc72063f4bfcd7beb3a1ef0fc641be)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.12] Docs: upgrade to python-docs-theme 2023.7 (GH-107617) (#107633)
Hugo van Kemenade [Fri, 4 Aug 2023 20:20:20 +0000 (23:20 +0300)] 
[3.12] Docs: upgrade to python-docs-theme 2023.7 (GH-107617) (#107633)

(cherry picked from commit 19f32b24b2e1680ff9929bb64d681397b259c6fb)

2 years ago[3.12] Update the expected bytecode magic in test_importlib.test_util (#107626)
T. Wouters [Fri, 4 Aug 2023 13:41:03 +0000 (15:41 +0200)] 
[3.12] Update the expected bytecode magic in test_importlib.test_util (#107626)

Update the expected bytecode magic in test_importlib.test_util to the final
3.12 magic number. From now on it's not allowed to change for any 3.12
release.

2 years ago[3.12] GH-107263: Increase C stack limit for most functions, except `_PyEval_EvalFram...
Miss Islington (bot) [Fri, 4 Aug 2023 10:25:51 +0000 (03:25 -0700)] 
[3.12] GH-107263: Increase C stack limit for most functions, except `_PyEval_EvalFrameDefault()` (GH-107535) (#107618)

GH-107263: Increase C stack limit for most functions, except `_PyEval_EvalFrameDefault()` (GH-107535)

* Set C recursion limit to 1500, set cost of eval loop to 2 frames, and compiler mutliply to 2.
(cherry picked from commit fa45958450aa3489607daf9855ca0474a2a20878)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2 years ago[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567...
Miss Islington (bot) [Thu, 3 Aug 2023 22:18:29 +0000 (15:18 -0700)] 
[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567) (#107599)

gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters (gh-107567)

The linked list of objects was a global variable, which broke isolation between interpreters, causing crashes. To solve this, we've moved the linked list to each interpreter.
(cherry picked from commit 58ef74186795c56e3ec86e8c8f351a1d7826638a)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-107576: Ensure `__orig_bases__` are our own in `get_original_bases` (GH...
Miss Islington (bot) [Thu, 3 Aug 2023 15:07:43 +0000 (08:07 -0700)] 
[3.12] gh-107576: Ensure `__orig_bases__` are our own in `get_original_bases` (GH-107584) (#107592)

gh-107576: Ensure `__orig_bases__` are our own in `get_original_bases` (GH-107584)
(cherry picked from commit ed4a978449c856372d1a7cd389f91cafe2581c87)

Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
Co-authored-by: Chris Bouchard <chris@upliftinglemma.net>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-107077: Raise SSLCertVerificationError even if the error is set via SSL_ERR...
Miss Islington (bot) [Thu, 3 Aug 2023 14:09:29 +0000 (07:09 -0700)] 
[3.12] gh-107077: Raise SSLCertVerificationError even if the error is set via SSL_ERROR_SYSCALL (GH-107586) (#107587)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
2 years ago[3.12] gh-107471: Fix Refleaks in test_import (gh-107569) (#107571)
Miss Islington (bot) [Wed, 2 Aug 2023 21:23:15 +0000 (14:23 -0700)] 
[3.12] gh-107471: Fix Refleaks in test_import (gh-107569) (#107571)

gh-107471: Fix Refleaks in test_import (gh-107569)

gh-107184 introduced a refleak in test_import.SubinterpImportTests (specifically test_singlephase_check_with_setting_and_override and test_single_init_extension_compat).  We fix it here by making sure _testsinglephase is removed from sys.modules whenever we clear the runtime's internal state for the module.

The underlying problem is strictly contained in the internal function _PyImport_ClearExtension() (AKA _testinternalcapi.clear_extension()), which is only used in tests.

(This also fixes an intermittent segfault introduced in the same place, in test_disallowed_reimport.)
(cherry picked from commit 017f047183fa33743f7e36c5c360f5c670032be3)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] Clarify `Self` interaction with subclasses (GH-107511) (#107548)
Miss Islington (bot) [Tue, 1 Aug 2023 23:52:28 +0000 (16:52 -0700)] 
[3.12] Clarify `Self` interaction with subclasses (GH-107511) (#107548)

Clarify `Self` interaction with subclasses (GH-107511)
(cherry picked from commit c8872f4285d3b61c252e3384bec6d30618b7d698)

Co-authored-by: Alexandru Mărășteanu <alexei@users.noreply.github.com>
2 years ago[3.12] gh-106092: Fix use-after-free crash in frame_dealloc (GH-106875) (#107532)
Miss Islington (bot) [Tue, 1 Aug 2023 10:42:55 +0000 (03:42 -0700)] 
[3.12] gh-106092: Fix use-after-free crash in frame_dealloc (GH-106875) (#107532)

gh-106092: Fix use-after-free crash in frame_dealloc (GH-106875)

It was possible for the trashcan to delay the deallocation of a
PyFrameObject until after its corresponding _PyInterpreterFrame has
already been freed.  So frame_dealloc needs to avoid dereferencing the
f_frame pointer unless it first checks that the pointer still points
to the interpreter frame within the frame object.

(cherry picked from commit 557b05c7a5334de5da3dc94c108c0121f10b9191)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Co-authored-by: Anders Kaseorg <andersk@mit.edu>
2 years ago[3.12] gh-105766: Document that Custom Allocators Must Be Thread-Safe (gh-107519...
Miss Islington (bot) [Mon, 31 Jul 2023 23:25:18 +0000 (16:25 -0700)] 
[3.12] gh-105766: Document that Custom Allocators Must Be Thread-Safe (gh-107519) (gh-107522)

gh-105766: Document that Custom Allocators Must Be Thread-Safe (gh-107519)
(cherry picked from commit db361a340af3970c279908c8746a6b9ed45f47b8)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-99113: Add a What's New Entry for PEP 684 (gh-107520) (gh-107523)
Miss Islington (bot) [Mon, 31 Jul 2023 23:24:45 +0000 (16:24 -0700)] 
[3.12] gh-99113: Add a What's New Entry for PEP 684 (gh-107520) (gh-107523)

gh-99113: Add a What's New Entry for PEP 684 (gh-107520)
(cherry picked from commit 79e479c45fc63b6001b206fec832064c31fc1f11)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters (GH-107403) (gh...
Miss Islington (bot) [Mon, 31 Jul 2023 23:15:13 +0000 (16:15 -0700)] 
[3.12] gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters (GH-107403) (gh-107521)

gh-107306: Add a Doc Entry for Py_mod_multiple_interpreters (GH-107403)

It was added in 3.12 for PEP 684 (per-interpreter GIL).
(cherry picked from commit fb344e99aa0da5bef9318684ade69978585fe060)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-107507: Replace 'The goals of Argument Clinic' with a summary (GH-107508...
Miss Islington (bot) [Mon, 31 Jul 2023 21:42:58 +0000 (14:42 -0700)] 
[3.12] gh-107507: Replace 'The goals of Argument Clinic' with a summary (GH-107508) (#107516)

Summarise the goals of Argument Clinic in a single sentence.
Mention that Argument Clinic was introduced with PEP-436.
(cherry picked from commit abb71c6a8f73482c910ffdf050a86089a48e0e60)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.12] gh-106762: Add news for `EnumMeta.__getattr__` removal (GH-107466) (GH-107509)
Miss Islington (bot) [Mon, 31 Jul 2023 18:33:32 +0000 (11:33 -0700)] 
[3.12] gh-106762: Add news for `EnumMeta.__getattr__` removal (GH-107466) (GH-107509)

gh-106762: Add news for `EnumMeta.__getattr__` removal (GH-107466)
(cherry picked from commit de51dede5b48ef23d7d33d92f3616824e23fd205)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2 years ago[3.12] GH-101291: Add warning to "what's new" that `PyLongObject` internals have...
Miss Islington (bot) [Mon, 31 Jul 2023 17:16:00 +0000 (10:16 -0700)] 
[3.12] GH-101291: Add warning to "what's new" that `PyLongObject` internals have changed. (GH-107388) (#107392)

(cherry picked from commit 1ee605c5888fbc3d51b3e7610bac38ea6bc25e31)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2 years ago[3.12] gh-106368: Add test for Argument Clinic misbehaving custom converter_init...
Miss Islington (bot) [Mon, 31 Jul 2023 15:57:25 +0000 (08:57 -0700)] 
[3.12] gh-106368: Add test for Argument Clinic misbehaving custom converter_init() (GH-107496) (#107499)

(cherry picked from commit 2c5d206b33e4cdcafaaaf1eeaa189c10de332dc5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.12] gh-105578: Add more usage examples to `typing.AnyStr` docs (GH-107045) (#107503)
Miss Islington (bot) [Mon, 31 Jul 2023 15:33:00 +0000 (08:33 -0700)] 
[3.12] gh-105578: Add more usage examples to `typing.AnyStr` docs (GH-107045) (#107503)

gh-105578: Add more usage examples to `typing.AnyStr` docs (GH-107045)

``typing.AnyStr`` has different semantics to ``str | bytes``, which often leads to user confusion
(cherry picked from commit f877b32b879f2076bb1c52826af0c28ebf1aaeed)

Co-authored-by: Michael The <michael-the1@users.noreply.github.com>
2 years ago[3.12] gh-105751: Remove obsolete `object` base class in some ctypes tests (GH-107460...
Łukasz Langa [Mon, 31 Jul 2023 15:01:25 +0000 (15:01 +0000)] 
[3.12] gh-105751: Remove obsolete `object` base class in some ctypes tests (GH-107460) (#107501)

(cherry picked from commit 520efecfc3aed34d3a44545c7cd872d1aea8c7dc)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2 years ago[3.12] gh-106263: Fix segfault in `signaldict_repr` in `_decimal` module (#… (#107491)
Charlie Zhao [Mon, 31 Jul 2023 12:34:16 +0000 (20:34 +0800)] 
[3.12] gh-106263: Fix segfault in `signaldict_repr`  in `_decimal` module (#… (#107491)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
(cherry picked from commit 3979150a0d406707f6d253d7c15fb32c1e005a77)

2 years ago[3.12] gh-102509: Start initializing `ob_digit` of `_PyLongValue` (GH-102510) (#107464)
Miss Islington (bot) [Mon, 31 Jul 2023 12:27:59 +0000 (05:27 -0700)] 
[3.12] gh-102509: Start initializing `ob_digit` of `_PyLongValue` (GH-102510) (#107464)

gh-102509: Start initializing `ob_digit` of `_PyLongValue` (GH-102510)
(cherry picked from commit fc130c47daa715d60d8925c478a96d5083e47b6a)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
2 years ago[3.12] gh-46376: Return existing pointer when possible in ctypes (GH-107131) (#107487)
Łukasz Langa [Mon, 31 Jul 2023 09:16:45 +0000 (09:16 +0000)] 
[3.12] gh-46376: Return existing pointer when possible in ctypes (GH-107131) (#107487)

(cherry picked from commit 08447b5deb47e2a0df87fa0a0576d300e5c909b4)

Co-authored-by: Konstantin <kpp.live+github@gmail.com>
2 years ago[3.12] gh-104280: Add test cases for DTrace probes (GH-107125) (#107489)
Miss Islington (bot) [Mon, 31 Jul 2023 09:16:30 +0000 (02:16 -0700)] 
[3.12] gh-104280: Add test cases for DTrace probes (GH-107125) (#107489)

gh-104280: Add test cases for DTrace probes (GH-107125)
(cherry picked from commit a1c737b73d3658be0e1d072a340d42e3d96373c6)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2 years ago[3.12] gh-105751, test_ctypes: Remove disabled tests (GH-105826) (#107483)
Łukasz Langa [Mon, 31 Jul 2023 08:28:36 +0000 (08:28 +0000)] 
[3.12] gh-105751, test_ctypes: Remove disabled tests (GH-105826) (#107483)

* The following tests were disabled since the initial ctypes commit
  in 2006, commit babddfca758abe34ff12023f63b18d745fae7ca9:

  * Callbacks.test_char_p()
  * DeletePointerTestCase.test_X()
  * NumberTestCase.test_perf()
  * StructureTestCase.test_subclass_creation()
  * Tests.test_X() of test_byteswap

* NumberTestCase.test_bool_from_address() was disabled in 2007 by
  commit 5dc4fe09b7648f9801558e766b21a3d3b2dcad3b.
* Remove check_perf() and run_test() of test_numbers.
(cherry picked from commit 8f10140e74d141a0a894702044e213e6f0690d9c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.12] gh-99079: add What's New item (GH-107481)
Ned Deily [Mon, 31 Jul 2023 07:12:07 +0000 (03:12 -0400)] 
[3.12] gh-99079: add What's New item (GH-107481)

2 years ago[3.12] Update macOS installer screens for 3.12rc/final. (GH-107473)
Ned Deily [Mon, 31 Jul 2023 05:22:34 +0000 (01:22 -0400)] 
[3.12] Update macOS installer screens for 3.12rc/final. (GH-107473)

2 years ago[3.12] gh-99079: Update macOS installer to use OpenSSL 3.0.9. (gh-107472)
Ned Deily [Mon, 31 Jul 2023 05:21:43 +0000 (01:21 -0400)] 
[3.12] gh-99079: Update macOS installer to use OpenSSL 3.0.9. (gh-107472)

2 years ago[3.12] gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) (gh-107459)
Miss Islington (bot) [Sun, 30 Jul 2023 15:49:26 +0000 (08:49 -0700)] 
[3.12] gh-107427: Update the description of UNPACK_SEQUENCE (gh-107429) (gh-107459)

2 years ago[3.12] Fix the documentation for PyCode_New add `qualname` parameter (GH-107186)...
Miss Islington (bot) [Sat, 29 Jul 2023 17:52:17 +0000 (10:52 -0700)] 
[3.12] Fix the documentation for PyCode_New add `qualname` parameter (GH-107186) (#107440)

Fix the documentation for PyCode_New add `qualname` parameter (GH-107186)
(cherry picked from commit f2abeb590dae5918388f91b60b31f040d44218f0)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2 years ago[3.12] gh-107422: Remove outdated `TypedDict` example from typing docs (GH-107436...
Miss Islington (bot) [Sat, 29 Jul 2023 17:12:50 +0000 (10:12 -0700)] 
[3.12] gh-107422: Remove outdated `TypedDict` example from typing docs (GH-107436) (#107437)

gh-107422: Remove outdated `TypedDict` example from typing docs (GH-107436)
(cherry picked from commit 89fd4f4a3fc5fb8076ec064c22a30108480e946b)

Co-authored-by: Rakesh Sabale <102187286+ghubrakesh@users.noreply.github.com>
2 years ago[3.12] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) (GH-107419)
Serhiy Storchaka [Sat, 29 Jul 2023 06:16:27 +0000 (09:16 +0300)] 
[3.12] gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386) (GH-107419)

(cherry picked from commit f2d07d3289947d10b065b2bb7670c8fb6b6582f2)

2 years ago[3.12] gh-107091: Fix some uses of :func: role (GH-107378) (GH-107416)
Serhiy Storchaka [Sat, 29 Jul 2023 05:52:25 +0000 (08:52 +0300)] 
[3.12] gh-107091: Fix some uses of :func: role (GH-107378) (GH-107416)

:c:func: or :c:macro: should be used instead.
(cherry picked from commit 413ba8943e2f1d896a0568eb571a041b88589440)

2 years ago[3.12] gh-106881: Check for linux/limits.h before including it (#107397) (#107414)
justdan6 [Fri, 28 Jul 2023 23:29:31 +0000 (17:29 -0600)] 
[3.12] gh-106881: Check for linux/limits.h before including it (#107397) (#107414)

* Check for linux/limits.h before including it

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit 11c055f5ff1a353de6d2e77f2af24aaa782878ba)

2 years ago[3.12] gh-105699: Use a _Py_hashtable_t for the PyModuleDef Cache (gh-106974) (gh...
Eric Snow [Fri, 28 Jul 2023 23:16:12 +0000 (17:16 -0600)] 
[3.12] gh-105699: Use a _Py_hashtable_t for the PyModuleDef Cache (gh-106974) (gh-107412)

gh-105699: Use a _Py_hashtable_t for the PyModuleDef Cache (gh-106974)

This fixes a crasher due to a race condition, triggered infrequently when two isolated (own GIL) subinterpreters simultaneously initialize their sys or builtins modules.  The crash happened due the combination of the "detached" thread state we were using and the "last holder" logic we use for the GIL.  It turns out it's tricky to use the same thread state for different threads.  Who could have guessed?

We solve the problem by eliminating the one object we were still sharing between interpreters.  We replace it with a low-level hashtable, using the "raw" allocator to avoid tying it to the main interpreter.

We also remove the accommodations for "detached" thread states, which were a dubious idea to start with.

(cherry picked from commit 8ba4df91ae60833723d8d3b9afeb2b642f7176d5)

2 years ago[3.12] gh-107307: Update the importlib Docs for PEP 684 (gh-107400) (gh-107413)
Miss Islington (bot) [Fri, 28 Jul 2023 22:09:34 +0000 (15:09 -0700)] 
[3.12] gh-107307: Update the importlib Docs for PEP 684 (gh-107400) (gh-107413)

gh-107307: Update the importlib Docs for PEP 684 (gh-107400)
(cherry picked from commit cf63df88d38ec3e6ebd44ed184312df9f07f9782)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-104629: Build _testclinic extension module on Windows (GH-104723) (#107393)
Miss Islington (bot) [Fri, 28 Jul 2023 20:57:26 +0000 (13:57 -0700)] 
[3.12] gh-104629: Build _testclinic extension module on Windows (GH-104723) (#107393)

(cherry picked from commit 3a1d819ebc36189e086198212822c9b29384f242)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2 years ago[3.12] gh-107305: Update the C-API Docs for PEP 684 (gh-107324) (gh-107402)
Miss Islington (bot) [Fri, 28 Jul 2023 19:54:57 +0000 (12:54 -0700)] 
[3.12] gh-107305: Update the C-API Docs for PEP 684 (gh-107324) (gh-107402)

gh-107305: Update the C-API Docs for PEP 684 (gh-107324)
(cherry picked from commit c0b81c4b5438a3565fadd9d6f5bc69f989a3fdee)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-107091: Fix some uses of :const: role (GH-107379) (GH-107384)
Miss Islington (bot) [Fri, 28 Jul 2023 10:35:20 +0000 (03:35 -0700)] 
[3.12] gh-107091: Fix some uses of :const: role (GH-107379) (GH-107384)

It is for references, not for literals.
(cherry picked from commit 0aa58fa7a62cd0ee7ec27fa87122425aeff0467d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.12] GH-106898: Add the exception as an argument to the `PY_UNWIND` event callback...
Mark Shannon [Fri, 28 Jul 2023 10:30:16 +0000 (11:30 +0100)] 
[3.12] GH-106898: Add the exception as an argument to the `PY_UNWIND` event callback function. (GH-107347) (GH-107382)

2 years ago[3.12] GH-106895: Raise a `ValueError` when attempting to disable events that cannot...
Mark Shannon [Fri, 28 Jul 2023 09:53:33 +0000 (10:53 +0100)] 
[3.12] GH-106895: Raise a `ValueError` when attempting to disable events that cannot be disabled. (GH-107337) (GH-107351)

2 years ago[3.12] GH-106897: Add `RERAISE` event to `sys.monitoring`. (GH-107291) (GH-107346)
Mark Shannon [Fri, 28 Jul 2023 08:48:35 +0000 (09:48 +0100)] 
[3.12] GH-106897: Add `RERAISE` event to `sys.monitoring`. (GH-107291) (GH-107346)

* Ensures that exception handling events are balanced. Each [re]raise event has a matching unwind/handled event.

2 years ago[3.12] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107380)
Serhiy Storchaka [Fri, 28 Jul 2023 08:20:53 +0000 (11:20 +0300)] 
[3.12] gh-107298: Fix yet more Sphinx warnings in the C API doc (GH-107345) (GH-107380)

(cherry picked from commit 983305268e2291b0a7835621b81bf40cba7c27f3)

2 years ago[3.12] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107376)
Serhiy Storchaka [Fri, 28 Jul 2023 06:56:52 +0000 (09:56 +0300)] 
[3.12] gh-107298: Fix more Sphinx warnings in the C API doc (GH-107329) (GH-107376)

Declare the following functions as macros, since they are actually
macros. It avoids a warning on "TYPE" or "macro" argument.

* PyMem_New()
* PyMem_Resize()
* PyModule_AddIntMacro()
* PyModule_AddStringMacro()
* PyObject_GC_New()
* PyObject_GC_NewVar()
* PyObject_New()
* PyObject_NewVar()

Add C standard C types to nitpick_ignore in Doc/conf.py:

* int64_t
* uint64_t
* uintptr_t

No longer ignore non existing "__int" type in nitpick_ignore.

Update Doc/tools/.nitignore.
(cherry picked from commit 8d61a71f9c81619e34d4a30b625922ebc83c561b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375)
Serhiy Storchaka [Fri, 28 Jul 2023 06:40:16 +0000 (09:40 +0300)] 
[3.12] gh-107298: Fix Sphinx warnings in the C API doc (GH-107302) (GH-107375)

(cherry picked from commit 391e03fa05b80d17a14ac88d30c974fa2fa00adb)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.12] gh-106723: forward -Xfrozen_modules option to spawned process interpreters...
Miss Islington (bot) [Fri, 28 Jul 2023 06:24:29 +0000 (23:24 -0700)] 
[3.12] gh-106723: forward -Xfrozen_modules option to spawned process interpreters (GH-106724) (#107367)

gh-106723: forward -Xfrozen_modules option to spawned process interpreters (GH-106724)
(cherry picked from commit 3dcac785810df4d9db50abe90847eaf03bbdaaf4)

Co-authored-by: Felipe A. Hernandez <ergoithz@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.12] gh-107298: Fix doc references to undocumented modules (GH-107300) (GH-107370)
Miss Islington (bot) [Fri, 28 Jul 2023 06:17:49 +0000 (23:17 -0700)] 
[3.12] gh-107298: Fix doc references to undocumented modules (GH-107300) (GH-107370)

Update also Doc/tools/.nitignore.
(cherry picked from commit 87b39028e5f453a949a1675526c439f6479a04a8)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.12] gh-106368: Argument clinic tests: improve failure message when tests in `Clini...
Miss Islington (bot) [Fri, 28 Jul 2023 00:39:51 +0000 (17:39 -0700)] 
[3.12] gh-106368: Argument clinic tests: improve failure message when tests in `ClinicExternalTests` fail (GH-107364) (#107365)

gh-106368: Argument clinic tests: improve failure message when tests in `ClinicExternalTests` fail (GH-107364)
(cherry picked from commit 76c26eaca4147ba7e3e8d7379c5a828f0b512a46)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-104621: Check for Incompatible Extensions in import_find_extension() (gh...
Miss Islington (bot) [Thu, 27 Jul 2023 21:51:34 +0000 (14:51 -0700)] 
[3.12] gh-104621: Check for Incompatible Extensions in import_find_extension() (gh-107184) (gh-107360)

gh-104621: Check for Incompatible Extensions in import_find_extension() (gh-107184)

This fixes a bug where incompatible modules could still be imported if attempted multiple times.
(cherry picked from commit 75c974f5353685f338344618ad7344e64c2293d0)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-104432: Use `memcpy()` to avoid misaligned loads (GH-104433) (#107355)
Miss Islington (bot) [Thu, 27 Jul 2023 20:52:39 +0000 (13:52 -0700)] 
[3.12] gh-104432: Use `memcpy()` to avoid misaligned loads (GH-104433) (#107355)

gh-104432: Use `memcpy()` to avoid misaligned loads (GH-104433)

Fix potential unaligned memory access on C APIs involving returned sequences
of `char *` pointers within the :mod:`grp` and :mod:`socket` modules. These
were revealed using a ``-fsaniziter=alignment`` build on ARM macOS.
(cherry picked from commit f01e4cedba1a17d321664834bb255d9d04ad16ce)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2 years ago[3.12] gh-105699: Disable the Interpreters Stress Tests (gh-107354) (gh-107357)
Miss Islington (bot) [Thu, 27 Jul 2023 20:09:05 +0000 (13:09 -0700)] 
[3.12] gh-105699: Disable the Interpreters Stress Tests (gh-107354) (gh-107357)

gh-105699: Disable the Interpreters Stress Tests (gh-107354)

The two tests are crashing periodically in CI and on buildbots.  I suspect the problem is in the _xxsubinterpreters module.
 Regardless, I'm disabling the tests temporarily, to reduce the noise as we approach 3.12rc1.  I'll be investigating the crashes separately.
(cherry picked from commit 4f67921ad28194155e3d4c16255fb140a6a4d89a)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] gh-101524: Only Use Public C-API in the _xxsubinterpreters Module (gh-105258...
Miss Islington (bot) [Thu, 27 Jul 2023 19:15:47 +0000 (12:15 -0700)] 
[3.12] gh-101524: Only Use Public C-API in the _xxsubinterpreters Module (gh-105258) (gh-107303)

The _xxsubinterpreters module was meant to only use public API.  Some internal C-API usage snuck in over the last few years (e.g. gh-28969).  This fixes that.
(cherry picked from commit e6373c0d8b59512aa7f0dea7f3fb162b6ed10fa4)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2 years ago[3.12] Bump some docs dependencies to resolve a Dependabot security alert (GH-107341...
Miss Islington (bot) [Thu, 27 Jul 2023 12:13:02 +0000 (05:13 -0700)] 
[3.12] Bump some docs dependencies to resolve a Dependabot security alert (GH-107341) (#107342)

Bump some docs dependencies to resolve a Dependabot security alert (GH-107341)
(cherry picked from commit f84d77b4e07aeb6241c1ff9932627d3ba059efa8)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2 years ago[3.12] gh-106996: Rewrite turtle explanation (GH-107244) (#107335)
Miss Islington (bot) [Thu, 27 Jul 2023 08:11:50 +0000 (01:11 -0700)] 
[3.12] gh-106996: Rewrite turtle explanation (GH-107244) (#107335)

Co-authored-by: Daniele Procida <daniele@vurt.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2 years ago[3.12] Docs: Argument Clinic: Restructure "Basic concepts and usage" (GH-106981)...
Miss Islington (bot) [Thu, 27 Jul 2023 07:07:55 +0000 (00:07 -0700)] 
[3.12] Docs: Argument Clinic: Restructure "Basic concepts and usage" (GH-106981) (#107325)

Split "Basic concepts and usage" into:

- Reference
  - Terminology
  - CLI reference

- Background
  - Basic concepts

(cherry picked from commit 2ad699002e3ce09e9fa41e333ac72f16a32d94de)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>