Commit Graph

122765 Commits

Author SHA1 Message Date
Miss Islington (bot) 14c5bffcc5
[3.13] gh-121605: Increase timeout in test_pyrepl.run_repl (GH-121606) (#121702)
We also need to close the `slave_fd` earlier so that reading from
`master_fd` won't block forever when the subprocess finishes.
(cherry picked from commit abc3aeebdb)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-13 12:07:12 -04:00
Miss Islington (bot) 4af9c05e78
[3.13] gh-120452: improve documentation about private name mangling (GH-120451) (#121715)
gh-120452: improve documentation about private name mangling (GH-120451)
(cherry picked from commit f4d6e45c1e)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-07-13 15:21:30 +00:00
Miss Islington (bot) b9cfb812e2
[3.13] gh-120823: Fix doc for ftplib.FTP.retrbinary() (GH-121697) (GH-121707)
(cherry picked from commit 422855ad21)

Co-authored-by: Mirela Andreea GRIGORAS <magrigoras@bitdefender.com>
2024-07-13 14:45:32 +00:00
Miss Islington (bot) 62572f10aa
[3.13] gh-121497: Make Pyrepl respect correctly the history with input hook set (GH-121498) (#121703)
gh-121497: Make Pyrepl respect correctly the history with input hook set (GH-121498)
(cherry picked from commit 4e36dd7d87)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2024-07-13 14:28:49 +00:00
Miss Islington (bot) de51ee0c23
[3.13] gh-121499: Fix multi-line history rendering in the REPL (GH-121531) (#121679)
gh-121499: Fix multi-line history rendering in the REPL (GH-121531)
(cherry picked from commit 4b9e10d0ea)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2024-07-13 15:56:56 +02:00
Miss Islington (bot) 5e8bb98419
[3.13] gh-121671: Increase test coverage of `ast.get_docstring` (GH-121674) (GH-121691)
(cherry picked from commit 0a26aa5007)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-07-13 13:30:40 +00:00
Miss Islington (bot) da30c6ba0d
[3.13] gh-96765: Update ConfigParser.read() docs with multi-file read example (GH-121664) (GH-121687)
(cherry picked from commit fc21781175)

Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-07-13 15:07:40 +02:00
Hugo van Kemenade fcc4a537b9
[3.13] NEWS: Fix Sphinx warnings and increase threshold for new news nits (GH-121482) (#121513)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-07-13 12:55:43 +00:00
Ken Jin cd74ed0a71
[3.13] gh-120198: Stop the world when setting __class__ on free-threaded build (#121591)
(cherry-picked from commit 3bfc9c8)
2024-07-12 19:35:53 +08:00
Miss Islington (bot) 15c875a57c
[3.13] Update retroactive comments from GH-117741 (segfault in `FutureIter_dealloc`) (GH-121638) (GH-121642)
Update retroactive comments from GH-117741 (segfault in `FutureIter_dealloc`) (GH-121638)

Address comments
(cherry picked from commit 65fededf9c)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-07-12 09:00:09 +00:00
Miss Islington (bot) 35f7155bc3
[3.13] gh-121103: Put free-threaded libraries in `lib/python3.14t` (GH-121293) (#121631)
On POSIX systems, excluding macOS framework installs, the lib directory
for the free-threaded build now includes a "t" suffix to avoid conflicts
with a co-located default build installation.
(cherry picked from commit e8c91d90ba)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-11 21:00:28 +00:00
Miss Islington (bot) c6dbfbbe3c
[3.13] gh-117482: Fix Builtin Types Slot Wrappers (gh-121630)
When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter).  This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't.  This change fixes that by preserving the original data from the static type struct and checking that.

(cherry picked from commit 5250a03133, AKA gh-121602)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-07-11 20:47:38 +00:00
Jelle Zijlstra 38c4028dd9
[3.13] gh-121332: Make AST node constructor check _attributes instead of hardcoding attributes (GH-121334) (#121625)
(cherry picked from commit 58e8cf2bb6)
2024-07-11 15:51:32 +00:00
Miss Islington (bot) 3b5f8d256c
[3.13] gh-121592: Make select.poll() and related objects thread-safe (GH-121594) (#121623)
This makes select.poll() and kqueue() objects thread-safe in the
free-threaded build. Note that calling close() concurrently with other
functions is still not thread-safe due to races on file descriptors
(gh-121544).
(cherry picked from commit 44937d11a6)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-11 14:44:54 +00:00
Miss Islington (bot) 261c8e9d47
[3.13] gh-121615: Improve `module.rst` C-API docs with better error descriptions (GH-121616) (#121618)
gh-121615: Improve `module.rst` C-API docs with better error descriptions (GH-121616)
(cherry picked from commit e6264b44dc)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-07-11 09:15:18 +00:00
neonene c08a302249
[3.13] gh-117398: Use the correct module loader for iOS in datetime CAPI test (GH-120477) (#121561)
Use the correct binary module loader for iOS.
2024-07-11 06:48:53 +08:00
Miss Islington (bot) 5bb117586e
[3.13] gh-121596: Fix Sharing Interpreter Channels (gh-121600)
This fixes a mistake in gh-113012 and adds a test that verifies the fix.

(cherry picked from commit 35a67e36aa, AKA gh-121597)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-07-10 21:54:47 +00:00
Miss Islington (bot) 85e9018a01
[3.13] gh-117657: Remove TSAN suppressions for _abc.c (GH-121508) (#121598)
The functions look thread-safe and I haven't seen any warnings issued
when running the tests locally.
(cherry picked from commit 7641743d48)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-10 21:34:14 +00:00
Miss Islington (bot) 927f882d76
[3.13] gh-117657: Fix TSan race in _PyDict_CheckConsistency (GH-121551) (#121590)
The only remaining race in dictobject.c was in _PyDict_CheckConsistency
when the dictionary has shared keys.
(cherry picked from commit 3ec719fabf)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-10 18:28:44 +00:00
Miss Islington (bot) 867cf40279
[3.13] gh-121460: Skip freeing unallocated arenas (gh-121589)
`munmap(NULL)` is not noop, like `free(NULL)` is.

Fixes an observed testsuite hang on 32-bit ARM systems.

(cherry picked from commit a802277914, AKA gh-121491)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
2024-07-10 17:05:11 +00:00
Miss Islington (bot) 0113c56a20
[3.13] gh-107851: Fix spurious failures in fcntl eintr tests (GH-121556) (#121585)
On heavily loaded machines, the subprocess may finish its sleep before
the parent process manages to synchronize with it via a failed lock.

This leads to errors like:

  Exception: failed to sync child in 300.3 sec

Use pipes instead to mutually synchronize between parent and child.
(cherry picked from commit af9f6de6ea)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-10 15:02:26 +00:00
Miss Islington (bot) 0504f45b79
[3.13] gh-89364: Export PySignal_SetWakeupFd() function (GH-121537) (#121582)
gh-89364: Export PySignal_SetWakeupFd() function (GH-121537)

Export the PySignal_SetWakeupFd() function. Previously, the function
was documented but it couldn't be used in 3rd party code.
(cherry picked from commit ca0fb3423c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-07-10 14:14:09 +00:00
Miss Islington (bot) 8c4728f6af
[3.13] gh-121567: Improve `slice` C-API docs by mentioning exceptions (GH-121568) (#121578)
gh-121567: Improve `slice` C-API docs by mentioning exceptions (GH-121568)
(cherry picked from commit 84a5597b08)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-07-10 11:13:40 +00:00
Miss Islington (bot) ced3fe87b0
[3.13] gh-121571: Do not use `EnvironmentError` in tests, use `OSError` instead (GH-121572) (#121574)
gh-121571: Do not use `EnvironmentError` in tests, use `OSError` instead (GH-121572)
(cherry picked from commit e2822360da)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-07-10 10:38:48 +00:00
Serhiy Storchaka 35c9399078
[3.13] Improve zipimport tests (GH-121535) (GH-121570)
(cherry picked from commit 22a0bdbf9a)
2024-07-10 13:11:39 +03:00
Miss Islington (bot) a1fc8d31a7
[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 9585a1a2a2)

Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
2024-07-10 08:12:54 +00:00
Miss Islington (bot) 3824dc9fa3
[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 f62161837e)

Co-authored-by: Brett Cannon <brett@python.org>
2024-07-09 22:31:39 +00:00
Miss Islington (bot) 20a6341324
[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 8020946814)

Co-authored-by: Brett Cannon <brett@python.org>
2024-07-09 22:27:29 +00:00
Miss Islington (bot) eae8fa1178
[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 04397434aa)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-09 21:37:30 +00:00
Miss Islington (bot) 2f15383161
[3.13] gh-112075: Fix dict thread safety issues (GH-119288) (#121545)
(cherry picked from commit f0ed1863bd)

Co-authored-by: Germán Méndez Bravo <kronuz@fb.com>
2024-07-09 18:13:23 +00:00
Miss Islington (bot) f0d16f7e82
[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 9c08f40a61)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-09 16:36:36 +00:00
Miss Islington (bot) 8d473d8e57
[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 649d5b6d7b)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-07-09 16:06:46 +00:00
Miss Islington (bot) 3efe02e2c7
[3.13] Docs: fix typo and duplicate word in configure.rst (GH-121410) (#121532)
(cherry picked from commit 9ba2a4638d)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-07-09 12:40:59 +00:00
Miss Islington (bot) 39f4add7a3
[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 facf9862da)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-07-09 15:12:45 +05:30
Miss Islington (bot) c1891e225e
[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 15d48aea02, AKA gh-121503)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-07-08 21:34:58 +00:00
Miss Islington (bot) c128718f30
[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 1d3cf79a50)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-08 19:15:58 +00:00
Miss Islington (bot) eef5c6443b
[3.13] gh-121487: Fix deprecation warning for ATOMIC_VAR_INIT in mimalloc (gh-121488) (#121504)
(cherry picked from commit 31873bea47)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-07-08 18:59:25 +00:00
Miss Islington (bot) 2f8919ee3c
[3.13] GH-121012: Set index to -1 when list iterators become exhausted in tier 2 (GH-121483) (GH-121494) 2024-07-08 18:09:54 +01:00
Miss Islington (bot) bccfd8a53f
[3.13] gh-121374: Correct docstrings in `_interpchannels` (gh-121501)
(cherry picked from commit 5289550b33, AKA gh-121418)

Co-authored-by: Max Muoto <maxmuoto@gmail.com>
2024-07-08 16:57:10 +00:00
Miss Islington (bot) 0790418a04
[3.13] gh-121338: Remove GH-pragma optimize (GH-121340) (#121492)
gh-121338: Remove GH-pragma optimize (GH-121340)
(cherry picked from commit d69529d31c)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2024-07-08 09:22:44 -04:00
Miss Islington (bot) 0f5ca64596
Fixed regenerating files in a checkout path with spaces (GH-121384)
(cherry picked from commit 0e77540d86)

Co-authored-by: AraHaan <seandhunt_7@yahoo.com>
2024-07-08 13:18:02 +01:00
Miss Islington (bot) 3e786a462c
[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 59be79ae60)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-07-08 16:54:51 +10:00
Miss Islington (bot) 2c3f30ba25
[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 bf74db731b)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
2024-07-08 04:08:13 +00:00
Miss Islington (bot) 78437b74ad
[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 5aa1e60e0c)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-07-08 01:10:17 +00:00
Miss Islington (bot) 2b02431dd1
[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 68e279b37a)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-07-06 23:18:20 +00:00
Miss Islington (bot) c2ad5fd1d1
[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 114389470e)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-07-07 01:02:33 +02:00
Miss Islington (bot) 29618b52ff
[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 53e12025cd)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-07-06 18:23:31 +00:00
Miss Islington (bot) aae49ec595
[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 ada964fba0)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-07-06 18:13:57 +00:00
Miss Islington (bot) 4aa0c5ec34
[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 6239d41527)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-07-05 20:55:14 +00:00
Miss Islington (bot) bc4cd91aef
[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 892e3a1b70)

Co-authored-by: Yuxin Wu <ppwwyyxxc@gmail.com>
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
2024-07-05 20:25:35 +00:00