Commit Graph

122131 Commits

Author SHA1 Message Date
Miss Islington (bot) f85d59ccf8
[3.13] Remove references to private symbols from zipimport module docstring (GH-119071)
(cherry picked from commit 7d722b7d3a)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2024-05-15 16:52:48 +00:00
Miss Islington (bot) e1dfa978b1
gh-118486: Simplify test_win32_mkdir_700 to check the exact ACL (GH-119056)
(cherry picked from commit 94591dca51)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-15 11:21:27 +00:00
Miss Islington (bot) dd8a61f901
[3.13] 3.13 What's New: Add PEP 702 (GH-118922) (#119062)
I honestly forgot this slipped into 3.13, but I think it's worth highlighting more, as it is a PEP-sized change that makes the type system significantly more powerful.

@Yhg1s I think it's also worth mentioning in your release announcements.
(cherry picked from commit ee13797dec)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-15 02:56:37 +00:00
Miss Islington (bot) 8439d09aa1
[3.13] Misc improvements to the itertools docs (gh-119040) (#119045) 2024-05-14 15:38:53 +00:00
Miss Islington (bot) 87f683e09a
[3.13] Itertools docs: fix parameter names and indentation in Python equivalents (gh-118977) (#119043) 2024-05-14 15:11:31 +00:00
Miss Islington (bot) 041cc2a4be
[3.13] typing tests: remove some unnecessary uses of `exec()` (GH-119005) (#119038)
(cherry picked from commit a9328e2b6e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-14 14:39:55 +00:00
Miss Islington (bot) 54839f0734
[3.13] Add yet few cases for urlparse/urlunparse roundtrip tests (GH-119031) (GH-119037)
(cherry picked from commit 331d385af9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-14 14:23:40 +00:00
Miss Islington (bot) 8720006062
[3.13] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path starting with multiple slashes and no authority (GH-113563) (GH-119023)
(cherry picked from commit e237b25a4f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-14 09:47:05 +00:00
Miss Islington (bot) 29a2f9cc28
[3.13] GH-118836: Fix JIT build error when SHT_NOTE section is present (GH-119020)
(cherry picked from commit e04cd964eb)

Co-authored-by: Michał Górny <mgorny@gentoo.org>
2024-05-13 22:17:34 +00:00
Miss Islington (bot) c7628b0ea0
[3.13] gh-118998: Handle errors correctly in `tmtotuple` in `timemodule` (GH-118999) (#119018)
gh-118998: Handle errors correctly in `tmtotuple` in `timemodule` (GH-118999)
(cherry picked from commit fc75792594)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-13 21:43:23 +00:00
Miss Islington (bot) d1aac22b7a
[3.13] gh-119010: Adds docs about `__type_params__` to `functools.update_wrapper` (GH-119012) (#119013)
gh-119010: Adds docs about `__type_params__` to `functools.update_wrapper` (GH-119012)
(cherry picked from commit b04c497f18)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-13 20:19:10 +00:00
Miss Islington (bot) 09d4c072eb
[3.13] gh-58933: Make pdb return to caller frame correctly when f_trace is not set (GH-118979) (#119007)
gh-58933: Make pdb return to caller frame correctly when f_trace is not set (GH-118979)
(cherry picked from commit f526314194)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-05-13 20:18:03 +01:00
Miss Islington (bot) 44995aab49
gh-118876: Ensure PC/layout sets ns.temp before using it (GH-118880)
Fixes an AttributeError that occurs when checking if ns.temp is an absolute path during building from source on Windows.
(cherry picked from commit d8a82cca12)

Co-authored-by: I-Shen Leong <i-shenl@activestate.com>
2024-05-13 11:56:26 +00:00
Miss Islington (bot) 941883208c
[3.13] Improve the `rmtree` doc for `dir_fd` param addition in 3.11 (GH-118964) (#118991)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-13 11:21:10 +00:00
Miss Islington (bot) a8ea9669aa
[3.13] gh-87106: Fix inspect.signature.bind() handling of positional-only arguments with **kwargs (GH-103404) (#118985)
(cherry picked from commit 9c15202441)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2024-05-13 08:35:31 +00:00
Miss Islington (bot) 9d2c10bee3
[3.13] GH-118844: Fix build failures when combining --disable-gil with --enable-experimental-jit (GH-118959)
(cherry picked from commit 5b941e57c7)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-05-13 04:53:30 +00:00
Miss Islington (bot) 6e855b30a9
[3.13] gh-118899: Add tests for `NotImplemented` attribute access (GH-118902) (#118968)
gh-118899: Add tests for `NotImplemented` attribute access (GH-118902)
(cherry picked from commit ec1398e117)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-12 14:23:45 +00:00
Miss Islington (bot) d3094744d4
[3.13] gh-117655: Prevent `test_strptime` from raising a DeprecationWarning (GH-117668) (GH-118956)
gh-117655: Prevent `test_strptime` from raising a DeprecationWarning (GH-117668)

* Fix `test_strptime` raises a DeprecationWarning
* Ignore deprecation warnings where appropriate.
* Update Lib/test/datetimetester.py

This is follow on work to silence unnecessary warnings from the test suite that changes for https://github.com/python/cpython/issues/70647 added.
(cherry picked from commit abead548af)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-05-11 22:18:23 +00:00
Miss Islington (bot) 93ef7aa03c
[3.13] gh-118921: Add `copy()` method for `FrameLocalsProxy` (GH-118923) (#118933)
(cherry picked from commit 35c436186b)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-05-10 23:15:54 +00:00
Miss Islington (bot) 7dc9e923d1
[3.13] gh-117657: Log TSAN warnings to separate files and archive them (GH-118747) (#118931)
This ensures we don't lose races that occur in subprocesses or
interleave races from workers running in parallel.

Log files are collected and packaged into a zipfile that can be
downloaded from the "Artifacts" section of the workflow run.
(cherry picked from commit b88889e9ff)

Co-authored-by: mpage <mpage@meta.com>
2024-05-10 22:27:17 +00:00
Miss Islington (bot) cceb758c78
[3.13] gh-118846: Fix free-threading test failures when run sequentially (GH-118864) (#118927)
The free-threaded build currently immortalizes some objects once the
first thread is started. This can lead to test failures depending on the
order in which tests are run. This PR addresses those failures by
suppressing immortalization or skipping the affected tests.
(cherry picked from commit b309c8ebff)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-05-10 20:50:59 +00:00
Miss Islington (bot) b3074f0d5e
[3.13] Rename typing._collect_parameters (GH-118900) (#118917)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-10 17:40:39 +00:00
Miss Islington (bot) 6df49134b3
[3.13] gh-118895: Call PyType_Ready() on typing.NoDefault (GH-118897) (#118914)
(cherry picked from commit 13d7cf997b)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-10 16:36:33 +00:00
Miss Islington (bot) 0becae366c
[3.13] gh-117657: Fix QSBR race condition (GH-118843) (#118905)
`_Py_qsbr_unregister` is called when the PyThreadState is already
detached, so the access to `tstate->qsbr` isn't safe without locking the
shared mutex. Grab the `struct _qsbr_shared` from the interpreter
instead.
(cherry picked from commit 33d20199af)

Co-authored-by: Alex Turner <alexturner@meta.com>
2024-05-10 15:13:17 +00:00
Miss Islington (bot) 0874a400a8
[3.13] Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst` (GH-118098) (GH-118906)
Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst` (GH-118098)

Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst`.
(cherry picked from commit c444362c6e)

Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
2024-05-10 14:56:33 +00:00
Miss Islington (bot) 4480dd86d9
[3.13] gh-117657: Fix data races reported by TSAN on `interp->threads.main` (GH-118865) (#118904)
Use relaxed loads/stores when reading/writing to this field.
(cherry picked from commit 22d5185308)

Co-authored-by: mpage <mpage@meta.com>
2024-05-10 14:40:06 +00:00
Miss Islington (bot) bb5bf24226
[3.13] gh-118789: Restore hidden `_PyWeakref_ClearRef` (GH-118797) (GH-118903)
gh-118789: Restore hidden `_PyWeakref_ClearRef` (GH-118797)

_PyWeakref_ClearRef was previously exposed in the public C-API, although
it begins with an underscore and is not documented. It's used by a few
C-API extensions. There is currently no alternative public API that can
replace its use.

_PyWeakref_ClearWeakRefsExceptCallbacks is the only thread-safe way to
use _PyWeakref_ClearRef in the free-threaded build. This exposes the C
symbol, but does not make the API public.
(cherry picked from commit db5af7da09)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-05-10 14:20:22 +00:00
Miss Islington (bot) 93fce2dcd5
[3.13] Rename `notimplemented_methods` into `nodefault_methods` (GH-118896) (#118898)
Rename `notimplemented_methods` into `nodefault_methods` (GH-118896)
(cherry picked from commit 004db2170e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-10 13:08:31 +00:00
Miss Islington (bot) 7dc9875d55
gh-118209: Add Windows structured exception handling to mmap module (GH-118213)
(cherry picked from commit e85e8deaf3)

Co-authored-by: Dobatymo <Dobatymo@users.noreply.github.com>
2024-05-10 12:00:00 +01:00
Miss Islington (bot) 760b3f08dc
gh-118689: Doc: fix ePub build (GH-118690)
(cherry picked from commit 7ac933e260)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2024-05-10 10:40:35 +00:00
Miss Islington (bot) d524802e9d
Fix some missing null checks. (GH-118721)
(cherry picked from commit 7e6fcab200)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-10 10:01:00 +00:00
Miss Islington (bot) b62cb5234b
[3.13] Revert "gh-115432: Add critical section variant that handles a NULL object (GH-115433)" (GH-118861) (#118872)
This reverts commit ad4f909e0e.

The API ended up not being used.
(cherry picked from commit 46c808172f)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-05-09 19:06:35 -04:00
Miss Islington (bot) 00ec116883
[3.13] gh-118851: Default ctx arguments to AST constructors to Load() (GH-118854) (#118871)
(cherry picked from commit 68fbc00dc8)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-09 22:52:42 +00:00
Miss Islington (bot) 982c73a33e
[3.13] gh-117657: Replace TSAN suppresions with more specific rules (GH-118722) (#118870)
Using `race:` filters out warnings if the function appears anywhere in
the stack trace. This can hide a lot of unrelated warnings, especially
for a function like `_PyEval_EvalFrameDefault`, which is somewhere on
the stack more often than not.

Change all free-threaded suppressions to `race_top:`, which only matches
the top frame, and add any new suppressions this exposes.
(cherry picked from commit 98ff3f65c0)

Co-authored-by: Brett Simmers <swtaarrs@users.noreply.github.com>
2024-05-09 21:36:25 +00:00
Miss Islington (bot) d4c6948340
[3.13] gh-118846: Fix PGO tests in free-threaded build (GH-118862) (#118867)
Avoid immortalizing objects in tests that verify garbage collection of
classes or modules.

This fixes test_ordered_dict and test_struct.
(cherry picked from commit 1b1db2fd9a)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-05-09 20:34:22 +00:00
Miss Islington (bot) 0a23970478
[3.13] gh-116984: Make mimalloc header includes relative to the current file (GH-118808) (#118866)
Some embedders and extensions include parts of the internal API. The
pycore_mimalloc.h file is transitively include by a number of other
internal headers. This avoids include errors for code that was
already including those headers.
(cherry picked from commit 71cc0651e7)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-05-09 20:26:36 +00:00
Miss Islington (bot) 846cfb9a67
[3.13] gh-118561: Fix crash involving list.extend in free-threaded build (GH-118723) (#118863)
The `list_preallocate_exact` function did not zero initialize array
contents. In the free-threaded build, this could expose uninitialized
memory to concurrent readers between the call to
`list_preallocate_exact` and the filling of the array contents with
items.
(cherry picked from commit 2402715e10)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-05-09 19:14:47 +00:00
Miss Islington (bot) 098eec9a15
[3.13] gh-118849: Fix "code will never be executed" warning in `dictobject.c` (GH-118850) (#118859)
gh-118849: Fix "code will never be executed" warning in `dictobject.c` (GH-118850)
(cherry picked from commit 82abe75e77)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-09 17:40:48 +00:00
Miss Islington (bot) 9d646d084c
gh-118773: Use language-invariant SDDL string instead of aliases for ACLs. (GH-118800)
(cherry picked from commit 8af84b503d)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-09 17:11:11 +00:00
Miss Islington (bot) 62a559ac09
[3.13] gh-117657: Acquire a critical section around `SemLock.__{enter,exit}__` (GH-118812) (#118856)
These methods are purely wrappers around `Semlock.{acquire,release}`,
which expect a critical section to be held.
(cherry picked from commit c30d8e5d6c)

Co-authored-by: mpage <mpage@meta.com>
2024-05-09 16:31:38 +00:00
Miss Islington (bot) 738877a101
[3.13] gh-118817: Fix `asyncio REPL` on Windows (GH-118819) (#118847)
(cherry picked from commit c3643a1214)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-05-09 15:47:31 +00:00
Miss Islington (bot) a98e44a5bf
gh-118802: Fix ACL use in test for non-English Windows (GH-118831)
(cherry picked from commit 82acc5f211)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-05-09 13:38:43 +00:00
Miss Islington (bot) c4b853f2a5
[3.13] gh-103956: Fix `trace` output in case of missing source line (GH-103958) (GH-118834)
Print only filename with lineno if linecache.getline() returns an empty string.
(cherry picked from commit 7c87ce777b)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
2024-05-09 13:05:37 +00:00
Steve Dower d86b494117
gh-118486: Update docs for CVE-2024-4030 reference (GH-118737)
Update docs for CVE-2024-4030 reference
2024-05-09 12:52:11 +01:00
Miss Islington (bot) 632682c0c2
[3.13] gh-118033: Fix `__weakref__` not set for generic dataclasses (GH-118099) (#118821)
gh-118033: Fix `__weakref__` not set for generic dataclasses (GH-118099)
(cherry picked from commit fa9b9cb113)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-05-09 09:02:22 +00:00
Miss Islington (bot) 09896fca2f
[3.13] [tests]: Mark ``test_statistics.test_kde_random`` with a ``requires_resource('cpu')`` decorator (GH-118801) (#118818)
[tests]: Mark ``test_statistics.test_kde_random`` with a ``requires_resource('cpu')`` decorator (GH-118801)

Mark test_kde_random with a requires_resource('cpu') decorator
(cherry picked from commit 027e6d88fb)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-05-09 08:43:03 +00:00
Miss Islington (bot) 7b9ca26812
[3.13] gh-117657: Fix data races when writing / reading `ob_gc_bits` (GH-118292) (#118796)
Use relaxed atomics when reading / writing to the field. There are still a
few places in the GC where we do not use atomics. Those should be safe as
the world is stopped.
(cherry picked from commit cb6f75a32c)

Co-authored-by: mpage <mpage@meta.com>
2024-05-08 21:31:37 +00:00
Miss Islington (bot) 8f31af68d0
[3.13] Format None, True, False and NotImplemented as literals (GH-118758) (GH-118792)
(cherry picked from commit 05c2fe1acd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-08 19:55:12 +00:00
Miss Islington (bot) c33bba6eb3
[3.13] docs: module page titles should not start with a link to themselves (GH-117099) (#118790)
docs: module page titles should not start with a link to themselves (GH-117099)
(cherry picked from commit bcb435ee8f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-05-08 19:52:39 +00:00
Miss Islington (bot) c6680cdc5a
[3.13] gh-118772: Allow TypeVars without a default to follow those with a default when constructing aliases (GH-118774) (#118776)
(cherry picked from commit aac6b019fe)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-08 19:31:41 +00:00