]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
13 months ago[3.12] gh-53203: Fix strptime() for %c and %x formats on many locales (GH-124946...
Miss Islington (bot) [Sat, 12 Oct 2024 18:02:52 +0000 (20:02 +0200)] 
[3.12] gh-53203: Fix strptime() for %c and %x formats on many locales (GH-124946) (GH-125370)

In some locales (like French or Hebrew) the full or abbreviated names of
the default month and weekday used in __calc_date_time can be part of
other name or constant part of the %c format. The month name can also
match %m with constant suffix (like in Japanese). So the code failed to
correctly distinguish formats %a, %A, %b, %B and %m.

Cycle all month and all days of the week to find the variable part
and distinguish %a from %A and %b from %B or %m.

Fixed locales for the following languges:
Arabic, Bislama, Breton, Bodo, Kashubian, Chuvash, Estonian, French, Irish,
Ge'ez, Gurajati, Manx Gaelic, Hebrew, Hindi, Chhattisgarhi, Haitian Kreyol,
Japanese, Kannada, Korean, Marathi, Malay, Norwegian, Nynorsk, Punjabi,
Rajasthani, Tok Pisin, Yoruba, Yue Chinese, Yau/Nungon and Chinese.

(cherry picked from commit c05f9dde8a12dfd63d3ade93da616042df2dc925)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Eli Bendersky <eliben@gmail.com>
13 months ago[3.12] gh-85935: Explicitly document the case nargs=0 in argparse (GH-125302) (GH...
Miss Islington (bot) [Sat, 12 Oct 2024 13:02:14 +0000 (15:02 +0200)] 
[3.12] gh-85935: Explicitly document the case nargs=0 in argparse (GH-125302) (GH-125358)

(cherry picked from commit 07c2d15977738165e9dc4248e7edda7c75ecc14b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.12] gh-125254: Fix error report about ambiguous option in argparse (GH-125273...
Miss Islington (bot) [Sat, 12 Oct 2024 13:00:24 +0000 (15:00 +0200)] 
[3.12] gh-125254: Fix error report about ambiguous option in argparse (GH-125273) (GH-125360)

This was a regression introduced in gh-58573. It was only tested for the
case when the ambiguous option is the last argument in the command line.
(cherry picked from commit 63cf4e914f879ee28a75c02e867baa7c6047ea2b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.12] gh-124309: fix staggered race on eager tasks (GH-124847) (#125340)
Miss Islington (bot) [Sat, 12 Oct 2024 03:12:11 +0000 (05:12 +0200)] 
[3.12] gh-124309: fix staggered race on eager tasks (GH-124847) (#125340)

gh-124309: fix staggered race on eager tasks (GH-124847)

This patch is entirely by Thomas and Peter

(cherry picked from commit 979c0df7c0adfb744159a5fc184043dc733d8534)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
13 months ago[3.12] Doc: Fix a typo in "Function Examples" in the control-flow tutorial (GH-125338...
Miss Islington (bot) [Sat, 12 Oct 2024 00:47:23 +0000 (02:47 +0200)] 
[3.12] Doc: Fix a typo in "Function Examples" in the control-flow tutorial (GH-125338) (#125342)

Doc: Fix a typo in "Function Examples" in the control-flow tutorial (GH-125338)
(cherry picked from commit 5a074aab845f82f4a150c27b905dae05c337d381)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
13 months ago[3.12] gh-116938: Clarify documentation of `dict` and `dict.update` regarding the...
Miss Islington (bot) [Fri, 11 Oct 2024 23:23:54 +0000 (01:23 +0200)] 
[3.12] gh-116938: Clarify documentation of `dict` and `dict.update` regarding the positional argument they accept (GH-125213) (#125337)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
13 months ago[3.12] gh-124917: Allow keyword args to os.path.exists/lexists on Windows (GH-124918...
Jelle Zijlstra [Fri, 11 Oct 2024 22:18:46 +0000 (15:18 -0700)] 
[3.12] gh-124917: Allow keyword args to os.path.exists/lexists on Windows (GH-124918) (#125334)

(cherry picked from commit cc2938a18967c9d462ebb18bc09f73e4364aa7d2)

13 months ago[3.12] gh-125301: Backport some test support helpers (is_apple_mobile, is_apple)...
Serhiy Storchaka [Fri, 11 Oct 2024 11:22:27 +0000 (14:22 +0300)] 
[3.12] gh-125301: Backport some test support helpers (is_apple_mobile, is_apple) (GH-125311)

(cherry picked from commit 391659b3da570bfa28fed5fbdb6f2d9c26ab3dd0)

13 months ago[3.12] Add some doctest cleanups for `configparser` (GH-125288) (#125291)
Miss Islington (bot) [Fri, 11 Oct 2024 09:52:15 +0000 (11:52 +0200)] 
[3.12] Add some doctest cleanups for `configparser` (GH-125288) (#125291)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.12] gh-61011: Fix inheritance of nested mutually exclusive groups in argparse...
Miss Islington (bot) [Fri, 11 Oct 2024 09:07:03 +0000 (11:07 +0200)] 
[3.12] gh-61011: Fix inheritance of nested mutually exclusive groups in argparse (GH-125210) (GH-125309)

Previously, all nested mutually exclusive groups lost their connection
to the group containing them and were displayed as belonging directly
to the parser.

(cherry picked from commit 18c74497681e0107d7cde53e63ea42feb38f2176)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Danica J. Sutherland <djsutherland@users.noreply.github.com>
13 months ago[3.12] gh-125058: update `_thread` docs regarding interruptibility of `lock.acquire...
Miss Islington (bot) [Fri, 11 Oct 2024 08:22:34 +0000 (10:22 +0200)] 
[3.12] gh-125058: update `_thread` docs regarding interruptibility of `lock.acquire()` (GH-125141) (#125307)

gh-125058: update `_thread` docs regarding interruptibility of `lock.acquire()` (GH-125141)
(cherry picked from commit 0135848059162ad81478a7776fec622d68a36524)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
13 months ago[3.12] gh-125296: Fix strange fragment identifier for `name or flags` in argparse...
Miss Islington (bot) [Fri, 11 Oct 2024 06:39:54 +0000 (08:39 +0200)] 
[3.12] gh-125296: Fix strange fragment identifier for `name or flags` in argparse docs (GH-125297) (#125300)

gh-125296: Fix strange fragment identifier for `name or flags` in argparse docs (GH-125297)
(cherry picked from commit c1913effeed4e4da4d5310a40ab518945001ffba)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
13 months ago[3.12] [3.13] gh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) (GH-124974) (GH...
Miss Islington (bot) [Fri, 11 Oct 2024 06:37:55 +0000 (08:37 +0200)] 
[3.12] [3.13] gh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) (GH-124974) (GH-125232) (GH-125284)

(cherry picked from commit 26a93189e4c3674a9e0acbd7923b1f27ff01419e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Returns a tuple of up to 100 strings for ALT_DIGITS lookup (an empty tuple on most locales).
Previously it returned the first item of that tuple or an empty string.
(cherry picked from commit 21c04e1a972bd1b6285e0ea41fa107d635bbe43a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.12] Doc: Upgrade Sphinx to 8.1 (GH-125276) (#125279)
Miss Islington (bot) [Thu, 10 Oct 2024 20:32:40 +0000 (22:32 +0200)] 
[3.12] Doc: Upgrade Sphinx to 8.1 (GH-125276) (#125279)

Doc: Upgrade Sphinx to 8.1 (GH-125276)
(cherry picked from commit dd0ee201da34d1d4a631d77b420728f9233f53f9)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.12] Note argparse exit code in documentation (GH-119568) (GH-125275)
Miss Islington (bot) [Thu, 10 Oct 2024 18:18:01 +0000 (20:18 +0200)] 
[3.12] Note argparse exit code in documentation (GH-119568) (GH-125275)

(cherry picked from commit 3b87fb74c907510402678bf1b7c4a94df0e5e65a)

Co-authored-by: Justin Kunimune <justinkunimune@gmail.com>
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
13 months ago[3.12] gh-121607: Edited source file import recipe to make it more clear (GH-121519...
Miss Islington (bot) [Thu, 10 Oct 2024 17:31:27 +0000 (19:31 +0200)] 
[3.12] gh-121607: Edited source file import recipe to make it more clear (GH-121519) (GH-124081)

gh-121607: Edited source file import recipe to make it more clear (GH-121519)
(cherry picked from commit 38809171b8768517824fb62d48abe2cb0aff8429)

Co-authored-by: Chris Barker <Chris.Barker@noaa.gov>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
13 months ago[3.12] gh-125118: don't copy arbitrary values to _Bool in the struct module (GH-12516...
Sergey B Kirpichev [Thu, 10 Oct 2024 14:56:49 +0000 (17:56 +0300)] 
[3.12] gh-125118: don't copy arbitrary values to _Bool in the struct module (GH-125169) (#125265)

memcopy'ing arbitrary values to _Bool variable triggers undefined
behaviour. Avoid this.
We assume that `false` is represented by all zero bytes.

Credits to Alex Gaynor.

(cherry picked from commit 87d7315ac57250046372b0d9ae4619ba619c8c87)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
13 months ago[3.12] gh-124471: Set name for unnamed reusable workflow (GH-124475) (gh-125257)
Donghee Na [Thu, 10 Oct 2024 13:01:41 +0000 (22:01 +0900)] 
[3.12] gh-124471: Set name for unnamed reusable workflow (GH-124475) (gh-125257)

(cherry picked from commit e4cab488d4445e8444932f3bed1c329c0d9e5038)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
13 months ago[3.12] gh-71784: [doc] add usage examples for traceback.TracebackException (GH-125189...
Miss Islington (bot) [Thu, 10 Oct 2024 10:37:14 +0000 (12:37 +0200)] 
[3.12] gh-71784: [doc] add usage examples for traceback.TracebackException (GH-125189) (#125248)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
13 months ago[3.12] Pin the doctest workflow to Ubuntu 22.04 (GH-125236) (#125241)
Miss Islington (bot) [Thu, 10 Oct 2024 09:52:54 +0000 (11:52 +0200)] 
[3.12] Pin the doctest workflow to Ubuntu 22.04 (GH-125236) (#125241)

Pin the doctest workflow to Ubuntu 22.04 (GH-125236)
(cherry picked from commit 7a10cdec359750b5154490fa9e24475c90d05aab)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.12] GH-121970: Extract ``availability`` into a new extension (GH-125082) (#125238)
Adam Turner [Thu, 10 Oct 2024 09:16:03 +0000 (10:16 +0100)] 
[3.12] GH-121970: Extract ``availability`` into a new extension (GH-125082) (#125238)

(cherry picked from commit cbfd39247983309a9ef0ae6da6c61cc71665b967)

13 months ago[3.12] gh-101100: Consolidate documentation on `ModuleType` attributes (#124709)...
Alex Waygood [Wed, 9 Oct 2024 19:18:38 +0000 (20:18 +0100)] 
[3.12] gh-101100: Consolidate documentation on `ModuleType` attributes (#124709) (#125211)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
13 months ago[3.12] docs: in venv table use executable name (GH-124315) (#125171)
Miss Islington (bot) [Wed, 9 Oct 2024 16:54:38 +0000 (18:54 +0200)] 
[3.12] docs: in venv table use executable name (GH-124315) (#125171)

(cherry picked from commit 7f93dbf6fec152888727a0f25a3aa030d1fe27ca)

13 months ago[3.12] gh-101100: Fix Sphinx warnings in `library/unittest.mock.rst` (GH-124106)...
Miss Islington (bot) [Wed, 9 Oct 2024 14:16:13 +0000 (16:16 +0200)] 
[3.12] gh-101100: Fix Sphinx warnings in `library/unittest.mock.rst` (GH-124106) (#125191)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
13 months ago[3.12] GH-124478: Cleanup argparse documentation (GH-124877) (#125164)
Savannah Ostrowski [Tue, 8 Oct 2024 23:20:49 +0000 (17:20 -0600)] 
[3.12] GH-124478: Cleanup argparse documentation (GH-124877) (#125164)

(cherry picked from commit 37228bd16e3ef97d32da08848552f7ef016d68ab)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
13 months ago[3.12] Tee of tee was not producing n independent iterators (gh-123884) (gh-125153)
Raymond Hettinger [Tue, 8 Oct 2024 20:16:18 +0000 (15:16 -0500)] 
[3.12] Tee of tee was not producing n independent iterators (gh-123884) (gh-125153)

13 months ago[3.12] gh-124832: Add a note to indicate that `datetime.now` may return the same...
Miss Islington (bot) [Tue, 8 Oct 2024 18:27:50 +0000 (20:27 +0200)] 
[3.12] gh-124832: Add a note to indicate that `datetime.now` may return the same instant (GH-124834) (#125146)

gh-124832: Add a note to indicate that `datetime.now` may return the same instant (GH-124834)

* Update datetime.rst

* Update datetime.rst

replace warning with note

* Update Doc/library/datetime.rst

* Update Doc/library/datetime.rst

---------

(cherry picked from commit 760b1e103a0aa696cdf448e0d500cd1bac2213fa)

Co-authored-by: spacemanspiff2007 <10754716+spacemanspiff2007@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months ago[3.12] Doc: Improve description of ``GET_LEN`` opcode (GH-114583) (#125103)
Miss Islington (bot) [Tue, 8 Oct 2024 12:32:04 +0000 (14:32 +0200)] 
[3.12] Doc: Improve description of ``GET_LEN`` opcode (GH-114583) (#125103)

Doc: Improve description of ``GET_LEN`` opcode (GH-114583)
(cherry picked from commit e8773e59a835d23b9648271e0eb79c1651581564)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
13 months ago[3.12] gh-123378: fix a crash in `UnicodeError.__str__` (GH-124935) (#125098)
Miss Islington (bot) [Tue, 8 Oct 2024 11:56:18 +0000 (13:56 +0200)] 
[3.12] gh-123378: fix a crash in `UnicodeError.__str__` (GH-124935) (#125098)

gh-123378: fix a crash in `UnicodeError.__str__` (GH-124935)
(cherry picked from commit ba14dfafd97d1fd03938ac8ddec4ca5b2f12985d)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months ago[3.12] gh-53203: Improve tests for strptime() (GH-125090) (GH-125093)
Serhiy Storchaka [Tue, 8 Oct 2024 09:47:37 +0000 (12:47 +0300)] 
[3.12] gh-53203: Improve tests for strptime() (GH-125090) (GH-125093)

Run them with different locales and different date and time.

Add the @run_with_locales() decorator to run the test with multiple
locales.

Improve the run_with_locale() context manager/decorator -- it now
catches only expected exceptions and reports the test as skipped if no
appropriate locale is available.
(cherry picked from commit 19984fe024bfd90649f1c36b78c9abf3ed72b27d)

13 months ago[3.12] gh-124653: Relax (again) detection of queue API for logging handlers (GH...
Miss Islington (bot) [Tue, 8 Oct 2024 06:24:09 +0000 (08:24 +0200)] 
[3.12] gh-124653: Relax (again) detection of queue API for logging handlers  (GH-124897) (GH-125060)

(cherry picked from commit 7ffe94fb242fd51bb07c7f0d31e94efeea3619d4)

13 months ago[3.12] gh-122392: IDLE - Fix overlapping lines in browsers (GH-122392) (GH-124975...
Miss Islington (bot) [Mon, 7 Oct 2024 19:23:08 +0000 (21:23 +0200)] 
[3.12] gh-122392: IDLE - Fix overlapping lines in browsers (GH-122392) (GH-124975) (#125062)

gh-122392: IDLE - Fix overlapping lines in browsers (GH-122392) (GH-124975)

Increase currently inadequate vertical spacing for the IDLE browsers (path,
module, and stack) on high-resolution monitors.
---------

(cherry picked from commit c5df1cb7bde7e86f046196b0e34a0b90f8fc11de)

Co-authored-by: Zhikang Yan <2951256653@qq.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
13 months ago[3.12] GH-109975: Announce final release in What's New in Python 3.13 (GH-125007...
T. Wouters [Mon, 7 Oct 2024 18:51:07 +0000 (11:51 -0700)] 
[3.12] GH-109975: Announce final release in What's New in Python 3.13 (GH-125007) (#125034)

Prepare What's New in Python 3.13 for final release
(cherry picked from commit 31516c98dd7097047ba10da8dcf728c3d580f3d6)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.12] gh-124182: Explain naming rules for struct sequence types (GH-124335) (#125056)
Miss Islington (bot) [Mon, 7 Oct 2024 17:59:31 +0000 (19:59 +0200)] 
[3.12] gh-124182: Explain naming rules for struct sequence types (GH-124335) (#125056)

gh-124182: Explain naming rules for struct sequence types (GH-124335)
(cherry picked from commit 3287c834e5370294e310450115290979aac06efa)

Co-authored-by: ffelixg <142172984+ffelixg@users.noreply.github.com>
13 months ago[3.12] gh-125018: Fix role syntax (GH-125050) (#125055)
Miss Islington (bot) [Mon, 7 Oct 2024 16:58:47 +0000 (18:58 +0200)] 
[3.12] gh-125018: Fix role syntax (GH-125050) (#125055)

gh-125018: Fix role syntax (GH-125050)
(cherry picked from commit 10094a533a947b72d01ed8195dcf540f2e7820ea)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.12] gh-125018: Add importlib.metadata semantic link targets (GH-125027) (#125048)
Alyssa Coghlan [Mon, 7 Oct 2024 14:24:45 +0000 (00:24 +1000)] 
[3.12] gh-125018: Add importlib.metadata semantic link targets (GH-125027) (#125048)

This allows direct intersphinx references to APIs via references
like `` :func:`importlib.metadata.version` ``.

---------

(cherry picked from commit cda3b5a576412a8671bbe4c68bb792ec14f1a4b1)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.12] gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026) (GH-125031)
Miss Islington (bot) [Sun, 6 Oct 2024 23:03:30 +0000 (01:03 +0200)] 
[3.12] gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026) (GH-125031)

gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026)
(cherry picked from commit 1e098dc766ba4f29a63da4f188fb214af7623365)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
13 months ago[3.12] Doc: Simplify the definition of 'soft deprecated' (GH-124988) (#125030)
Adam Turner [Sun, 6 Oct 2024 22:42:11 +0000 (23:42 +0100)] 
[3.12] Doc: Simplify the definition of 'soft deprecated' (GH-124988) (#125030)

(cherry picked from commit feca4cf64e9742b9c002d5533ced47e68b34a880)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
13 months ago[3.12] gh-125008: Fix `tokenize.untokenize` roundtrip for `\n{{` (GH-125013) (#125021)
Miss Islington (bot) [Sun, 6 Oct 2024 13:34:24 +0000 (15:34 +0200)] 
[3.12] gh-125008: Fix `tokenize.untokenize` roundtrip for `\n{{` (GH-125013) (#125021)

13 months ago[3.12] gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal...
Petr Viktorin [Fri, 4 Oct 2024 14:50:34 +0000 (16:50 +0200)] 
[3.12] gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358) (GH-124938)

gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358)

Older stable ABI extensions are allowed to make immortal objects mortal.
Instead, use `_PyUnicode_STATE` (`interned` and `statically_allocated`).
(cherry picked from commit 956270d08d5c23f59937e2f29f8e0b7f63d68afd)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
13 months ago[3.12] gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh...
Miss Islington (bot) [Thu, 3 Oct 2024 10:45:25 +0000 (12:45 +0200)] 
[3.12] gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh-124920) (gh-124931)

gh-115145: Update documentation about ``PyThreadState_DeleteCurrent`` (gh-124920)
(cherry picked from commit 9eeb21bf761070649bf8d78976a62dabb6d67a99)

Co-authored-by: Donghee Na <donghee.na@python.org>
13 months ago[3.12] gh-121982: ``csv``: Add a test case for invalid ``quoting`` constant. (GH...
Miss Islington (bot) [Thu, 3 Oct 2024 08:31:54 +0000 (10:31 +0200)] 
[3.12] gh-121982: ``csv``: Add a test case for invalid ``quoting`` constant. (GH-121983) (#124925)

gh-121982: ``csv``: Add a test case for invalid ``quoting`` constant. (GH-121983)

Test invalid quoting constant

(cherry picked from commit 656b7a3c83c79f99beac950b59c47575562ea729)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
13 months ago[3.12] gh-120378: Fix crash caused by integer overflow in `curses` (GH-124555) (...
Peter Bierma [Wed, 2 Oct 2024 21:40:49 +0000 (17:40 -0400)] 
[3.12] gh-120378: Fix crash caused by integer overflow in `curses` (GH-124555) (#124911)

This is actually an upstream problem in curses, and has been reported
to them already:
https://lists.gnu.org/archive/html/bug-ncurses/2024-09/msg00101.html

This is a nice workaround in the meantime to prevent the segfault.

(cherry picked from commit c2ba931318280796a6dcc33d1a5c5c02ad4d035b)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months ago[3.12] gh-123978: Remove broken time.thread_time() on NetBSD (GH-124116) (GH-124427)
Serhiy Storchaka [Wed, 2 Oct 2024 18:02:14 +0000 (21:02 +0300)] 
[3.12] gh-123978: Remove broken time.thread_time() on NetBSD (GH-124116) (GH-124427)

(cherry picked from commit e670a113b5e1fcc3ce3bb9b5b4b1f126264ae21b)

13 months ago[3.12] gh-85935: Improve tests for invalid arguments in test_argparse (GH-124891...
Miss Islington (bot) [Wed, 2 Oct 2024 14:31:20 +0000 (16:31 +0200)] 
[3.12] gh-85935: Improve tests for invalid arguments in test_argparse (GH-124891) (GH-124898)

Check also specific error messages.
(cherry picked from commit 2c050d4bc28bffd2990b5a0bd03fb6fc56b13656)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.12] gh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly...
Miss Islington (bot) [Wed, 2 Oct 2024 10:36:54 +0000 (12:36 +0200)] 
[3.12] gh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly (GH-124845) (#124885)

gh-122864: Fix a ``test_funcattrs.test___builtins__`` when executing directly (GH-124845)

Previously when executing ``test_functattrs.test___builtins__`` directly, it failed because the fact, that ``__builtins__`` is refers to the built-in module ``builtins`` while it's expects a ``__builtins__.__dict__``. But when this test is being run from another module, then ``__builtins__`` is refers to ``builtins.__dict__``. Now this part of the behaviour is covered.
---------

(cherry picked from commit 8fbf10d6cfd9c69ffcc1f80fa0c5f33785197af7)

Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
13 months ago[3.12] gh-58282: Fix support of tuple metavar for positional arguments in argparse...
Miss Islington (bot) [Wed, 2 Oct 2024 09:07:38 +0000 (11:07 +0200)] 
[3.12] gh-58282: Fix support of tuple metavar for positional arguments in argparse (GH-124782) (GH-124881)

Previously, formatting help output or error message for positional argument
with a tuple metavar raised exception.

(cherry picked from commit 9b31a2d83fa7cb0fe4d75ce7cf6a2c9ea2ce0728)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Cyker Way <cykerway@gmail.com>
13 months ago[3.12] Highlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH...
Miss Islington (bot) [Wed, 2 Oct 2024 04:57:07 +0000 (06:57 +0200)] 
[3.12] Highlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH-124811) (GH-124863)

Highlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH-124811)

Thanks to the reviewers for suggesting the use of a "caution" section instead of "warning" or "note".
(cherry picked from commit d150e4abcfc13770c2d239878ed337fb53e51de5)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
13 months ago[3.12] gh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843) (GH...
Miss Islington (bot) [Tue, 1 Oct 2024 16:22:05 +0000 (18:22 +0200)] 
[3.12] gh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843) (GH-124854)

For source file "path/to/file.py" it created file with incorrect path
"/absolute/path/to/path/to/file.pyc" instead of "path/to/file.pyc".
(cherry picked from commit 60ff67d010078eca15a74b1429caf779ac4f9c74)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.12] Doc: Fix archive filenames for standard builds (GH-124826) (#124837)
Miss Islington (bot) [Tue, 1 Oct 2024 09:50:59 +0000 (11:50 +0200)] 
[3.12] Doc: Fix archive filenames for standard builds (GH-124826) (#124837)

Doc: Fix archive filenames for standard builds (GH-124826)
(cherry picked from commit 91e64be731fe42e6b252b95d79d900251388bfc6)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
14 months agoPost 3.12.7
Thomas Wouters [Tue, 1 Oct 2024 05:12:34 +0000 (07:12 +0200)] 
Post 3.12.7

14 months agoPython 3.12.7 v3.12.7
Thomas Wouters [Tue, 1 Oct 2024 02:01:22 +0000 (04:01 +0200)] 
Python 3.12.7

14 months ago[3.12] gh-124309: Revert eager task factory fix to prevent breaking downstream (GH...
Miss Islington (bot) [Tue, 1 Oct 2024 01:55:03 +0000 (03:55 +0200)] 
[3.12] gh-124309: Revert eager task factory fix to prevent breaking downstream (GH-124810) (#124817)

gh-124309: Revert eager task factory fix to prevent breaking downstream (GH-124810)

* Revert "GH-124639: add back loop param to staggered_race (GH-124700)"

This reverts commit e0a41a5dd12cb6e9277b05abebac5c70be684dd7.

* Revert "gh-124309: Modernize the `staggered_race` implementation to support eager task factories (GH-124390)"

This reverts commit de929f353c413459834a2a37b2d9b0240673d874.
(cherry picked from commit 133e929a791d209b578b4822a7a07f4570b3803b)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
14 months ago[3.12] gh-124785: Revert "[3.12] gh-116510: Fix a crash due to shared immortal intern...
Neil Schemenauer [Tue, 1 Oct 2024 01:54:41 +0000 (18:54 -0700)] 
[3.12] gh-124785: Revert "[3.12] gh-116510: Fix a crash due to shared immortal interned strings. (gh-124541)" (#124814)

Revert "[3.12] gh-116510: Fix a crash due to shared immortal interned strings. (gh-124541)"

This reverts commit 5dd07ebc0c27e2fffdfd041401c8cc7f0cda0dfc.

14 months ago[3.12] Docs: Update and proofread `library/venv.rst` (GH-124121) (#124680)
Hugo van Kemenade [Mon, 30 Sep 2024 21:18:03 +0000 (00:18 +0300)] 
[3.12] Docs: Update and proofread `library/venv.rst` (GH-124121) (#124680)

* [3.12] Docs: Update and proofread `library/venv.rst` (GH-124121)
(cherry picked from commit 23e812b84ae688a56a1011ed69a0d178c70e35ea)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* Remove 3.13 docs

---------

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
14 months ago[3.12] Docs: for for/else clarify that return or raise also skip the else (GH-124591...
Miss Islington (bot) [Mon, 30 Sep 2024 21:17:16 +0000 (23:17 +0200)] 
[3.12] Docs: for for/else clarify that return or raise also skip the else (GH-124591) (#124660)

Docs: for for/else clarify that return or raise also skip the else (GH-124591)

(cherry picked from commit 5329d1b74a86b3a22ff36f7976bfe720ee06d10d)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
14 months ago[3.12] gh-123223: Adding hyperlink of argument in warnings.catch_warnings: (GH-123231...
Miss Islington (bot) [Mon, 30 Sep 2024 21:16:42 +0000 (23:16 +0200)] 
[3.12] gh-123223: Adding hyperlink of argument in warnings.catch_warnings: (GH-123231) (#124527)

gh-123223: Adding hyperlink of argument in warnings.catch_warnings: (GH-123231)
(cherry picked from commit 828583a7855f15edc96e6721c226ace098ba463b)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
14 months ago[3.12] gh-116810: fix memory leak in ssl module (GH-123249) (GH-124801)
Miss Islington (bot) [Mon, 30 Sep 2024 20:02:13 +0000 (22:02 +0200)] 
[3.12] gh-116810: fix memory leak in ssl module (GH-123249) (GH-124801)

gh-116810: fix memory leak in ssl module (GH-123249)

Resolve a memory leak introduced in CPython 3.10's :mod:`ssl` when the :attr:`ssl.SSLSocket.session` property was accessed. Speeds up read and write access to said property by no longer unnecessarily cloning session objects via serialization.

(cherry picked from commit 7e7223e18f58ec48fb36a68fb75b5c5b7a45042a)

Co-authored-by: Jeffrey R. Van Voorst <jeff.vanvoorst@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Antoine Pitrou <antoine@python.org>
14 months ago[3.12] Doc: Run HTML and non-HTML daily builds separately (GH-124493) (#124791)
Miss Islington (bot) [Mon, 30 Sep 2024 16:55:15 +0000 (18:55 +0200)] 
[3.12] Doc: Run HTML and non-HTML daily builds separately (GH-124493) (#124791)

Doc: Run HTML and non-HTML daily builds separately (GH-124493)
(cherry picked from commit cce1125574f7b74343afda4bd0030706f67e13df)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
14 months ago[3.12] Fix `c-api/file.rst` indexes (GH-114608) (#124786)
sobolevn [Mon, 30 Sep 2024 13:50:33 +0000 (16:50 +0300)] 
[3.12] Fix `c-api/file.rst` indexes (GH-114608) (#124786)

(cherry picked from commit 23fb9f0777b054526b3b32f58e60b2a03132bf45)

14 months ago[3.12] Create hyperlink and fix typos in macOS installer (#123805)
Hugo van Kemenade [Sun, 29 Sep 2024 17:11:29 +0000 (20:11 +0300)] 
[3.12] Create hyperlink and fix typos in macOS installer (#123805)

Co-authored-by: Ned Deily <nad@python.org>
14 months ago[3.12] Docs: improve generic `typing.NamedTuple` example (GH-124739) (#124765)
Miss Islington (bot) [Sun, 29 Sep 2024 11:13:25 +0000 (13:13 +0200)] 
[3.12] Docs: improve generic `typing.NamedTuple` example (GH-124739) (#124765)

Docs: improve generic `typing.NamedTuple` example (GH-124739)
(cherry picked from commit 76fbee642e78eacf3866102f31e0ac969b57f1e6)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
14 months ago[3.12] gh-58573: Fix conflicts between abbreviated long options in the parent parser...
Miss Islington (bot) [Sun, 29 Sep 2024 09:18:06 +0000 (11:18 +0200)] 
[3.12] gh-58573: Fix conflicts between abbreviated long options in the parent parser and subparsers in argparse (GH-124631) (GH-124759)

Check for ambiguous options if the option is consumed, not when it is
parsed.
(cherry picked from commit 3f27153e077d7e9448e2f081275931968b40cc74)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.12] gh-116850: Fix argparse for namespaces with not directly writable dict (GH...
Miss Islington (bot) [Sun, 29 Sep 2024 08:40:00 +0000 (10:40 +0200)] 
[3.12] gh-116850: Fix argparse for namespaces with not directly writable dict (GH-124667) (GH-124758)

It now always uses setattr() instead of setting the dict item to modify
the namespace. This allows to use a class as a namespace.
(cherry picked from commit 95e92ef6c74e973ea13d15180190d0fa2af82fbf)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.12] gh-61181: Fix support of choices with string value in argparse (GH-124578...
Miss Islington (bot) [Sun, 29 Sep 2024 08:32:51 +0000 (10:32 +0200)] 
[3.12] gh-61181: Fix support of choices with string value in argparse (GH-124578) (GH-124756)

Substrings of the specified string no longer considered valid values.
(cherry picked from commit f1a2417b9e2993e584610851ac004c8b0599b323)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.12] gh-124345: Support abbreviated single-dash long options with = in argparse...
Miss Islington (bot) [Sun, 29 Sep 2024 08:30:26 +0000 (10:30 +0200)] 
[3.12] gh-124345: Support abbreviated single-dash long options with = in argparse (GH-124428) (GH-124754)

(cherry picked from commit 61180446eee2aef07b042c7e8892c45afabd1499)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.12] gh-80259: Fix conflict between type and default=SUPPRESS in argparse (GH-12451...
Miss Islington (bot) [Sun, 29 Sep 2024 08:17:08 +0000 (10:17 +0200)] 
[3.12] gh-80259: Fix conflict between type and default=SUPPRESS in argparse (GH-124519) (GH-124752)

type() no longer called for SUPPRESS.

This only affects positional arguments with nargs='?'.
(cherry picked from commit 9bcadf589ab6f7b9d309290de7a80156b6905d35)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.12] gh-104860: Fix allow_abbrev=False for single-dash long options (GH-124340...
Miss Islington (bot) [Sun, 29 Sep 2024 08:16:38 +0000 (10:16 +0200)] 
[3.12] gh-104860: Fix allow_abbrev=False for single-dash long options (GH-124340) (GH-124750)

(cherry picked from commit 49e105f9488de18d3d92948232fcbd956cbe0c6e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.12] GH-124639: add back loop param to staggered_race (GH-124700) (#124744)
Miss Islington (bot) [Sun, 29 Sep 2024 03:40:41 +0000 (05:40 +0200)] 
[3.12] GH-124639: add back loop param to staggered_race (GH-124700) (#124744)

GH-124639: add back loop param to staggered_race (GH-124700)
(cherry picked from commit e0a41a5dd12cb6e9277b05abebac5c70be684dd7)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
14 months ago[3.12] docs: improve venv docs (GH-124540) (#124728)
Jelle Zijlstra [Sat, 28 Sep 2024 13:09:38 +0000 (06:09 -0700)] 
[3.12] docs: improve venv docs (GH-124540) (#124728)

- Move "versionchanged" notes that apply to the whole class to the
  end of the class docs
- Remove or move notes next to the method list that apply to individual
  methods.
- Mark up parameters using the appropriate syntax
- Do not capitalize "boolean"
- Shorten some text
(cherry picked from commit c976d789a98047ae7ddec6d13c9ea7086d9fa3f9)

14 months ago[3.12] Doc: Fix default ``latex_elements['papersize']`` (GH-124525) (#124726)
Miss Islington (bot) [Sat, 28 Sep 2024 10:38:51 +0000 (12:38 +0200)] 
[3.12] Doc: Fix default ``latex_elements['papersize']`` (GH-124525) (#124726)

Doc: Fix default ``latex_elements['papersize']`` (GH-124525)

https://www.sphinx-doc.org/en/master/latex.htmlGH-the-latex-elements-configuration-setting

It should be 'letterpaper' or 'a4paper' not 'letter' or 'a4'
(not to be confused with PAPER env variable).
(cherry picked from commit fae5058ec13aa3b4f1acc549fadfbbbc2628f1e9)

Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com>
14 months ago[3.12] gh-90190: Add doc for using `singledispatch` with precise collection type...
Miss Islington (bot) [Fri, 27 Sep 2024 21:17:37 +0000 (23:17 +0200)] 
[3.12] gh-90190: Add doc for using `singledispatch` with precise collection type hints (GH-116544) (#124711)

Co-authored-by: Matt Delengowski <matt.delengowski@gmail.com>
14 months ago[3.12] gh-113993: Make interned strings mortal (GH-120520, GH-121364, GH-121903,...
Petr Viktorin [Fri, 27 Sep 2024 20:28:48 +0000 (22:28 +0200)] 
[3.12] gh-113993: Make interned strings mortal (GH-120520, GH-121364, GH-121903, GH-122303) (#123065)

This backports several PRs for gh-113993, making interned strings mortal so they can be garbage-collected when no longer needed.

* Allow interned strings to be mortal, and fix related issues (GH-120520)

  * Add an InternalDocs file describing how interning should work and how to use it.

  * Add internal functions to *explicitly* request what kind of interning is done:
    - `_PyUnicode_InternMortal`
    - `_PyUnicode_InternImmortal`
    - `_PyUnicode_InternStatic`

  * Switch uses of `PyUnicode_InternInPlace` to those.

  * Disallow using `_Py_SetImmortal` on strings directly.
    You should use `_PyUnicode_InternImmortal` instead:
    - Strings should be interned before immortalization, otherwise you're possibly
      interning a immortalizing copy.
    - `_Py_SetImmortal` doesn't handle the `SSTATE_INTERNED_MORTAL` to
      `SSTATE_INTERNED_IMMORTAL` update, and those flags can't be changed in
      backports, as they are now part of public API and version-specific ABI.

  * Add private `_only_immortal` argument for `sys.getunicodeinternedsize`, used in refleak test machinery.

   Make sure the statically allocated string singletons are unique. This means these sets are now disjoint:
    - `_Py_ID`
    - `_Py_STR` (including the empty string)
    - one-character latin-1 singletons

    Now, when you intern a singleton, that exact singleton will be interned.

  * Add a `_Py_LATIN1_CHR` macro, use it instead of `_Py_ID`/`_Py_STR` for one-character latin-1 singletons everywhere (including Clinic).

  * Intern `_Py_STR` singletons at startup.

  * Beef up the tests. Cover internal details (marked with `@cpython_only`).

  * Add lots of assertions

* Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other API (GH-121364)

  * Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs

  * Document immortality in some functions that take `const char *`

  This is PyUnicode_InternFromString;
  PyDict_SetItemString, PyObject_SetAttrString;
  PyObject_DelAttrString; PyUnicode_InternFromString;
  and the PyModule_Add convenience functions.

  Always point out a non-immortalizing alternative.

  * Don't immortalize user-provided attr names in _ctypes

* Immortalize names in code objects to avoid crash (GH-121903)

* Intern latin-1 one-byte strings at startup (GH-122303)

There are some 3.12-specific changes, mainly to allow statically allocated strings in deepfreeze. (In 3.13, deepfreeze switched to the general `_Py_ID`/`_Py_STR`.)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
14 months ago[3.12] gh-118181: Fix parameter markup in AST docs (GH-124473). (#124705)
Tomas R [Fri, 27 Sep 2024 20:13:00 +0000 (22:13 +0200)] 
[3.12] gh-118181: Fix parameter markup in AST docs (GH-124473). (#124705)

(cherry picked from commit 09aebb1fbc0c1d771d4942844d5e2077fcdf56c9)

14 months ago[3.12] gh-124487: Update Windows API version to Windows 8.1 (#124676)
Steve Dower [Fri, 27 Sep 2024 18:35:32 +0000 (19:35 +0100)] 
[3.12] gh-124487: Update Windows API version to Windows 8.1 (#124676)

gh-124487: Update Windows API version to Windows 8.1

14 months ago[3.12] gh-119004: fix a crash in equality testing between `OrderedDict` (GH-121329...
Miss Islington (bot) [Fri, 27 Sep 2024 18:33:44 +0000 (20:33 +0200)] 
[3.12] gh-119004: fix a crash in equality testing between `OrderedDict` (GH-121329) (#124508)

gh-119004: fix a crash in equality testing between `OrderedDict` (GH-121329)
(cherry picked from commit 38a887dc3ec52c4a7222279bf4b3ca2431b86de9)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
14 months ago[3.12] Fixup indentation for docs on `ModuleSpec` attributes (#124681) (#124686)
Alex Waygood [Fri, 27 Sep 2024 17:48:33 +0000 (10:48 -0700)] 
[3.12] Fixup indentation for docs on `ModuleSpec` attributes (#124681) (#124686)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
14 months ago[3.12] gh-89683: add tests for `deepcopy` on frozen dataclasses (GH-123098) (gh-124679)
Bénédikt Tran [Fri, 27 Sep 2024 16:57:30 +0000 (18:57 +0200)] 
[3.12] gh-89683: add tests for `deepcopy` on frozen dataclasses (GH-123098) (gh-124679)

gh-89683: add tests for `deepcopy` on frozen dataclasses (gh-123098)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
14 months ago[3.12] GH-95079: document error behaviour for some unicode C APIs (GH-95080) (#124662)
Miss Islington (bot) [Fri, 27 Sep 2024 10:42:23 +0000 (12:42 +0200)] 
[3.12] GH-95079: document error behaviour for some unicode C APIs (GH-95080) (#124662)

(cherry picked from commit b79a21ea429844e84509430e636d808ea9cff244)

Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
14 months ago[3.12] gh-86673: Harden `test_ttk.test_element_create_image` (GH-123335) (#124655)
Miss Islington (bot) [Fri, 27 Sep 2024 06:48:00 +0000 (08:48 +0200)] 
[3.12] gh-86673: Harden `test_ttk.test_element_create_image` (GH-123335) (#124655)

(cherry picked from commit 08e1bbe4a329e5961716f030c6ccfe92c736bf28)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
14 months ago[3.12] gh-116510: Fix a crash due to shared immortal interned strings. (gh-124541)
Neil Schemenauer [Fri, 27 Sep 2024 01:04:03 +0000 (18:04 -0700)] 
[3.12] gh-116510: Fix a crash due to shared immortal interned strings. (gh-124541)

Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init.  In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it.  For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.

14 months ago[3.12] gh-116510: Fix crash during sub-interpreter shutdown (gh-124536)
Neil Schemenauer [Fri, 27 Sep 2024 00:50:46 +0000 (17:50 -0700)] 
[3.12] gh-116510: Fix crash during sub-interpreter shutdown (gh-124536)

Fix a bug that can cause a crash when sub-interpreters use "basic"
single-phase extension modules.  Shared objects could refer to PyGC_Head
nodes that had been freed as part of interpreter shutdown.

14 months ago[3.12] gh-115528: Update language reference for PEP 646 (GH-121181) (#124633)
Miss Islington (bot) [Thu, 26 Sep 2024 20:03:28 +0000 (22:03 +0200)] 
[3.12] gh-115528: Update language reference for PEP 646 (GH-121181) (#124633)

gh-115528: Update language reference for PEP 646 (GH-121181)

To recap: the objective is to make starred expressions valid in `subscription`,
which is used for generics: `Generic[...]`, `list[...]`, etc.

What _is_ gramatically valid in such contexts? Seemingly any of the following.
(At least, none of the following throw `SyntaxError` in a 3.12.3 REPL.)

    Generic[x]
    Generic[*x]
    Generic[*x, y]
    Generic[y, *x]
    Generic[x := 1]
    Generic[x := 1, y := 2]

So introducting

    flexible_expression: expression | assignment_expression | starred_item

end then switching `subscription` to use `flexible_expression` sorts that.

But then we need to field `yield` - for which any of the following are
apparently valid:

    yield x
    yield x,
    yield x, y
    yield *x,
    yield *x, *y

Introducing a separate `yield_list` is the simplest way I've been figure out to
do this - separating out the special case of `starred_item ,`.

(cherry picked from commit 7d3497f617edf77cb6ead6f5e62bce98d77b9ab8)

Co-authored-by: Matthew Rahtz <matthew.rahtz@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
14 months ago[3.12] Programming FAQ: Mention object.__setattr__ as a technique for delegation...
Miss Islington (bot) [Thu, 26 Sep 2024 19:19:57 +0000 (21:19 +0200)] 
[3.12] Programming FAQ: Mention object.__setattr__ as a technique for delegation (GH-124617) (#124625)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
14 months ago[3.12] gh-124378: Update test_ttk for Tcl/Tk 8.6.15 (GH-124545)
Miss Islington (bot) [Thu, 26 Sep 2024 16:20:09 +0000 (18:20 +0200)] 
[3.12] gh-124378: Update test_ttk for Tcl/Tk 8.6.15 (GH-124545)

(cherry picked from commit fb6bd31cb74d2f7e7b525ee4fe9f45475fc94ce9)

Co-authored-by: Zachary Ware <zach@python.org>
Co-authored-by: Marc Culler <culler@users.noreply.github.com>
14 months ago[3.12] Doc: Use the short version for daily downloads (GH-124602) (#124611)
Miss Islington (bot) [Thu, 26 Sep 2024 16:01:39 +0000 (18:01 +0200)] 
[3.12] Doc: Use the short version for daily downloads (GH-124602) (#124611)

Doc: Use the short version for daily downloads (GH-124602)
(cherry picked from commit 2c472d36b776636fb00881a717f69e43672588b1)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
14 months ago[3.12] gh-124498: Fix `TypeAliasType` not to be generic, when `type_params=()` (GH...
Miss Islington (bot) [Thu, 26 Sep 2024 14:46:29 +0000 (16:46 +0200)] 
[3.12] gh-124498: Fix `TypeAliasType` not to be generic, when `type_params=()` (GH-124499) (#124604)

gh-124498: Fix `TypeAliasType` not to be generic, when `type_params=()` (GH-124499)
(cherry picked from commit abe5f799e6ce1d177f79554f1b84d348b6141045)

Co-authored-by: sobolevn <mail@sobolevn.me>
14 months ago[3.12] gh-123560: Correct docs for "empty" format type for floats (GH-123561) (#124597)
Miss Islington (bot) [Thu, 26 Sep 2024 12:53:58 +0000 (14:53 +0200)] 
[3.12] gh-123560: Correct docs for "empty" format type for floats (GH-123561) (#124597)

gh-123560: Correct docs for "empty" format type for floats (GH-123561)
(cherry picked from commit 274d9ab619b8150a613275835234ea9ef935f21f)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
14 months ago[3.12] gh-124234: Improve docs for `Mock.reset_mock` (GH-124237) (#124592)
Miss Islington (bot) [Thu, 26 Sep 2024 12:24:27 +0000 (14:24 +0200)] 
[3.12] gh-124234: Improve docs for `Mock.reset_mock` (GH-124237) (#124592)

gh-124234: Improve docs for `Mock.reset_mock` (GH-124237)
(cherry picked from commit 19fed6cf6eb51044fd0c02c6338259e2dd7fd462)

Co-authored-by: sobolevn <mail@sobolevn.me>
14 months ago[3.12] Doc: Improve documentation for the ``path`` argument in ``shutil.which()`...
Tom Most [Thu, 26 Sep 2024 07:56:30 +0000 (00:56 -0700)] 
[3.12] Doc: Improve documentation for the ``path`` argument in ``shutil.which()`` (GH-124494) (#124576)

14 months ago[3.12] gh-101100: Make __subclasses__ doctest stable (GH-124577) (#124580)
Jelle Zijlstra [Thu, 26 Sep 2024 06:40:40 +0000 (23:40 -0700)] 
[3.12] gh-101100: Make __subclasses__ doctest stable (GH-124577) (#124580)

Using a standard library class makes this test difficult to maintain
as other tests and other parts of the stdlib may create subclasses,
which may still be alive when this test runs depending on GC timing.
(cherry picked from commit 08a467b537b3d9b499d060697e79b3950374ab0f)

14 months ago[3.12] gh-124309: Modernize the `staggered_race` implementation to support e… (#124574)
Kumar Aditya [Thu, 26 Sep 2024 05:39:46 +0000 (11:09 +0530)] 
[3.12] gh-124309: Modernize the `staggered_race` implementation to support e… (#124574)

gh-124309: Modernize the `staggered_race` implementation to support eager task factories (#124390)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
(cherry picked from commit de929f353c413459834a2a37b2d9b0240673d874)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
14 months ago[3.12] For-else deserves its own section in the tutorial (GH-123946) (#124563)
Miss Islington (bot) [Thu, 26 Sep 2024 00:08:07 +0000 (02:08 +0200)] 
[3.12] For-else deserves its own section in the tutorial (GH-123946) (#124563)

(cherry picked from commit ffdc80e93d9d947531fa0123e5b392c6f1fd9136)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
14 months ago[3.12] gh-123242: Note that type.__annotations__ may not exist (GH-124557) (#124562)
Jelle Zijlstra [Wed, 25 Sep 2024 23:27:10 +0000 (16:27 -0700)] 
[3.12] gh-123242: Note that type.__annotations__ may not exist (GH-124557) (#124562)

Closes GH-123242. The real criterion is that the attribute does not
exist on heap types, but I don't think we should discuss heap vs.
static types in the language reference.
(cherry picked from commit 99b23c64de301c9e77add6b0d8e60118ef807840)

14 months ago[3.12] gh-101100: Add a table of class attributes to the "Custom classes" section...
Alex Waygood [Wed, 25 Sep 2024 23:01:19 +0000 (16:01 -0700)] 
[3.12] gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480) (#124558)

14 months ago[3.12] Doc: Use ``major.minor`` for documentation distribution archive filenames...
Miss Islington (bot) [Wed, 25 Sep 2024 19:25:42 +0000 (21:25 +0200)] 
[3.12] Doc: Use ``major.minor`` for documentation distribution archive filenames (GH-124489) (#124535)

Doc: Use ``major.minor`` for documentation distribution archive filenames (GH-124489)
(cherry picked from commit 6318ffcba21f8fc155f5558237ab03aa45f0e174)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
14 months ago[3.12] gh-108951: Document how to terminate an asyncio.TaskGroup (GH-123837) (#123957)
Miss Islington (bot) [Wed, 25 Sep 2024 15:10:05 +0000 (17:10 +0200)] 
[3.12] gh-108951: Document how to terminate an asyncio.TaskGroup (GH-123837) (#123957)

gh-108951: Document how to terminate an asyncio.TaskGroup (GH-123837)

We don't want to add another API, since the recipe is straightforward and rarely needed.

The advantage is that we could backport this to the earliest Python version that has taskgroups (3.11, alas in security mode already, so we'll just do 3.12 and 3.13).
(cherry picked from commit ef05801ba0cbf090034df17e2a0420fb42c2d538)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
14 months ago[3.12] bpo-44864: Do not translate user-provided strings in ArgumentParser.add_subpar...
Miss Islington (bot) [Wed, 25 Sep 2024 10:28:27 +0000 (12:28 +0200)] 
[3.12] bpo-44864: Do not translate user-provided strings in ArgumentParser.add_subparsers() (GH-27667) (GH-124505)

Call _() on literal strings only.
(cherry picked from commit d3c76dff444046504754a437dceebc9a9c87ef18)

Co-authored-by: Jérémie Detrey <jdetrey@users.noreply.github.com>
14 months ago[3.12] gh-123445: calendar: Improve descriptions for day and month attributes (GH...
Miss Islington (bot) [Wed, 25 Sep 2024 09:31:17 +0000 (11:31 +0200)] 
[3.12] gh-123445: calendar: Improve descriptions for day and month attributes (GH-123483) (#124501)

gh-123445: calendar: Improve descriptions for day and month attributes (GH-123483)
(cherry picked from commit 8447c933da308939b06e33544ca9abc9fc46aa8b)

Co-authored-by: Mat S <mscull@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
14 months ago[3.12] Adjust build_ubuntu_ssltests job to use cache for the correct OS version ...
Miss Islington (bot) [Wed, 25 Sep 2024 01:50:18 +0000 (03:50 +0200)] 
[3.12] Adjust build_ubuntu_ssltests job to use cache for the correct OS version (GH-124482)

(cherry picked from commit 54dd77fb8c880d7655fffab934978e277b4275fe)

Authored-by: Zachary Ware <zach@python.org>