]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
16 months ago[3.13] GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to...
Miss Islington (bot) [Wed, 10 Jul 2024 08:12:54 +0000 (10:12 +0200)] 
[3.13] GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428) (gh-121565)

GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428)
(cherry picked from commit 9585a1a2a251aaa15baf6579e13dd3be0cb05f1f)

Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
16 months ago[3.13] GH-121521: Detect when wasmtime is not installed in `Tools/wasm/wasi.py` ...
Miss Islington (bot) [Tue, 9 Jul 2024 22:31:39 +0000 (00:31 +0200)] 
[3.13] GH-121521: Detect when wasmtime is not installed in `Tools/wasm/wasi.py` (GH-121522) (GH-121558)

GH-121521: Detect when wasmtime is not installed in `Tools/wasm/wasi.py` (GH-121522)
(cherry picked from commit f62161837e68c1c77961435f1b954412dd5c2b65)

Co-authored-by: Brett Cannon <brett@python.org>
16 months ago[3.13] GH-120372: Switch to wasmtime 22 (GH-121523) (GH-121557)
Miss Islington (bot) [Tue, 9 Jul 2024 22:27:29 +0000 (00:27 +0200)] 
[3.13] GH-120372: Switch to wasmtime 22 (GH-121523) (GH-121557)

GH-120372: Switch to wasmtime 22 (GH-121523)

Along the way, make the cache key in GitHub Actions for `config.cache` be more robust in the face of potential env var changes from `Tools/wasm/wasi.py`.
(cherry picked from commit 80209468144fbd1af5cd31f152a6631627a9acab)

Co-authored-by: Brett Cannon <brett@python.org>
16 months ago[3.13] gh-117657: Skip test when running under TSan (GH-121549) (GH-121553)
Miss Islington (bot) [Tue, 9 Jul 2024 21:37:30 +0000 (23:37 +0200)] 
[3.13] gh-117657: Skip test when running under TSan (GH-121549) (GH-121553)

gh-117657: Skip test when running under TSan (GH-121549)

The ProcessPoolForkserver combined with resource_tracker starts a thread
after forking, which is not supported by TSan.

Also skip test_multiprocessing_fork for the same reason
(cherry picked from commit 04397434aad9b31328785e17ac7b3a2d5097269b)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-112075: Fix dict thread safety issues (GH-119288) (#121545)
Miss Islington (bot) [Tue, 9 Jul 2024 18:13:23 +0000 (20:13 +0200)] 
[3.13] gh-112075: Fix dict thread safety issues (GH-119288) (#121545)

(cherry picked from commit f0ed1863bd7a0b9d021fb59e156663a7ec553f0e)

Co-authored-by: Germán Méndez Bravo <kronuz@fb.com>
16 months ago[3.13] gh-117657: Fix TSAN races in setobject.c (GH-121511) (#121541)
Miss Islington (bot) [Tue, 9 Jul 2024 16:36:36 +0000 (18:36 +0200)] 
[3.13] gh-117657: Fix TSAN races in setobject.c (GH-121511) (#121541)

The `used` field must be written using atomic stores because `set_len`
and iterators may access the field concurrently without holding the
per-object lock.
(cherry picked from commit 9c08f40a613d9aee78de4ce4ec3e125d1496d148)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534...
Miss Islington (bot) [Tue, 9 Jul 2024 16:06:46 +0000 (18:06 +0200)] 
[3.13] gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534) (#121539)

gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534)
(cherry picked from commit 649d5b6d7b04607dd17810ac73e8f16720c6dc78)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] Docs: fix typo and duplicate word in configure.rst (GH-121410) (#121532)
Miss Islington (bot) [Tue, 9 Jul 2024 12:40:59 +0000 (14:40 +0200)] 
[3.13] Docs: fix typo and duplicate word in configure.rst (GH-121410) (#121532)

(cherry picked from commit 9ba2a4638d7b620c939face7642b2f53a9fadc4b)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
16 months ago[3.13] gh-121333: Clarify what is the default executor for asyncio.run_in_executor...
Miss Islington (bot) [Tue, 9 Jul 2024 09:42:45 +0000 (11:42 +0200)] 
[3.13] gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335) (#121526)

gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335)
(cherry picked from commit facf9862da0cf9331550747197800d682cd371fb)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
16 months ago[3.13] gh-121110: Fix Extension Module Tests Under Py_TRACE_REFS Builds (gh-121517)
Miss Islington (bot) [Mon, 8 Jul 2024 21:34:58 +0000 (23:34 +0200)] 
[3.13] gh-121110: Fix Extension Module Tests Under Py_TRACE_REFS Builds (gh-121517)

The change in gh-118157 (b2cd54a) should have also updated clear_singlephase_extension() but didn't.  We fix that here.  Note that clear_singlephase_extension() (AKA _PyImport_ClearExtension()) is only used in tests.

(cherry picked from commit 15d48aea02099ffc5bdc5511cc53ced460cb31b9, AKA gh-121503)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-121368: Fix seq lock memory ordering in _PyType_Lookup (GH-121388) (#121505)
Miss Islington (bot) [Mon, 8 Jul 2024 19:15:58 +0000 (21:15 +0200)] 
[3.13] gh-121368: Fix seq lock memory ordering in _PyType_Lookup (GH-121388) (#121505)

The `_PySeqLock_EndRead` function needs an acquire fence to ensure that
the load of the sequence happens after any loads within the read side
critical section. The missing fence can trigger bugs on macOS arm64.

Additionally, we need a release fence in `_PySeqLock_LockWrite` to
ensure that the sequence update is visible before any modifications to
the cache entry.
(cherry picked from commit 1d3cf79a501a93a7a488fc75d4db3060c5ee7d1a)

Co-authored-by: Sam Gross <colesbury@gmail.com>
16 months ago[3.13] gh-121487: Fix deprecation warning for ATOMIC_VAR_INIT in mimalloc (gh-121488...
Miss Islington (bot) [Mon, 8 Jul 2024 18:59:25 +0000 (20:59 +0200)] 
[3.13] gh-121487: Fix deprecation warning for ATOMIC_VAR_INIT in mimalloc (gh-121488) (#121504)

(cherry picked from commit 31873bea471020ca5deaf735d9acb0f1abeb1d3c)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
16 months ago[3.13] GH-121012: Set index to -1 when list iterators become exhausted in tier 2...
Miss Islington (bot) [Mon, 8 Jul 2024 17:09:54 +0000 (19:09 +0200)] 
[3.13] GH-121012: Set index to -1 when list iterators become exhausted in tier 2 (GH-121483) (GH-121494)

16 months ago[3.13] gh-121374: Correct docstrings in `_interpchannels` (gh-121501)
Miss Islington (bot) [Mon, 8 Jul 2024 16:57:10 +0000 (18:57 +0200)] 
[3.13] gh-121374: Correct docstrings in `_interpchannels` (gh-121501)

(cherry picked from commit 5289550b33de3d56f89a5d44a665283f7c8483a7, AKA gh-121418)

Co-authored-by: Max Muoto <maxmuoto@gmail.com>
16 months ago[3.13] gh-121338: Remove GH-pragma optimize (GH-121340) (#121492)
Miss Islington (bot) [Mon, 8 Jul 2024 13:22:44 +0000 (15:22 +0200)] 
[3.13] gh-121338: Remove GH-pragma optimize (GH-121340) (#121492)

gh-121338: Remove GH-pragma optimize (GH-121340)
(cherry picked from commit d69529d31ccd1510843cfac1ab53bb8cb027541f)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
16 months agoFixed regenerating files in a checkout path with spaces (GH-121384)
Miss Islington (bot) [Mon, 8 Jul 2024 12:18:02 +0000 (14:18 +0200)] 
Fixed regenerating files in a checkout path with spaces (GH-121384)

(cherry picked from commit 0e77540d86833f0a0ef964ab51f35be9bfb533f9)

Co-authored-by: AraHaan <seandhunt_7@yahoo.com>
16 months ago[3.13] gh-108297: Update crashers README for test_crashers removal (#121476)
Miss Islington (bot) [Mon, 8 Jul 2024 06:54:51 +0000 (08:54 +0200)] 
[3.13] gh-108297: Update crashers README for test_crashers removal (#121476)

Update Lib/test/crashers/README for test_crashers removal
(cherry picked from commit 59be79ae60073f7b6bdf6ce921560c279937e4ab)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
16 months ago[3.13] gh-121461: Fix os.path.normpath documentation indentation (GH-121466) (#121472)
Miss Islington (bot) [Mon, 8 Jul 2024 04:08:13 +0000 (06:08 +0200)] 
[3.13] gh-121461: Fix os.path.normpath documentation indentation (GH-121466) (#121472)

gh-121461: Fix os.path.normpath documentation indentation (GH-121466)
(cherry picked from commit bf74db731bf108e880348f2925160af61570dbf4)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
16 months ago[3.13] gh-121467: Fix makefile to include mimalloc headers (GH-121469) (#121471)
Miss Islington (bot) [Mon, 8 Jul 2024 01:10:17 +0000 (03:10 +0200)] 
[3.13] gh-121467: Fix makefile to include mimalloc headers (GH-121469) (#121471)

gh-121467: Fix makefile to include mimalloc headers (GH-121469)
(cherry picked from commit 5aa1e60e0cc9c48abdd8d2c03fcc71927cf95204)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
16 months ago[3.13] gh-121351: Skip test_not_wiping_history_file() if no readline (GH-121422)...
Miss Islington (bot) [Sat, 6 Jul 2024 23:18:20 +0000 (01:18 +0200)] 
[3.13] gh-121351: Skip test_not_wiping_history_file() if no readline (GH-121422) (#121449)

gh-121351: Skip test_not_wiping_history_file() if no readline (GH-121422)
(cherry picked from commit 68e279b37aae3019979a05ca55f462b11aac14be)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
16 months ago[3.13] gh-119909: Fix ``NameError`` in ``asyncio`` REPL (GH-121341) (#121447)
Miss Islington (bot) [Sat, 6 Jul 2024 23:02:33 +0000 (01:02 +0200)] 
[3.13] gh-119909: Fix ``NameError`` in ``asyncio`` REPL (GH-121341) (#121447)

gh-119909: Fix ``NameError`` in ``asyncio`` REPL (GH-121341)
(cherry picked from commit 114389470ec3db457c589b3991b695258d23ce5a)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
16 months ago[3.13] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-121437) (#121441)
Miss Islington (bot) [Sat, 6 Jul 2024 18:23:31 +0000 (20:23 +0200)] 
[3.13] Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-121437) (#121441)

Regen ``Doc/requirements-oldest-sphinx.txt`` (GH-121437)

regen dependencies
(cherry picked from commit 53e12025cd7d7ee46ce10cc8f1b722c55716b892)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
16 months ago[3.13] [docs] fix a Sphinx directive in `c-api/object.rst` (GH-121430) (#121440)
Miss Islington (bot) [Sat, 6 Jul 2024 18:13:57 +0000 (20:13 +0200)] 
[3.13] [docs] fix a Sphinx directive in `c-api/object.rst` (GH-121430) (#121440)

[docs] fix a Sphinx directive in `c-api/object.rst` (GH-121430)
(cherry picked from commit ada964fba06c0d142b8746d140817ea151314d33)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.13] gh-121359: Run test_pyrepl in isolated mode (GH-121414) (#121417)
Miss Islington (bot) [Fri, 5 Jul 2024 20:55:14 +0000 (22:55 +0200)] 
[3.13] gh-121359: Run test_pyrepl in isolated mode (GH-121414) (#121417)

gh-121359: Run test_pyrepl in isolated mode (GH-121414)

run_repl() now pass the -I option (isolated mode) to Python if the
'env' parameter is not set.
(cherry picked from commit 6239d41527d5977aa5d44e4b894d719bc045860e)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] Update example of str.split, bytes.split (GH-121287) (#121415)
Miss Islington (bot) [Fri, 5 Jul 2024 20:25:35 +0000 (22:25 +0200)] 
[3.13] Update example of str.split, bytes.split (GH-121287) (#121415)

Update example of str.split, bytes.split (GH-121287)

In `{str,bytes}.strip(chars)`, multiple characters are not treated as a
prefix/suffix, but as individual characters. This may make users confuse
whether `split` has similar behavior.
Users may incorrectly expect that
`'Good morning, John.'.split(', .') == ['Good', 'morning', 'John']`

Adding a bit of clarification in the doc.

(cherry picked from commit 892e3a1b708391cb43517a141f9b9712e047b8a4)

Co-authored-by: Yuxin Wu <ppwwyyxxc@gmail.com>
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
16 months ago[3.13] gh-90437: Fix __main__.py documentation wording (GH-116309) (#121385)
Miss Islington (bot) [Thu, 4 Jul 2024 23:05:02 +0000 (01:05 +0200)] 
[3.13] gh-90437: Fix __main__.py documentation wording (GH-116309) (#121385)

gh-90437: Fix __main__.py documentation wording (GH-116309)
(cherry picked from commit cb688bab08559079d0ee9ffd841dd6eb11116181)

Co-authored-by: Ali Tavallaie <tavallaie@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
16 months ago[3.13] gh-121084: Fix test_typing random leaks (GH-121360) (#121373)
Miss Islington (bot) [Thu, 4 Jul 2024 18:07:07 +0000 (20:07 +0200)] 
[3.13] gh-121084: Fix test_typing random leaks (GH-121360) (#121373)

gh-121084: Fix test_typing random leaks (GH-121360)

Clear typing ABC caches when running tests for refleaks (-R option):
call _abc_caches_clear() on typing abstract classes and their
subclasses.
(cherry picked from commit 5f660e8e2ca3acfb89ccbdd990f072149b6baa6a)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-106597: Remove unnecessary CFrame offsets (GH-121369) (#121370)
Miss Islington (bot) [Thu, 4 Jul 2024 17:52:03 +0000 (19:52 +0200)] 
[3.13] gh-106597: Remove unnecessary CFrame offsets (GH-121369) (#121370)

gh-106597: Remove unnecessary CFrame offsets (GH-121369)
(cherry picked from commit f5c8d67de6c68bea2860d5d96af747c5e95dbf22)

Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
16 months agogh-118507: Amend news entry to mention ntpath.isfile bugfix (GH-120817)
Steve Dower [Thu, 4 Jul 2024 15:15:22 +0000 (16:15 +0100)] 
gh-118507: Amend news entry to mention ntpath.isfile bugfix (GH-120817)

16 months ago[3.13] gh-121355: Fix incorrect word in simple_stmts.rst (GH-121356) (#121362)
Miss Islington (bot) [Thu, 4 Jul 2024 13:53:41 +0000 (15:53 +0200)] 
[3.13] gh-121355: Fix incorrect word in simple_stmts.rst (GH-121356) (#121362)

(cherry picked from commit 715ec630dd78819ed79cad5ac28617daefe1e745)

Co-authored-by: Jongbum Won <71166964+Wondaeng@users.noreply.github.com>
16 months ago[3.13] gh-121201: Disable perf_trampoline on riscv64 for now (GH-121328) (#121336)
Miss Islington (bot) [Thu, 4 Jul 2024 08:57:52 +0000 (10:57 +0200)] 
[3.13] gh-121201: Disable perf_trampoline on riscv64 for now (GH-121328) (#121336)

gh-121201: Disable perf_trampoline on riscv64 for now (GH-121328)

Disable perf_trampoline on riscv64 for now

Until support is added in perf_jit_trampoline.c

gh-120089 was incomplete.
(cherry picked from commit ca2e8765009d0d3eb9fe6c75465825c50808f4dd)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
16 months ago[3.13] gh-117983: Defer import of threading for lazy module loading (GH-120233) ...
Miss Islington (bot) [Wed, 3 Jul 2024 21:14:42 +0000 (23:14 +0200)] 
[3.13] gh-117983: Defer import of threading for lazy module loading (GH-120233) (GH-121349)

gh-117983: Defer import of threading for lazy module loading (GH-120233)

As noted in gh-117983, the import importlib.util can be triggered at
interpreter startup under some circumstances, so adding threading makes
it a potentially obligatory load.
Lazy loading is not used in the stdlib, so this removes an unnecessary
load for the majority of users and slightly increases the cost of the
first lazily loaded module.

An obligatory threading load breaks gevent, which monkeypatches the
stdlib. Although unsupported, there doesn't seem to be an offsetting
benefit to breaking their use case.

For reference, here are benchmarks for the current main branch:

```
❯ hyperfine -w 8 './python -c "import importlib.util"'
Benchmark 1: ./python -c "import importlib.util"
  Time (mean ± σ):       9.7 ms ±   0.7 ms    [User: 7.7 ms, System: 1.8 ms]
  Range (min … max):     8.4 ms …  13.1 ms    313 runs
```

And with this patch:

```
❯ hyperfine -w 8 './python -c "import importlib.util"'
Benchmark 1: ./python -c "import importlib.util"
  Time (mean ± σ):       8.4 ms ±   0.7 ms    [User: 6.8 ms, System: 1.4 ms]
  Range (min … max):     7.2 ms …  11.7 ms    352 runs
```

Compare to:

```
❯ hyperfine -w 8 './python -c pass'
Benchmark 1: ./python -c pass
  Time (mean ± σ):       7.6 ms ±   0.6 ms    [User: 5.9 ms, System: 1.6 ms]
  Range (min … max):     6.7 ms …  11.3 ms    390 runs
```

This roughly halves the import time of importlib.util.
(cherry picked from commit 94f50f8ee6872007d46c385f7af253497273255a)

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
16 months ago[3.13] gh-118714: Make the pdb post-mortem restart/quit behavior more reasonable...
Miss Islington (bot) [Wed, 3 Jul 2024 19:15:53 +0000 (21:15 +0200)] 
[3.13] gh-118714: Make the pdb post-mortem restart/quit behavior more reasonable (GH-118725) (#121346)

gh-118714: Make the pdb post-mortem restart/quit behavior more reasonable (GH-118725)
(cherry picked from commit e245ed7d1e23b5c8bc0d568bd1a2f06ae92d631a)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
16 months ago[3.13] gh-112136: Restore removed _PyArg_Parser (GH-121262) (#121344)
Miss Islington (bot) [Wed, 3 Jul 2024 18:29:00 +0000 (20:29 +0200)] 
[3.13] gh-112136: Restore removed _PyArg_Parser (GH-121262) (#121344)

gh-112136: Restore removed _PyArg_Parser (GH-121262)

Restore the private _PyArg_Parser structure and the private
_PyArg_ParseTupleAndKeywordsFast() function, previously removed
in Python 3.13 alpha 1.

Recreate Include/cpython/modsupport.h header file.
(cherry picked from commit f8373db153920b890c2e2dd8def249e8df63bcc6)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-121300: Add `replace` to `copy.__all__` (GH-121302) (#121337)
Miss Islington (bot) [Wed, 3 Jul 2024 15:28:57 +0000 (17:28 +0200)] 
[3.13] gh-121300: Add `replace` to `copy.__all__` (GH-121302) (#121337)

(cherry picked from commit 7c66906802cd8534b05264bd47acf9eb9db6d09e)

Co-authored-by: Max Muoto <maxmuoto@gmail.com>
16 months ago[3.13] gh-121035: Update PNG image for logging flow diagram. (GH-121323) (GH-121324)
Vinay Sajip [Wed, 3 Jul 2024 12:01:34 +0000 (13:01 +0100)] 
[3.13] gh-121035: Update PNG image for logging flow diagram. (GH-121323) (GH-121324)

(cherry picked from commit 26d24eeb90d781e381b97d64b4dcb1ee4dd891fe)

16 months ago[3.13] gh-121279: Fix importlib DeprecatedAttrsTests (#121319)
Victor Stinner [Wed, 3 Jul 2024 11:57:05 +0000 (13:57 +0200)] 
[3.13] gh-121279: Fix importlib DeprecatedAttrsTests (#121319)

Delete attributes after getting them, so the warning is emitted again
when the test is run multiple times (ex: when checking for reference
leaks).

16 months ago[3.13] gh-121245: a regression test for site.register_readline() (GH-121259) (#121322)
Miss Islington (bot) [Wed, 3 Jul 2024 11:11:41 +0000 (13:11 +0200)] 
[3.13] gh-121245: a regression test for site.register_readline() (GH-121259) (#121322)

16 months ago[3.13] gh-121035: Further improve logging flow diagram with respect to dark/light...
Vinay Sajip [Wed, 3 Jul 2024 10:41:18 +0000 (11:41 +0100)] 
[3.13] gh-121035: Further improve logging flow diagram with respect to dark/light modes. (GH-121265) (GH-121320)

[3.13] gh-121035: Further improve logging flow diagram with respect to dark/light modes. (GH-121265)
(cherry picked from commit 089835469d5efbea4793cd611b43cb8387f2e7e5)

16 months ago[3.13] gh-121035: Improve logging flow diagram for dark/light modes. (GH-121254)...
Vinay Sajip [Wed, 3 Jul 2024 10:01:50 +0000 (11:01 +0100)] 
[3.13] gh-121035: Improve logging flow diagram for dark/light modes. (GH-121254) (GH-121317)

(cherry picked from commit bfe0e4d7696647a546110328510bdb98146ad2f2)

16 months ago[3.13] gh-106597: Add more offsets to _Py_DebugOffsets (GH-121311) (#121312)
Miss Islington (bot) [Wed, 3 Jul 2024 09:18:15 +0000 (11:18 +0200)] 
[3.13] gh-106597: Add more offsets to _Py_DebugOffsets (GH-121311) (#121312)

gh-106597: Add more offsets to _Py_DebugOffsets (GH-121311)

Add more offsets to _Py_DebugOffsets

We add a few more offsets that are required by some out-of-process
tools, such as [Austin](https://github.com/p403n1x87/austin).
(cherry picked from commit c9bdfbe86853fcf5f2b7dce3a50b383e23384ed2)

Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
16 months ago[3.13] gh-121279: Re-add prematurely removed import warnings to importlib.abc (#121281)
Miro Hrončok [Wed, 3 Jul 2024 09:06:20 +0000 (11:06 +0200)] 
[3.13] gh-121279: Re-add prematurely removed import warnings to importlib.abc (#121281)

Fixup for 51724620e868512bbedb1547aca441bcd27bbe0c

Fixes https://github.com/python/cpython/issues/121279

16 months ago[3.13] docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237) (#121309)
Miss Islington (bot) [Wed, 3 Jul 2024 08:23:51 +0000 (10:23 +0200)] 
[3.13] docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237) (#121309)

docs: Fix "Py_TPFLAGS_MANAGED_WEAKREF is set in tp_flags" (GH-112237)
(cherry picked from commit 4232976b02cb999335c6bfdec3315520b21954f2)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
16 months ago[3.13] gh-120782: Update internal type cache when reloading datetime (GH-120829)...
neonene [Wed, 3 Jul 2024 08:22:51 +0000 (17:22 +0900)] 
[3.13] gh-120782: Update internal type cache when reloading datetime (GH-120829) (#120855)

* [3.13] gh-120782: Update internal type cache when reloading datetime

When reloading _datetime module, the single-phase version did not invoke the PyInit__datetime function, whereas the current multi-phase version updates the static types through the module init. The outdated static type cache in the interpreter state needs to be invalidated at the end of reloading the multi-phase module.

16 months ago[3.13] gh-116181: Remove Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE in rotatingtr...
Miss Islington (bot) [Wed, 3 Jul 2024 07:59:26 +0000 (09:59 +0200)] 
[3.13] gh-116181: Remove Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE in rotatingtree.c (GH-121260) (#121307)

gh-116181: Remove Py_BUILD_CORE_BUILTIN and Py_BUILD_CORE_MODULE in rotatingtree.c (GH-121260)
(cherry picked from commit 705a123898f1394b62076c00ab6008c18fd8e115)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
16 months ago[3.13] gh-115773: Add sizes to debug offset structure (GH-120112) (#121283)
Miss Islington (bot) [Tue, 2 Jul 2024 18:19:26 +0000 (20:19 +0200)] 
[3.13] gh-115773: Add sizes to debug offset structure (GH-120112) (#121283)

gh-115773: Add sizes to debug offset structure (GH-120112)
(cherry picked from commit b180788d4a927d23af54f4b4702ccaf254f64854)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
16 months ago[3.13] gh-121245: Correct pyrepl import in site.py (GH-121255) (#121261)
Miss Islington (bot) [Tue, 2 Jul 2024 11:40:05 +0000 (13:40 +0200)] 
[3.13] gh-121245: Correct pyrepl import in site.py (GH-121255) (#121261)

(cherry picked from commit 7a807c3efaa83f1e4fb9b791579b47a0a1fd47de)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
16 months ago[3.13] gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197) (#121242)
Miss Islington (bot) [Mon, 1 Jul 2024 20:43:34 +0000 (22:43 +0200)] 
[3.13] gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197) (#121242)

gh-121196: Document `dict.fromkeys` params as pos-only (GH-121197)
(cherry picked from commit 1dc9a4f6b20148fd4ef2eb2800a6c65224828181)

Co-authored-by: sobolevn <mail@sobolevn.me>
16 months ago[3.13] gh-117657: Fix data races reported by TSAN in some set methods (GH-120914...
Miss Islington (bot) [Mon, 1 Jul 2024 19:40:28 +0000 (21:40 +0200)] 
[3.13] gh-117657: Fix data races reported by TSAN in some set methods (GH-120914) (#121240)

Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed
atomic loads in the free-threaded build.

After this change, the TSAN doesn't report data races for this method.
(cherry picked from commit 294e72496439da984cb8dba9100d3613c8cc8a6d)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
16 months ago[3.13] gh-121110: Temporarily Skip test_basic_multiple_interpreters_reset_each (gh...
Miss Islington (bot) [Mon, 1 Jul 2024 18:23:35 +0000 (20:23 +0200)] 
[3.13] gh-121110: Temporarily Skip test_basic_multiple_interpreters_reset_each (gh-121238)

This will allow Py_TRACE_REFS builds to pass the test suite, until the underlying issue can be resolved.

(cherry picked from commit 9bcb7d8c6f8277c4e76145ec4c834213167e3387, AKA gh-121236)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-114104: clarify asynchronous comprehension docs to match runtime behavior...
Miss Islington (bot) [Mon, 1 Jul 2024 16:51:43 +0000 (18:51 +0200)] 
[3.13] gh-114104: clarify asynchronous comprehension docs to match runtime behavior (GH-121175) (#121234)

gh-114104: clarify asynchronous comprehension docs to match runtime behavior (GH-121175)
(cherry picked from commit 91313afdb392d0d6105e9aaa57b5a50112b613e7)

Co-authored-by: Danny Yang <yangdanny97@users.noreply.github.com>
16 months ago[3.13] gh-121200: Fix test_expanduser_pwd2() of test_posixpath (GH-121228) (#121232)
Miss Islington (bot) [Mon, 1 Jul 2024 16:13:41 +0000 (18:13 +0200)] 
[3.13] gh-121200: Fix test_expanduser_pwd2() of test_posixpath (GH-121228) (#121232)

gh-121200: Fix test_expanduser_pwd2() of test_posixpath (GH-121228)

Call getpwnam() to get pw_dir, since it can be different than
getpwall() pw_dir.
(cherry picked from commit 02cb5fdee391670d63b2fc0a92ca9b36a32ac95a)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-121200: Log pwd entry in test_expanduser_pwd2() (GH-121207) (#121213)
Miss Islington (bot) [Mon, 1 Jul 2024 10:09:01 +0000 (12:09 +0200)] 
[3.13] gh-121200: Log pwd entry in test_expanduser_pwd2() (GH-121207) (#121213)

gh-121200: Log pwd entry in test_expanduser_pwd2() (GH-121207)

Use subTest() to log the pwd entry in test_expanduser_pwd2() of
test_posixpath to help debugging.
(cherry picked from commit 05a6f8da6042cc87da1cd3824c1375d12753e5a1)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-121084: Call _abc_registry_clear() when checking refleaks (GH-121191) ...
Miss Islington (bot) [Mon, 1 Jul 2024 09:34:53 +0000 (11:34 +0200)] 
[3.13] gh-121084: Call _abc_registry_clear() when checking refleaks (GH-121191) (#121208)

gh-121084: Call _abc_registry_clear() when checking refleaks (GH-121191)

dash_R_cleanup() now calls _abc_registry_clear() before calling again
register().
(cherry picked from commit c766ad206ea60b1e0edcb625b99e7631954a984f)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-121188: Sanitize invalid XML characters in regrtest (GH-121195) (#121204)
Miss Islington (bot) [Mon, 1 Jul 2024 08:55:38 +0000 (10:55 +0200)] 
[3.13] gh-121188: Sanitize invalid XML characters in regrtest (GH-121195) (#121204)

gh-121188: Sanitize invalid XML characters in regrtest (GH-121195)

When creating the JUnit XML file, regrtest now escapes characters
which are invalid in XML, such as the chr(27) control character used
in ANSI escape sequences.
(cherry picked from commit af8c3d7a26d605099f5b3406a8d33ecddb77e8fb)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-113565: Improve and harden detection of curses dependencies (GH-119816...
Miss Islington (bot) [Mon, 1 Jul 2024 08:35:38 +0000 (10:35 +0200)] 
[3.13] gh-113565: Improve and harden detection of curses dependencies (GH-119816) (#121202)

1. Use pkg-config to check for ncursesw/panelw. If that fails, use
   pkg-config to check for ncurses/panel.
2. Regardless of pkg-config output, search for curses/panel headers, so
   we're sure we have all defines in pyconfig.h.
3. Regardless of pkg-config output, check if libncurses or libncursesw
   contains the 'initscr' symbol; if it does _and_ pkg-config failed
   earlier, add the resulting -llib linker option to CURSES_LIBS.
   Ditto for 'update_panels' and PANEL_LIBS.
4. Wrap the rest of the checks with WITH_SAVE_ENV and make sure we're
   using updated LIBS and CPPFLAGS for those.

Add the PY_CHECK_CURSES convenience macro.
(cherry picked from commit f80376b129ad947263a6b03a6c3a874e9f8706e6)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
16 months ago[3.13] gh-87744: fix waitpid race while calling send_signal in asyncio (GH-121126...
Miss Islington (bot) [Mon, 1 Jul 2024 05:11:47 +0000 (07:11 +0200)] 
[3.13] gh-87744: fix waitpid race while calling send_signal in asyncio (GH-121126) (#121194)

gh-87744: fix waitpid race while calling send_signal in asyncio (GH-121126)

asyncio earlier relied on subprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily calls waitpid on child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks to subprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether.

(cherry picked from commit bd473aa598c5161521a7018896dc124728214a6c)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
16 months ago[3.13] [doc] Update element positions and styles in logging flow diagram. (GH-121182...
Miss Islington (bot) [Sun, 30 Jun 2024 14:06:27 +0000 (16:06 +0200)] 
[3.13] [doc] Update element positions and styles in logging flow diagram. (GH-121182) (GH-121183)

(cherry picked from commit 2a455bbe8fd91a688ae20509a2fdc8beaa8c8447)

16 months ago[3.13] gh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (GH-121178) (#121179)
Miss Islington (bot) [Sun, 30 Jun 2024 10:04:39 +0000 (12:04 +0200)] 
[3.13] gh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (GH-121178) (#121179)

gh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (GH-121178)
(cherry picked from commit c3677befbecbd7fa94cde8c1fecaa4cc18e6aa2b)

Co-authored-by: Yureka <yuka@yuka.dev>
16 months ago[3.13] gh-120522: Add a `--with-app-store-compliance` configure option to patch out...
Miss Islington (bot) [Sun, 30 Jun 2024 01:10:34 +0000 (03:10 +0200)] 
[3.13] gh-120522: Add a `--with-app-store-compliance` configure option to patch out problematic code (GH-120984) (#121173)

gh-120522: Add a `--with-app-store-compliance` configure option to patch out problematic code (GH-120984)

* Add --app-store-compliance configuration option.

* Added blurb.

* Correct tab-vs-spaces formatting issue.

* Correct source file name in docs.

* Correct source code reference in Mac docs

* Only apply the patch forward, and ensure the working directory is correct.

* Make patching reslient to multiple builds.

* Documentation fixes found during review

* Documentation and configure.ac syntax improvements

* Regenerate configure script.

* Silence the patch echo output.

---------

(cherry picked from commit 48cd104b0cf05dad8958efa9cb9666c029ef9201)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
16 months ago[3.13] GH-119054: Add alt text to pathlib inheritance diagram (GH-121158) (#121168)
Miss Islington (bot) [Sat, 29 Jun 2024 18:02:53 +0000 (20:02 +0200)] 
[3.13] GH-119054: Add alt text to pathlib inheritance diagram (GH-121158) (#121168)

GH-119054: Add alt text to pathlib inheritance diagram (GH-121158)
(cherry picked from commit 6b280a84988ca221b5bdc1077a914e873790cce5)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.13] GH-119054: Add "Expanding and resolving paths" section to pathlib docs. (GH...
Miss Islington (bot) [Sat, 29 Jun 2024 15:37:55 +0000 (17:37 +0200)] 
[3.13] GH-119054: Add "Expanding and resolving paths" section to pathlib docs. (GH-120970) (#121155)

GH-119054: Add "Expanding and resolving paths" section to pathlib docs. (GH-120970)

Add dedicated subsection for `home()`, `expanduser()`, `cwd()`,
`absolute()`, `resolve()` and `readlink()`. The position of this section
keeps all the `Path` constructors (`Path()`, `Path.from_uri()`,
`Path.home()` and `Path.cwd()`) near the top. Within the section, closely
related methods are kept adjacent. Specifically:

- `home()` and `expanduser()` (the former calls the latter)
- `cwd()` and `absolute()` (the former calls the latter)
- `absolute()` and `resolve()` (both make paths absolute)
- `resolve()` and `readlink()` (both read symlink targets)
- Ditto `cwd()` and `absolute()`
- Ditto `absolute()` and `resolve()`

The "Other methods" section is removed.

(cherry picked from commit d6d8707ff217f211f3a2e48084cc0ddfa41efc4d)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
16 months ago[3.13] gh-121101: Document -Wall option (an alias for -Walways) (GH-121102) (#121146)
Miss Islington (bot) [Sat, 29 Jun 2024 08:27:11 +0000 (10:27 +0200)] 
[3.13] gh-121101: Document -Wall option (an alias for -Walways) (GH-121102) (#121146)

gh-121101: Document -Wall option (an alias for -Walways) (GH-121102)
(cherry picked from commit 0a1e8ff9c15675fdc4d07fa6c59f83808bf00798)

Co-authored-by: Wim Jeantine-Glenn <jump@wimglenn.com>
16 months ago[3.13] gh-120713: Normalize year with century for datetime.strftime (GH-120820) ...
Miss Islington (bot) [Sat, 29 Jun 2024 06:57:33 +0000 (08:57 +0200)] 
[3.13] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121144)

(cherry picked from commit 6d34938dc8163f4a4bcc68069a1645a7ab76e935)

Co-authored-by: blhsing <blhsing@gmail.com>
16 months ago[3.13] doc: Mention the missing reflected special methods for all binary operations...
Miss Islington (bot) [Sat, 29 Jun 2024 06:42:35 +0000 (08:42 +0200)] 
[3.13] doc: Mention the missing reflected special methods for all binary operations (GH-119931) (#120063)

doc: Mention the missing reflected special methods for all binary operations (GH-119931)
(cherry picked from commit bf5e1065f4ec2077c6ca352fc1ad940a76d1f6c9)

Co-authored-by: Paulo Freitas <me@paulofreitas.me>
16 months ago[3.13] gh-121137: Add missing Py_DECREF calls for ADDITEMS opcode of _pickle.c (GH...
Miss Islington (bot) [Fri, 28 Jun 2024 23:17:34 +0000 (01:17 +0200)] 
[3.13] gh-121137: Add missing Py_DECREF calls for ADDITEMS opcode of _pickle.c (GH-121136) (#121139)

gh-121137: Add missing Py_DECREF calls for ADDITEMS opcode of _pickle.c (GH-121136)

PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added
(cherry picked from commit 92893fd8dc803ed7cdde55d29d25f84ccb5e3ef0)

Co-authored-by: Justin Applegate <70449145+Legoclones@users.noreply.github.com>
16 months agogh-121115: Skip __index__ in PyLong_AsNativeBytes by default (GH-121118)
Miss Islington (bot) [Fri, 28 Jun 2024 15:52:26 +0000 (17:52 +0200)] 
gh-121115: Skip __index__ in PyLong_AsNativeBytes by default (GH-121118)

(cherry picked from commit 2894aa14f22430e9b6d4676afead6da7c79209ca)

Co-authored-by: Steve Dower <steve.dower@python.org>
16 months ago[3.13] gh-121018: Fix more cases of exiting in argparse when exit_on_error=False...
Serhiy Storchaka [Fri, 28 Jun 2024 15:04:44 +0000 (18:04 +0300)] 
[3.13] gh-121018: Fix more cases of exiting in argparse when exit_on_error=False (GH-121056) (GH-121128)

* parse_intermixed_args() now raises ArgumentError instead of calling
  error() if exit_on_error is false.
* Internal code now always raises ArgumentError instead of calling
  error(). It is then caught at the higher level and error() is called if
  exit_on_error is true.
(cherry picked from commit 81a654a3425eaa05a51342509089533c1f623f1b)

16 months ago[3.13] gh-115986 Improve pprint docs formatting (GH-117401) (GH-121098)
Miss Islington (bot) [Fri, 28 Jun 2024 14:23:08 +0000 (16:23 +0200)] 
[3.13] gh-115986 Improve pprint docs formatting (GH-117401) (GH-121098)

* Move pprinter parameter descriptions to a table

* Make pprint doc with params markup

* Remove duplication of the parameters' description

---------

(cherry picked from commit 0890ad7c024ccf29614849b6ffadcb92c0e91ce7)

Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.13] gh-121096: Ignore dlopen() leaks in Valgrind suppression file (GH-121097)...
Miss Islington (bot) [Fri, 28 Jun 2024 11:26:37 +0000 (13:26 +0200)] 
[3.13] gh-121096: Ignore dlopen() leaks in Valgrind suppression file (GH-121097) (#121122)

gh-121096: Ignore dlopen() leaks in Valgrind suppression file (GH-121097)
(cherry picked from commit 6e63d84e43fdce3a5bdb899b024cf947d4e48900)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-105623 Fix performance degradation in logging RotatingFileHandler (GH-10588...
Miss Islington (bot) [Fri, 28 Jun 2024 09:23:38 +0000 (11:23 +0200)] 
[3.13] gh-105623 Fix performance degradation in logging RotatingFileHandler (GH-105887) (GH-121117)

The check for whether the log file is a real file is expensive on NFS
filesystems.  This commit reorders the rollover condition checking to
not do the file type check if the expected file size is less than the
rotation threshold.

(cherry picked from commit e9b4ec614b66d11623b80471409c16a109f888d5)

Co-authored-by: Craig Robson <craig@zhatt.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
16 months ago[3.13] gh-120837: Update _Py_DumpExtensionModules to be async-signal-safe (gh-121051...
Miss Islington (bot) [Thu, 27 Jun 2024 22:12:12 +0000 (00:12 +0200)] 
[3.13] gh-120837: Update _Py_DumpExtensionModules to be async-signal-safe (gh-121051) (gh-121107)

gh-120837: Update _Py_DumpExtensionModules to be async-signal-safe (gh-121051)
(cherry picked from commit 1a2e7a747540f74414e7c50556bcb2cc127e9d1c)

Co-authored-by: Donghee Na <donghee.na@python.org>
16 months ago[3.13] gh-121035: Update logging flow chart to include the lastResort handler. (GH...
Miss Islington (bot) [Thu, 27 Jun 2024 21:59:19 +0000 (23:59 +0200)] 
[3.13] gh-121035: Update logging flow chart to include the lastResort handler. (GH-121036) (GH-121106)

(cherry picked from commit 237baf4d7a789deb153fbc1fc3863550949d5da2)

16 months agoMerge branch '3.13' of https://github.com/python/cpython into 3.13
Thomas Wouters [Thu, 27 Jun 2024 18:36:45 +0000 (20:36 +0200)] 
Merge branch '3.13' of https://github.com/python/cpython into 3.13

16 months agoPost 3.13.0b3
Thomas Wouters [Thu, 27 Jun 2024 18:34:22 +0000 (20:34 +0200)] 
Post 3.13.0b3

16 months ago[3.13] gh-119521: Remove _IncompleteInputError from the docs (GH-120993) (GH-121076)
Miss Islington (bot) [Thu, 27 Jun 2024 13:19:20 +0000 (15:19 +0200)] 
[3.13] gh-119521: Remove _IncompleteInputError from the docs (GH-120993) (GH-121076)

gh-119521: Remove _IncompleteInputError from the docs (GH-120993)
(cherry picked from commit 1167a9a30b4b2f327ed987e845e378990d1ae6bf)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
16 months agoPython 3.13.0b3 v3.13.0b3
Thomas Wouters [Thu, 27 Jun 2024 13:02:18 +0000 (15:02 +0200)] 
Python 3.13.0b3

16 months ago[3.13] gh-121027: Add a future warning in functools.partial.__get__ (GH-121086) ...
Miss Islington (bot) [Thu, 27 Jun 2024 12:13:01 +0000 (14:13 +0200)] 
[3.13] gh-121027: Add a future warning in functools.partial.__get__ (GH-121086) (#121092)

gh-121027: Add a future warning in functools.partial.__get__ (GH-121086)
(cherry picked from commit db96edd6d1a58045196a71aff565743f493b5fbb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
16 months ago[3.13] gh-120888: Bump bundled pip to 24.1.1 (GH-120889) (#121080)
Miss Islington (bot) [Thu, 27 Jun 2024 10:53:01 +0000 (12:53 +0200)] 
[3.13] gh-120888: Bump bundled pip to 24.1.1 (GH-120889) (#121080)

gh-120888: Bump bundled pip to 24.1.1 (GH-120889)
(cherry picked from commit 4999e0bda091826fcdf303dd439364e1d303a5ce)

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
16 months ago[3.13] gh-120868: Fix breaking change in `logging.config` when using `QueueHandler...
Miss Islington (bot) [Thu, 27 Jun 2024 09:09:17 +0000 (11:09 +0200)] 
[3.13] gh-120868: Fix breaking change in `logging.config` when using `QueueHandler` (GH-120872) (GH-121078)

(cherry picked from commit 7d9c68513d112823a9a6cdc7453b998b2c24eb4c)

16 months ago[3.13] gh-113433: Automatically Clean Up Subinterpreters in Py_Finalize() (gh-121067)
Miss Islington (bot) [Wed, 26 Jun 2024 21:56:13 +0000 (23:56 +0200)] 
[3.13] gh-113433: Automatically Clean Up Subinterpreters in Py_Finalize() (gh-121067)

This change makes things a little less painful for some users.  It also fixes a failing assert (gh-120765), by making sure all subinterpreters are destroyed before the main interpreter.  As part of that, we make sure Py_Finalize() always runs with the main interpreter active.

(cherry picked from commit 4be1f37b20bd51498d3adf8ad603095c0f38d6e5, AKA gh-121060)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-120838: Add _PyThreadState_WHENCE_FINI (gh-121013)
Miss Islington (bot) [Wed, 26 Jun 2024 21:32:00 +0000 (23:32 +0200)] 
[3.13] gh-120838: Add _PyThreadState_WHENCE_FINI (gh-121013)

We also add _PyThreadState_NewBound() and drop _PyThreadState_SetWhence().

This change only affects internal API.

(cherry picked from commit a905721b9c5c15279e67c2f7785034b7356b2d46, AKA gh-121010)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
16 months ago[3.13] gh-121016: Add test for PYTHON_BASIC_REPL envioronment variable (GH-121017...
devdanzin [Wed, 26 Jun 2024 21:17:14 +0000 (18:17 -0300)] 
[3.13] gh-121016: Add test for PYTHON_BASIC_REPL envioronment variable (GH-121017) (#121064)

* gh-121016: Add test for `PYTHON_BASIC_REPL` envioronment variable (#121017)

(cherry picked from commit 9e45fd9858a059950f7387b4fda2b00df0e8e537)

* [3.13] gh-121016: Add test for `PYTHON_BASIC_REPL` envioronment variable (GH-121017)
(cherry picked from commit 9e45fd9858a059950f7387b4fda2b00df0e8e537)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
16 months ago[3.13] gh-120937: Reference weakref from the `__del__` documentation (GH-120940)...
Miss Islington (bot) [Wed, 26 Jun 2024 20:24:25 +0000 (22:24 +0200)] 
[3.13] gh-120937: Reference weakref from the `__del__` documentation (GH-120940) (#121061)

gh-120937: Reference weakref from the `__del__` documentation (GH-120940)
(cherry picked from commit 1c13b29d54ad6d7c9e030227d575ad7d21b4054f)

Co-authored-by: chaen <christophe.haen@cern.ch>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
16 months ago[3.13] gh-118908: Use __main__ for the default PyREPL namespace (GH-121054) (#121059)
Miss Islington (bot) [Wed, 26 Jun 2024 19:25:38 +0000 (21:25 +0200)] 
[3.13] gh-118908: Use __main__ for the default PyREPL namespace (GH-121054) (#121059)

16 months ago[3.13] gh-120593: Fix const qualifier in pyatomic.h (GH-121055) (#121057)
Miss Islington (bot) [Wed, 26 Jun 2024 18:37:28 +0000 (20:37 +0200)] 
[3.13] gh-120593: Fix const qualifier in pyatomic.h (GH-121055) (#121057)

gh-120593: Fix const qualifier in pyatomic.h (GH-121055)
(cherry picked from commit 9cd2dcbb87fb3c35d8ca3554d9472ac283f62a64)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-121008: Fix idlelib.run tests (GH-121046) (#121049)
Miss Islington (bot) [Wed, 26 Jun 2024 14:08:31 +0000 (16:08 +0200)] 
[3.13] gh-121008: Fix idlelib.run tests (GH-121046) (#121049)

gh-121008: Fix idlelib.run tests (GH-121046)

When testing IDLE, don't create a Tk to avoid side effects such as
installing a PyOS_InputHook hook.
(cherry picked from commit 44eafd66882589d4f4eb569d70c49724da3e9291)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] Ignore some failing tests in emulated JIT CI (GH-120977)
Miss Islington (bot) [Wed, 26 Jun 2024 13:56:15 +0000 (15:56 +0200)] 
[3.13] Ignore some failing tests in emulated JIT CI (GH-120977)

(cherry picked from commit 07daaf1ce10eb6d7a5ca9ea7c9055bf571d9e57f)
Co-authored-by: Diego Russo <diego.russo@arm.com>
16 months ago[3.13] gh-120642: Move private PyCode APIs to the internal C API (#120643) (#121043)
Victor Stinner [Wed, 26 Jun 2024 13:35:19 +0000 (15:35 +0200)] 
[3.13] gh-120642: Move private PyCode APIs to the internal C API (#120643) (#121043)

gh-120642: Move private PyCode APIs to the internal C API (#120643)

* Move _Py_CODEUNIT and related functions to pycore_code.h.
* Move _Py_BackoffCounter to pycore_backoff.h.
* Move Include/cpython/optimizer.h content to pycore_optimizer.h.
* Remove Include/cpython/optimizer.h.
* Remove PyUnstable_Replace_Executor().

Rename functions:

* PyUnstable_GetExecutor() => _Py_GetExecutor()
* PyUnstable_GetOptimizer() => _Py_GetOptimizer()
* PyUnstable_SetOptimizer() => _Py_SetTier2Optimizer()
* PyUnstable_Optimizer_NewCounter() => _PyOptimizer_NewCounter()
* PyUnstable_Optimizer_NewUOpOptimizer() => _PyOptimizer_NewUOpOptimizer()

(cherry picked from commit 9e4a81f00fef689c6e18a64245aa064eaadc7ac7)

16 months ago[3.13] gh-121018: Ensure ArgumentParser.parse_args with exit_on_error=False raises...
Miss Islington (bot) [Wed, 26 Jun 2024 10:16:19 +0000 (12:16 +0200)] 
[3.13] gh-121018: Ensure ArgumentParser.parse_args with exit_on_error=False raises instead of exiting when given unrecognized arguments (GH-121019) (GH-121032)

(cherry picked from commit 0654336dd5138aec04e3017e15ccbb90a44e053d)

Co-authored-by: blhsing <blhsing@gmail.com>
16 months ago[3.13] gh-120380: fix Python implementation of `pickle.Pickler` for `bytes` and ...
Miss Islington (bot) [Wed, 26 Jun 2024 10:11:28 +0000 (12:11 +0200)] 
[3.13] gh-120380: fix Python implementation of `pickle.Pickler` for `bytes` and `bytearray` objects in protocol version 5. (GH-120422) (GH-120832)

gh-120380: fix Python implementation of `pickle.Pickler` for `bytes` and `bytearray` objects in protocol version 5. (GH-120422)
(cherry picked from commit 7595e6743ac78ac0dd19418176f66d251668fafc)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.13] gh-121025: Improve partialmethod.__repr__ (GH-121033) (#121037)
Miss Islington (bot) [Wed, 26 Jun 2024 09:49:42 +0000 (11:49 +0200)] 
[3.13] gh-121025: Improve partialmethod.__repr__ (GH-121033) (#121037)

gh-121025: Improve partialmethod.__repr__ (GH-121033)

It no longer contains redundant commas and spaces.
(cherry picked from commit d2646e3f45e3e4e831ee2ae84d55b161a361d592)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.13] gh-120155: Fix Coverity issue in parse_string() (GH-120997) (#121005)
Miss Islington (bot) [Tue, 25 Jun 2024 17:40:05 +0000 (19:40 +0200)] 
[3.13] gh-120155: Fix Coverity issue in parse_string() (GH-120997) (#121005)

gh-120155: Fix Coverity issue in parse_string() (GH-120997)
(cherry picked from commit 769aea332940f03c3e5b1ad9badd6635c1ac992a)

Co-authored-by: Victor Stinner <vstinner@python.org>
16 months ago[3.13] gh-114053: Fix another edge case involving `get_type_hints`, PEP 695 and PEP...
Miss Islington (bot) [Tue, 25 Jun 2024 16:30:08 +0000 (18:30 +0200)] 
[3.13] gh-114053: Fix another edge case involving `get_type_hints`, PEP 695 and PEP 563 (GH-120272) (#121003)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
16 months ago[3.13] gh-120108: Fix deepcopying of AST trees with .parent attributes (GH-120114...
Jelle Zijlstra [Tue, 25 Jun 2024 15:39:29 +0000 (08:39 -0700)] 
[3.13] gh-120108: Fix deepcopying of AST trees with .parent attributes (GH-120114) (#121000)

(cherry picked from commit 42b2c9d78da7ebd6bd5925a4d4c78aec3c9e78e6)

16 months ago[3.13] Doc/README: Document 'make htmllive' (GH-120692) (#120990)
Miss Islington (bot) [Tue, 25 Jun 2024 09:25:54 +0000 (11:25 +0200)] 
[3.13] Doc/README: Document 'make htmllive' (GH-120692) (#120990)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
16 months ago[3.13] gh-120661: improve example for basic type hints (GH-120934) (#120987)
Miss Islington (bot) [Tue, 25 Jun 2024 08:25:29 +0000 (10:25 +0200)] 
[3.13] gh-120661: improve example for basic type hints (GH-120934) (#120987)

gh-120661: improve example for basic type hints (GH-120934)
(cherry picked from commit bb057ea1075e000ff3f0d6b27a2b7ca4117b4969)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
16 months ago[3.13] gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822) (#120985)
Miss Islington (bot) [Tue, 25 Jun 2024 08:17:53 +0000 (10:17 +0200)] 
[3.13] gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822) (#120985)

gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822)

Add missing space in AS_VAR_APPEND() on CFLAGS.
(cherry picked from commit 2106c9bef0c18ff35db7d6c083cb8f189507758e)

Co-authored-by: Michael Allwright <allsey87@gmail.com>
16 months ago[3.13] Add --with-lto back to Linux JIT CI (GH-120972)
Miss Islington (bot) [Mon, 24 Jun 2024 20:44:46 +0000 (22:44 +0200)] 
[3.13] Add --with-lto back to Linux JIT CI (GH-120972)

(cherry picked from commit fd0f814ade43fa479bfbe76dc226424db14a9354)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
16 months ago[3.13] GH-119054: Add "Permissions and ownership" section to pathlib docs. (GH-120505...
Barney Gale [Mon, 24 Jun 2024 19:32:08 +0000 (20:32 +0100)] 
[3.13] GH-119054: Add "Permissions and ownership" section to pathlib docs. (GH-120505) (#120967)

Add dedicated subsection for `pathlib.owner()`, `group()`, `chmod()` and
`lchmod()`.

(cherry picked from commit e4a97a7fb1c03d3b6ec6efbeff553a0230e003c7)