Commit graph

117926 commits

Author SHA1 Message Date
Irit Katriel
a8431123c2
[3.12] gh-109179: Fix traceback display for SyntaxErrors with notes (#109197) (#109280)
(cherry picked from commit ecd21a629a)
2023-10-02 16:56:34 +02:00
Miss Islington (bot)
1d8c18c39d
[3.12] gh-107219: Fix concurrent.futures terminate_broken() (GH-109244) (#109254)
gh-107219: Fix concurrent.futures terminate_broken() (GH-109244)

Fix a race condition in concurrent.futures. When a process in the
process pool was terminated abruptly (while the future was running or
pending), close the connection write end. If the call queue is
blocked on sending bytes to a worker process, closing the connection
write end interrupts the send, so the queue can be closed.

Changes:

* _ExecutorManagerThread.terminate_broken() now closes
  call_queue._writer.
* multiprocessing PipeConnection.close() now interrupts
  WaitForMultipleObjects() in _send_bytes() by cancelling the
  overlapped operation.
(cherry picked from commit a9b1f84790)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 16:56:09 +02:00
Miss Islington (bot)
3e1c9e8264
[3.12] gh-50644: Forbid pickling of codecs streams (GH-109180) (#109231)
gh-50644: Forbid pickling of codecs streams (GH-109180)

Attempts to pickle or create a shallow or deep copy of codecs streams
now raise a TypeError.

Previously, copying failed with a RecursionError, while pickling
produced wrong results that eventually caused unpickling to fail with
a RecursionError.
(cherry picked from commit d6892c2b92)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-02 16:55:52 +02:00
Miss Islington (bot)
be8255ad8c
[3.12] gh-109207: Fix SystemError when printing symtable entry object. (GH-109225) (#109227)
gh-109207: Fix SystemError when printing symtable entry object. (GH-109225)
(cherry picked from commit 4297499696)

Co-authored-by: 云line <31395137+yunline@users.noreply.github.com>
2023-10-02 16:55:41 +02:00
Miss Islington (bot)
1c223ae58d
[3.12] Check the result of PySet_Contains() for error in Python/symtable.c (GH-109146) (#109153)
Check the result of PySet_Contains() for error in Python/symtable.c (GH-109146)
(cherry picked from commit 87a7faf6b6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-02 16:55:24 +02:00
Victor Stinner
30748d36b3
[3.12] gh-104690: thread_run() checks for tstate dangling pointer (#109056) (#109133)
gh-104690: thread_run() checks for tstate dangling pointer (#109056)

thread_run() of _threadmodule.c now calls
_PyThreadState_CheckConsistency() to check if tstate is a dangling
pointer when Python is built in debug mode.

Rename ceval_gil.c is_tstate_valid() to
_PyThreadState_CheckConsistency() to reuse it in _threadmodule.c.

(cherry picked from commit f63d37877a)
2023-10-02 16:55:06 +02:00
Miss Islington (bot)
9207c870be
[3.12] gh-88943: Improve syntax error for non-ASCII character that follows a numerical literal (GH-109081) (#109090)
gh-88943: Improve syntax error for non-ASCII character that follows a numerical literal (GH-109081)

It now points on the invalid non-ASCII character, not on the valid numerical literal.
(cherry picked from commit b2729e93e9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-02 16:54:16 +02:00
Thomas Wouters
a4f186ad49 Merge branch '3.12' of https://github.com/python/cpython into 3.12 2023-10-02 16:44:26 +02:00
Thomas Wouters
531d2df280 Post 3.12.0 2023-10-02 16:41:41 +02:00
Miss Islington (bot)
62d9ae414f
[3.12] gh-109496: Skip test_capi.test_decref_freed_object() on ASAN (GH-109573) (#109578)
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 15:09:35 +01:00
Thomas Wouters
0fb18b02c8 Python 3.12.0 2023-10-02 13:48:14 +02:00
Miss Islington (bot)
f4f919e3d8
[3.12] GH-109190: Announce final release in What's New in Python 3.12 (GH-110117) (#110215)
GH-109190: Announce final release in What's New in Python 3.12 (GH-110117)

Prepare What's New in Python 3.12 for final release
(cherry picked from commit 6139bf5e0c)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-02 13:26:30 +02:00
Miss Islington (bot)
8811f3d7f9
[3.12] Docs: bump Pygments to fix contrast ratios to meet WCAG AA guidelines (GH-110208) (#110210)
Docs: bump Pygments to fix contrast ratios to meet WCAG AA guidelines (GH-110208)
(cherry picked from commit 9cb8927bfc)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-02 12:50:52 +02:00
Miss Islington (bot)
48afd1cf17
[3.12] GH-92584: Move installation schemes overview to sysconfig docs (GH-108018) (#110213)
GH-92584: Move installation schemes overview to sysconfig docs (GH-108018)

* Add new installation path functions subsection

* Add content from install/index to sysconfig

* Fix table

* Update note about installers

* Clean up the list of schemes, remove references to Distutils
(cherry picked from commit f16e81f368)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-02 10:50:28 +00:00
Miss Islington (bot)
bb35fc3706
[3.12] gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928) (#109929)
gh-107888: Fix test_mmap.test_access_parameter() on macOS 14 (GH-109928)
(cherry picked from commit 9dbfe2dc8e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-10-02 12:09:54 +02:00
Miss Islington (bot)
6f6ca1daa4
[3.12] GH-101100: Fix reference warnings for `namedtuple` (GH-110113) (#110135)
GH-101100: Fix reference warnings for ``namedtuple`` (GH-110113)
(cherry picked from commit cbdacc738a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-02 12:07:58 +02:00
Miss Islington (bot)
b0a8cb2901
[3.12] gh-110138: Improve grammar in idiomatic usage of `__main__.py` (GH-110142) (#110188)
gh-110138: Improve grammar in idiomatic usage of ``__main__.py`` (GH-110142)
(cherry picked from commit adf0f15a06)

Co-authored-by: Quentin Agren <quentin.agren@gmail.com>
2023-10-02 12:03:12 +02:00
Hugo van Kemenade
96110e9429
[3.12] gh-101100: Fix sphinx warnings in library/site.rst (GH-110144) (#110187)
(cherry picked from commit 31097df611)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-02 12:02:29 +02:00
Miss Islington (bot)
54ffee0e51
[3.12] GH-101100: Fix reference warnings for `gettext` (GH-110115) (#110140)
GH-101100: Fix reference warnings for ``gettext`` (GH-110115)
(cherry picked from commit 0449fe999d)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-10-02 12:01:26 +02:00
Miss Islington (bot)
a6773ec099
[3.12] gh-109991: Update Windows build to use OpenSSL 3.0.11 (GH-110054) (#110056)
gh-109991: Update Windows build to use OpenSSL 3.0.11 (GH-110054)
(cherry picked from commit cf4c297256)

Co-authored-by: Zachary Ware <zach@python.org>
2023-10-02 11:59:52 +02:00
Miss Islington (bot)
8882b30dab
[3.12] gh-109634: Fix :samp: syntax (GH-110073) (#110095)
gh-109634: Fix `:samp:` syntax (GH-110073)
(cherry picked from commit e27adc68cc)

Co-authored-by: Jacob Coffee <jacob@z7x.org>
2023-09-29 15:31:10 +02:00
Miss Islington (bot)
d2a31319a5
[3.12] gh-101100: Fix references to `URLError and HTTPError in howto/urllib2.rst` (GH-107966) (#110086)
gh-101100: Fix references to ``URLError`` and ``HTTPError`` in ``howto/urllib2.rst`` (GH-107966)
(cherry picked from commit bfd94ab9e9)

Co-authored-by: Yuki K <drsuaimqjgar@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-29 15:30:44 +02:00
Miss Islington (bot)
c89844aaec
[3.12] gh-101100: Fix Sphinx warnings in tutorial/controlflow.rst (GH-109424) (#110084)
gh-101100: Fix Sphinx warnings in `tutorial/controlflow.rst` (GH-109424)
(cherry picked from commit 8898a8683b)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-29 15:29:39 +02:00
Miss Islington (bot)
297104cce5
[3.12] gh-101100: Fix sphinx warnings in library/difflib.rst (GH-110074) (#110081)
gh-101100: Fix sphinx warnings in `library/difflib.rst` (GH-110074)
(cherry picked from commit d102d39bbe)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-29 15:29:14 +02:00
Miss Islington (bot)
69a9f47125
[3.12] gh-110045: Update symtable module for PEP 695 (GH-110066) (#110070)
gh-110045: Update symtable module for PEP 695 (GH-110066)
(cherry picked from commit 7dc2c5093e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-09-29 08:10:22 +02:00
Adam Turner
335e3d59e0
[3.12] GH-109190: Copyedit 3.12 What's New: Bytecode (GH-109821) (#110047)
.
(cherry picked from commit 526380e286)
2023-09-28 23:38:08 +02:00
Miss Islington (bot)
ef99f5e968
[3.12] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests to use 1.1.1w, 3.0.11, and 3.1.3. (gh-110002) (#110005)
gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests to use 1.1.1w, 3.0.11, and 3.1.3. (gh-110002)
(cherry picked from commit c88037d137)

Co-authored-by: Ned Deily <nad@python.org>
2023-09-28 17:21:09 +02:00
Ned Deily
f3b61850ce
[3.12] gh-109991: Update macOS installer to use OpenSSL 3.0.10. (#110004)
gh-109991: Update macOS installer to use OpenSSL 3.0.10.

(cherry picked from commit 884cd18087)
2023-09-28 17:20:36 +02:00
Miss Islington (bot)
60046a7713
[3.12] gh-101100: Fix Sphinx warnings in Doc/using/configure.rst (GH-109931) (#109937)
gh-101100: Fix Sphinx warnings in Doc/using/configure.rst (GH-109931)
(cherry picked from commit 3538930d87)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-28 17:17:02 +02:00
Miss Islington (bot)
98a2d0e13b
[3.12] no-issue: Fix a typo in the parameter name of random.expovariate. (gh-109902) (#109904)
no-issue: Fix a typo in the parameter name of random.expovariate. (gh-109902)
(cherry picked from commit 8100612bac)

Co-authored-by: lohaswinner <lohaswinner@gmail.com>
2023-09-27 17:39:36 +02:00
Miss Islington (bot)
26f542de22
[3.12] GH-109190: Copyedit 3.12 What's New: Release highlights (GH-109770) (#109971)
* GH-109190: Copyedit 3.12 What's New: Release highlights (GH-109770)
(cherry picked from commit b35f0843fc)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

* Delete bad merge leftovers

---------

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-27 17:39:10 +02:00
Miss Islington (bot)
2c557932e9
[3.12] gh-101100: Fix sphinx warnings in library/devmode.rst (GH-109963) (#109966)
gh-101100: Fix sphinx warnings in `library/devmode.rst` (GH-109963)
(cherry picked from commit d9809e84fb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-27 17:38:42 +02:00
Miss Islington (bot)
fc4fddb139
[3.12] gh-107298: Document PyMODINIT_FUNC macro (GH-109236) (#109947)
gh-107298: Document PyMODINIT_FUNC macro (GH-109236)

Document PyMODINIT_FUNC macro.

Remove links to PyAPI_FUNC() and PyAPI_DATA() macros since they are
not documented. These macros should only be used to define the Python
C API. They should not be used outside Python code base.
(cherry picked from commit d7a27e527d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-09-27 17:38:28 +02:00
Miss Islington (bot)
1d6ef7e609
[3.12] GH-109190: Copyedit 3.12 What's New: Deprecations (GH-109766) (#109925)
* GH-109190: Copyedit 3.12 What's New: Deprecations (GH-109766)
(cherry picked from commit 87ddfa74e2)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

* GH-109190: Copyedit 3.12 What's New: Deprecations (``os`` fix)  (#109927)

Merge the two ``os`` entries

(cherry picked from commit 0e28d0f7a1)

---------

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-27 17:13:14 +02:00
Irit Katriel
648198c37f
[3.12] gh-109889: comment out assertion indicating a failed optimization of a redundant NOP (#109899)
* [3.12] gh-109889: comment out assertion indicating a failed optimization of a redundant NOP

* comment out the function to avoid warnings on it being unused
2023-09-26 17:17:32 +02:00
Hugo van Kemenade
57ff216215
[3.12] gh-101100: Fix Sphinx warnings in Doc/library/weakref.rst (GH-109881) (#109884)
[3.12] gh-101100: Fix Sphinx warnings in `Doc/library/weakref.rst` (GH-109881).
(cherry picked from commit 7c61a361fc)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-26 17:03:31 +02:00
Adam Turner
d2a2e25855
[3.12] GH-109190: Copyedit 3.12 What's New: Sort Other Language Changes (GH-109836). (#109880)
(cherry picked from commit 86e7c611ac)
2023-09-26 17:03:03 +02:00
Miss Islington (bot)
538f505a37
[3.12] gh-109823: Adjust labels in compiler when removing an empty basic block which is a jump target (GH-109839) (#109865)
gh-109823: Adjust labels in compiler when removing an empty basic block which is a jump target (GH-109839)
(cherry picked from commit d73c12b88c)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-09-26 02:37:52 +02:00
Miss Islington (bot)
a19251764a
[3.12] GH-109190: Copyedit 3.12 What's New: Improve the C-API deprecations section (GH-109751) (#109830)
* GH-109190: Copyedit 3.12 What's New: Improve the C-API deprecations section (GH-109751)
(cherry picked from commit bccc1b7800)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

* Remove the weakref get object functions

---------

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-09-26 02:37:26 +02:00
Miss Islington (bot)
de6d17c5dd
[3.12] GH-109190: Copyedit 3.12 What's New: Use the present tense (GH-109754) (#109827)
GH-109190: Copyedit 3.12 What's New: Use the present tense (GH-109754)
(cherry picked from commit 4e478534d7)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-26 02:36:31 +02:00
Miss Islington (bot)
d4dd8a17e1
[3.12] GH-109190: Copyedit 3.12 What's New: Trivia (GH-109760) (#109826)
GH-109190: Copyedit 3.12 What's New: Trivia (GH-109760)
(cherry picked from commit f08772cfd8)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-25 14:25:27 +02:00
Miss Islington (bot)
d158bbc2ef
[3.12] GH-109190: Copyedit 3.12 What's New: Prefer GitHub issues links (GH-109753) (#109825)
GH-109190: Copyedit 3.12 What's New: Prefer GitHub issues links (GH-109753)
(cherry picked from commit 7495a93e0f)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-25 14:25:16 +02:00
Miss Islington (bot)
52b2f9f668
[3.12] GH-109190: Copyedit 3.12 What's New: Update the `imp` porting guidance (GH-109755) (#109816)
GH-109190: Copyedit 3.12 What's New: Update the ``imp`` porting guidance (GH-109755)
(cherry picked from commit 7b8bfe1644)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-25 12:16:13 +02:00
Miss Islington (bot)
cb4a8c273d
[3.12] GH-109190: Copyedit 3.12 What's New: Increase the prominence of the setuptools removal (GH-109768) (#109815)
GH-109190: Copyedit 3.12 What's New: Increase the prominence of the setuptools removal (GH-109768)
(cherry picked from commit 09a73d50f6)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-25 12:16:00 +02:00
Miss Islington (bot)
d56835f855
[3.12] GH-109190: Copyedit 3.12 What's New: Use the `:file:` role (GH-109756) (#109806)
GH-109190: Copyedit 3.12 What's New: Use the ``:file:`` role (GH-109756)
(cherry picked from commit 8d365b60ba)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-25 12:15:46 +02:00
Miss Islington (bot)
6f1d4552b3
[3.12] gh-101100: Fix sphinx warnings in Doc/library/xml.etree.elementtree.rst (GH-109799) (#109800)
gh-101100: Fix sphinx warnings in `Doc/library/xml.etree.elementtree.rst` (GH-109799)
(cherry picked from commit 649768fb67)


gh-101100: Fix shpinx warnings in `Doc/library/xml.etree.elementtree.rst`

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-09-24 13:55:28 +02:00
Miss Islington (bot)
2622b13046
[3.12] gh-109634: Use :samp: role (GH-109635) (#109776)
gh-109634: Use :samp: role (GH-109635)
(cherry picked from commit 92af0cc580)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-09-24 13:54:36 +02:00
Miss Islington (bot)
62df559448
[3.12] gh-100228: Document the os.fork threads DeprecationWarning. (GH-109767) (#109773)
* gh-100228: Document the os.fork threads DeprecationWarning. (GH-109767)

Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs.

Many reviews and doc cleanup edits by Adam & Hugo. 🥳

(cherry picked from commit 5e7ea95d9d)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* link to the discussion thread from whatsnew

Include the link to the discussion in the what's new text per @malemberg's comment on. https://github.com/python/cpython/pull/109767

(i'll follow up with a PR to main to include this edit there as well)

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-24 13:53:56 +02:00
Miss Islington (bot)
46207624b7
[3.12] GH-95913: Add the release date for Python 3.11 (GH-109750) (#109771)
GH-95913: Add the release date for Python 3.11 (GH-109750)
(cherry picked from commit b10de68c6c)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-24 13:53:27 +02:00
Hugo van Kemenade
722660b48b
[3.12] Docs: Update Donghee Na's name (GH-109743) (#109758)
* Update Donghee Na's name in Docs/

* Update Donghee Na's name in Misc/ACKS

* Update Donghee Na's name in Misc/NEWS.d/
2023-09-24 13:52:26 +02:00