Commit Graph

122104 Commits

Author SHA1 Message Date
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
Miss Islington (bot) 02d49af219
[3.13] Docs: fix typos in documentation (GH-118752) (#118787)
Docs: fix typos in documentation (GH-118752)
(cherry picked from commit 7b0c247f1c)

Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
2024-05-08 19:24:39 +00:00
Miss Islington (bot) 58d9a9b7b1
[3.13] Run CI on the 3.13 branch (GH-118779) (#118781)
(cherry picked from commit c68311df85)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-05-08 18:43:25 +00:00
Thomas Wouters c844b1437d Post 3.13.0b1 2024-05-08 16:53:50 +02:00
Thomas Wouters 2268289a47 Python 3.13.0b1 2024-05-08 11:21:00 +02:00
trag1c c4f9823be2
gh-118671: Updated dead ActiveState links (#118730)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-05-08 01:06:38 -06:00
Kirill Podoprigora fcf52d7cee
Regen ``Doc/requirements-oldest-sphinx.txt`` (#118736)
Regen dependencies
2024-05-08 08:59:17 +03:00
Tian Gao e7aec8713f
gh-118746: Fix crash in frame_getlocals and _PyFrame_GetLocals (#118748)
We don't know how to create an unoptimized frame with f_locals == NULL,
but they are seen in the wild, and this fixes the crash.
2024-05-07 17:48:05 -07:00
Tim Peters 2f0a338be6
gh-118610: Centralize power caching in `_pylong.py` (#118611)
A new `compute_powers()` function computes all and only the powers of the base the various base-conversion functions need, as efficiently as reasonably possible (turns out that invoking `**`is needed at most once). This typically gives a few % speedup, but the primary point is to simplify the base-conversion functions, which no longer need their own, ad hoc, and less efficient power-caching schemes.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-05-07 19:09:09 -05:00
Łukasz Langa 2a85bed89d
Revert to free macOS runners (#118744) 2024-05-08 01:40:38 +02:00
Steve Dower 460546529b
gh-118734: Fixes Windows build when Use_TIER2 is unspecified (#118735) 2024-05-07 23:01:18 +02:00
T. Wouters f548855061
gh-109975: Make a rough editorial pass over What's New (#118711)
Make a rough editorial pass over Python 3.13's What's New document. Add the
release highlights, remove or merge some duplicated entries, and reorder
some of the sections (removals should really go before future deprecations).
2024-05-07 23:00:25 +02:00
Pablo Galindo Salgado 37959e25cb
gh-118518: Check for perf version and not kernel version in test_perf_profiler (#118640) 2024-05-07 20:41:07 +01:00
Sam Gross 2c19987db5
gh-118729: Temporarily skip `test_multiprocessing_pool_circular_import` (#118732)
The `pool_in_threads.py` test file may crash in free-threaded builds,
which can lead to the Tsan test hanging. Skip it for now until we fix
the underlying issue.
2024-05-07 21:27:28 +02:00
chrysn f58833ebf8
gh-118650: Document `Enum._repr_*` reservation exclusion (GH-118698) 2024-05-07 11:11:18 -07:00
Pablo Galindo Salgado b9caa0977c
gh-118518: Improve perf docs (#118708) 2024-05-07 17:25:15 +01:00
Pablo Galindo Salgado a94ac56628
gh-111201: Allow pasted code to contain multiple statements in the REPL (#118712)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-05-07 16:01:49 +00:00
Abhinav Upadhyay 26bab423fb
bpo-115773: Use the right variable name based on the field we are trying read (#118591)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2024-05-07 14:50:41 +00:00
Lysandros Nikolaou e5413ec783
gh-118682: Revert forcing str commands, allow class commands in pyrepl (#118709) 2024-05-07 14:31:56 +00:00
Jelle Zijlstra 71080b8a0f
gh-118660: Add second type parameter to (Async)ContextManager (#118681)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-05-07 14:16:05 +00:00
Kerim Kabirov a855f824a2
Remove Python 3.5 hardcoded version in the tutorial appendix (GH-117612) 2024-05-07 15:28:16 +02:00
Pablo Galindo Salgado 7d90b8aadb
gh-111201: Allow bracketed paste to work (GH-118700) 2024-05-07 12:54:56 +00:00
Nikita Sobolev ad3d877a12
Remove several unused imports in `_pyrepl` (#118668) 2024-05-07 13:43:18 +01:00
Serhiy Storchaka 65f5e586a1
gh-66410: Do not stringify arguments of Tkinter callback (GH-98592)
Callbacks registered in the tkinter module now take arguments as
various Python objects (int, float, bytes, tuple), not just str.
To restore the previous behavior set tkinter module global wantobject to 1
before creating the Tk object or call the wantobject() method of the Tk object
with argument 1.
Calling it with argument 2 restores the current default behavior.
2024-05-07 12:07:32 +00:00
Nikita Sobolev b60d4c0d53
gh-118090: Improve error message for empty type param brackets (GH-118091) 2024-05-07 14:01:06 +02:00
Hugo van Kemenade 04859228aa
gh-118518: Rename `PYTHONPERFJITSUPPORT` and `-X perfjit` with underscores (#118693) 2024-05-07 11:47:21 +00:00
Momo Eissenhauer 48e52fe2c9
gh-118310: Fix documentation for `enum.Enum.__new__` (GH-118311)
The provided example was incorrect:
- The example enum was missing the `int` mixin as implied by the context
- The value of `int('1a', 16)` was incorrectly given as 17
  (should be 26)
2024-05-07 13:42:18 +02:00
Alex Waygood 44a9f3db2b
gh-109653: What's new: Note improved import times for several stdlib modules in Python 3.13 (#118697) 2024-05-07 11:34:19 +00:00