Commit graph

124129 commits

Author SHA1 Message Date
Miss Islington (bot)
f30a2512d2
[3.13] Escape hyphens in manpage (GH-132291) (#132334)
Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
2025-04-09 22:47:32 +00:00
Miss Islington (bot)
c2538bf77f
[3.13] Remove a duplicate word in the Makefile (GH-132301) (#132325)
Co-authored-by: Chu <tomzz233333@gmail.com>
2025-04-09 22:57:54 +01:00
Miss Islington (bot)
70f04ea404
[3.13] gh-130587: Invoke regen-token rst with rstfile as an argument (GH-132304) (#132327)
Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
2025-04-09 18:44:49 +00:00
Miss Islington (bot)
e2d13b42ff
[3.13] gh-131434: Improve error reporting for incorrect format in strptime() (GH-131568) (GH-132309)
In particularly, fix regression in detecting stray % at the end of the
format string.
(cherry picked from commit 3feac7a093)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-09 10:50:24 +00:00
Serhiy Storchaka
8e97bd7ef4
[3.13] gh-130631: Make join_header_words() more similar to the original Perl version (GH-130632) (GH-132303)
* Always quote strings with non-ASCII characters.
* Allow some non-separator and non-control characters (like "." or "-")
  be unquoted.
* Always quote strings that end with "\n".
* Use the fullmatch() method for clarity and optimization.
(cherry picked from commit 7ebbd27144)
2025-04-09 09:18:31 +00:00
Miss Islington (bot)
099b3013fa
[3.13] gh-131507: Add a way to recreate the Misc/mypy symlinks if missing (GH-132274) (#132293)
They will be removed in source tarballs so they don't appear in the SBOM.

(cherry picked from commit 16dcb576f7)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-04-09 01:37:26 +02:00
Miss Islington (bot)
c3c8e31547
[3.13] gh-106670: Fix a typo in doc of pdb's exceptions command (GH-132277) (#132279)
gh-106670: Fix a typo in doc of pdb's exceptions command (GH-132277)
(cherry picked from commit efd8aca62c)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2025-04-08 21:28:35 +00:00
Miss Islington (bot)
10fe658f34
[3.13] gh-132250: Clear error in lsprof callback when method descriptor raises an excep… (GH-132251) (#132281)
gh-132250: Clear error in lsprof callback when method descriptor raises an excep… (GH-132251)
(cherry picked from commit ab64130b57)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2025-04-08 17:19:40 -04:00
Thomas Wouters
67ebb399eb Merge branch '3.13' of https://github.com/python/cpython into 3.13 2025-04-08 19:22:26 +02:00
Thomas Wouters
5f238c6ad2 Post 3.13.3 2025-04-08 19:19:59 +02:00
Miss Islington (bot)
8f6b0afd40
[3.13] gh-132063: ensure that ProcessPoolExecutor does not swallow falsey exceptions (GH-132129) (#132275)
gh-132063: ensure that `ProcessPoolExecutor` does not swallow falsey exceptions (GH-132129)
(cherry picked from commit 933c6653cb)

Co-authored-by: Duprat <yduprat@gmail.com>
2025-04-08 15:36:52 +00:00
Thomas Wouters
6280bb5478 Python 3.13.3 2025-04-08 15:54:08 +02:00
Miss Islington (bot)
67c7de49dc
[3.13] gh-117779: Fix reading duplicated entries in zipfile by name (GH-129254) (GH-132263)
(cherry picked from commit 0f04f2456a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-08 11:19:40 +00:00
Peter Bierma
5911768600
[3.13] gh-131998: Fix NULL dereference when using an unbound method descriptor in a specialized code path (GH-132000) (#132262)
(cherry picked from commit ac3c439cdf)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Mark Shannon <mark@hotpy.org>
2025-04-08 11:02:29 +00:00
Serhiy Storchaka
a9bb0092d0
[3.13] gh-71339: Use new assertion methods in test_import and test_importlib (GH-129052) (#129123)
(cherry picked from commit f7cc7d296c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-08 12:43:04 +02:00
Miss Islington (bot)
d2ec87f740
[3.13] gh-102136: Add -m to options that work with -i (GH-119271) (GH-119285)
(cherry picked from commit 172690227e)

Co-authored-by: Melanie Arbor <hellomelaniec@gmail.com>
2025-04-08 12:31:47 +02:00
Miss Islington (bot)
5c658c11f7
[3.13] gh-130164: Fix inspect.Signature.bind() handling of positional-only args without defaults (GH-130192) (GH-130271)
Follow-up to 9c15202.
(cherry picked from commit dab456dcef)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2025-04-08 09:08:06 +00:00
Miss Islington (bot)
5aa7aeb50f
[3.13] gh-132021: Add bool type to the list of allowed JSON key types (GH-132048) (#132255)
gh-132021: Add bool type to the list of allowed JSON key types (GH-132048)
(cherry picked from commit 403886c28d)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2025-04-08 08:51:39 +00:00
sobolevn
7a8364460d
[3.13] gh-130775: Allow negative locations in ast (GH-130795) (#132243)
(cherry picked from commit bc5233b6a5)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-08 10:47:24 +02:00
Miss Islington (bot)
ed28f2f42a
[3.13] gh-132174: Fix function name in error message of _interpreters.run_string (GH-132175) (#132209)
gh-132174: Fix function name in error message of `_interpreters.run_string` (GH-132175)
(cherry picked from commit f2daa96c81)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2025-04-08 10:46:13 +02:00
Miss Islington (bot)
7e9c5772a8
[3.13] gh-115684: Clarify datetime replace documentation (GH-116519) (#131676)
gh-115684: Clarify datetime `replace` documentation (GH-116519)

* Clarify datetime `replace` documentation

In GH-115684, HopedForLuck noted that `datetime.date.replace()`
documentation was confusing because it looked like it would be changing
immutable objects.

This documentation change specifies that the `replace()` methods in
`datetime` return new objects. This uses similar wording to the
documentation for `datetime.combine()`, which specifies that a new
datetime is returned. This is also similar to wording for
`string.replace()`, except `string.replace()` emphasizes that a "copy"
is returned.

Resolves GH-115684.

* Include reviewer comments

Thanks Privat33r-dev for the comments!

---------
(cherry picked from commit d2d886215c)

Co-authored-by: David Lowry-Duda <david@lowryduda.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
2025-04-08 10:45:21 +02:00
Miss Islington (bot)
53b9370c43
[3.13] Add psfhosted Plausible instance to analytics (GH-132252) (#132253)
Add psfhosted Plausible instance to analytics (GH-132252)
(cherry picked from commit 40844164b1)

Co-authored-by: Ee Durbin <ewdurbin@gmail.com>
2025-04-08 07:51:18 +00:00
Miss Islington (bot)
bde72839d7
[3.13] GH-130673: Gracefully handle missing sections in JIT build (GH-131749)
(cherry picked from commit a26a301f8b)
Co-authored-by: Bojun Ren <bj.ren.coding@outlook.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-07 19:16:23 -07:00
Miss Islington (bot)
ac9d7c6207
[3.13] gh-131809: Upgrade vendored expat to 2.7.1 (GH-132192) (#132236)
* gh-131809: Upgrade vendored expat to 2.7.1 (GH-132192)
(cherry picked from commit c0de650024)

Co-authored-by: Gregory P. Smith <greg@krypto.org>

* make regen-sbom

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-04-07 21:24:55 +00:00
Hugo van Kemenade
bf5471f4de
[3.13] Docs HTML: Remove self-closing tags (GH-132220) (#132228)
(cherry picked from commit ce724571b3)

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-04-07 22:06:06 +01:00
Miss Islington (bot)
53555f2199
[3.13] gh-130521: Add Open Graph meta tags to template pages (GH-130523) (#132239)
gh-130521: Add Open Graph meta tags to template pages (GH-130523)
(cherry picked from commit f5639d87f5)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-07 21:05:15 +00:00
Mark Shannon
3f3863281b
[3.13] GH-127953: Make line number lookup O(1) regardless of the size of the code object (#129127)
GH-127953: Make line number lookup O(1) regardless of the size of the code object (GH-128350)
2025-04-07 20:15:02 +02:00
Sam Gross
1fcf409ace
[3.13] gh-131988: Fix a multithreaded scaling regression (#131989)
gh-131988: Fix a multithreaded scaling regression

The 3.13 free threaded build immortalizes certain objects to avoid
reference count contention. In gh-127114 the condition was
unintentionally changed to happen when the first thread was created
instead of the first non-main thread. The `interp->gc.immortalize` field
is then cleared again during `_PyGC_Init()`.

Change the condition so that we check if we should immortalize objects
using deferred reference counting whenever a non-main thread is created.
2025-04-07 20:13:02 +02:00
Miss Islington (bot)
bd2f518555
[3.13] gh-132221: Fix __match_args__ generation docs in dataclasses.rst (GH-132222) (#132226)
gh-132221: Fix `__match_args__` generation docs in `dataclasses.rst` (GH-132222)
(cherry picked from commit 8b62374b34)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-07 14:52:55 +00:00
Miss Islington (bot)
3b60cd8ec9
[3.13] gh-131852: Filter out POT-Creation-Date in msgfmt (GH-131880) (GH-132217)
(cherry picked from commit ad6a032ceb)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
2025-04-07 14:52:02 +00:00
Miss Islington (bot)
6afab81f72
[3.13] gh-132171: Fix _interpreters.run_string crash on string subclass (GH-132173) (#132219)
gh-132171: Fix `_interpreters.run_string` crash on string subclass (GH-132173)
(cherry picked from commit 3980718710)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-07 12:23:02 +00:00
Miss Islington (bot)
71b537572a
[3.13] gh-122040: reword Modules/xxmodule.c module-level comment (GH-132201) (#132207)
gh-122040: reword `Modules/xxmodule.c` module-level comment (GH-132201)
(cherry picked from commit af8d1b9537)

Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>
2025-04-07 08:27:34 +00:00
Prometheus3375
07483c2c80
[3.13] gh-131912: Improve description of grouping options in the format specification docs (GH-132030) (#132123)
(cherry picked from commit 06a110f522)
2025-04-07 09:19:13 +02:00
Miss Islington (bot)
68bbdd9026
[3.13] gh-129204: Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob (GH-132184) (#132191)
gh-129204: Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob (GH-132184)

* Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob

Add support for disabling the use of `posix_spawn` via a variable in
the process environment.

While it was previously possible to toggle this by modifying the value
of `subprocess._USE_POSIX_SPAWN`, this required either patching CPython
or modifying it within the interpreter instance which is not always
possible, such as when running applications or scripts not under a
user's control.



* fixup NEWS entry

---------
(cherry picked from commit 4c5dcc6d82)

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Co-authored-by: Vincent Fazio <vfazio@gmail.com>
2025-04-06 23:24:24 -07:00
Miss Islington (bot)
2452e0aefd
[3.13] gh-124111: Update macOS installer to use Tcl/Tk 8.6.16. (GH-132190)
(cherry picked from commit c55c0201fc)
Co-authored-by: Ned Deily <nad@python.org>
2025-04-07 02:09:43 -04:00
Miss Islington (bot)
0fbcfa5073
[3.13] gh-131423: Update macOS installer to use OpenSSL 3.0.16. (GH-132189)
Patch by Bénédikt Tran.
(cherry picked from commit ce49022b07)
Co-authored-by: Ned Deily <nad@python.org>
2025-04-07 01:40:11 -04:00
Miss Islington (bot)
2458f1cded
[3.13] gh-91132: Update macOS installer to use ncurses 6.5. (GH-129990)
(cherry picked from commit 0dbe543d70)

Co-authored-by: Ned Deily <nad@python.org>
2025-04-06 23:44:56 -04:00
Miss Islington (bot)
2f1fc0fab9
[3.13] Docs: Add a single table summary for `cmath` (GH-131887) (#132179)
Docs: Add a single table summary for ``cmath`` (GH-131887)
(cherry picked from commit 6eaa4aeef2)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-04-06 23:42:49 +00:00
sobolevn
5fb9fe0e3e
[3.13] gh-132011: Fix crash on invalid CALL_LIST_APPEND deoptimization (GH-132018) (#132161)
* [3.13] gh-132011: Fix crash on invalid `CALL_LIST_APPEND` deoptimization (GH-132018)
(cherry picked from commit c0661df42a)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-04-06 17:08:48 +00:00
Miss Islington (bot)
83070aa108
[3.13] gh-132159: Do not shadow user arguments in generated __new__ by @warnings.deprecated (GH-132160) (#132163)
gh-132159: Do not shadow user arguments in generated `__new__` by `@warnings.deprecated` (GH-132160)
(cherry picked from commit 7bb1e1a236)

Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
2025-04-06 17:00:54 +00:00
Miss Islington (bot)
f7ab4ebb2c
[3.13] gh-132038: Make perf version check in test_perf_profiler more robust (GH-132039) (#132058)
gh-132038: Make perf version check in test_perf_profiler more robust (GH-132039)

Should work also if the version string includes a commit hash, like `perf version 6.12.9.g242e6068fd5c`
(cherry picked from commit b6c92ec419)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2025-04-06 12:28:22 +03:00
Miss Islington (bot)
832a6918b1
[3.13] Docs: Replace dead hyperlink for CGI environment variables (GH-132137) (#132150)
Docs: Replace dead hyperlink for CGI environment variables (GH-132137)
(cherry picked from commit 0a10b45dd1)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
2025-04-06 08:53:15 +00:00
Miss Islington (bot)
d9def7aaf4
[3.13] gh-132134: Add the clangd `.cache directory to .gitignore` (GH-132135) (#132144)
gh-132134: Add the clangd ``.cache`` directory to ``.gitignore`` (GH-132135)
(cherry picked from commit 86804003ed)

Signed-off-by: Manjusaka <me@manjusaka.me>
Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
2025-04-06 04:49:10 +00:00
Miss Islington (bot)
7e154bea3d
[3.13] Fix numbered list syntax in programming.rst (GH-130158) (#132140)
Fix numbered list syntax in programming.rst (GH-130158)
(cherry picked from commit 376631829a)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2025-04-05 19:26:40 +00:00
Miss Islington (bot)
6074017ec7
[3.13] Skip a test for Bluetooth HCI socket (added in GH-132023) if it fails (GH-132072) (GH-132125)
(cherry picked from commit ef70f02925)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-05 14:05:27 +00:00
Serhiy Storchaka
a5ed92025b
[3.13] Add tests for Bluetooth RFCOMM, HCI and SCO (GH-132023) (GH-132071)
(cherry picked from commit 2ccd6aae4d)
2025-04-05 15:01:35 +03:00
Bénédikt Tran
9de2823b5a
[3.13] gh-131015: Add test for bytes formatting errors (#131881) (#132115)
* gh-131015: Add test for bytes formatting errors (#131881)

Co-authored-by: Ageev Maxim <maksim170901@gmail.com>
(cherry picked from commit 05557788f3)
2025-04-05 11:40:33 +02:00
Miss Islington (bot)
65181de34c
[3.13] Docs: document plistlib.InvalidFileException (GH-132069) (#132116)
Docs: document `plistlib.InvalidFileException` (GH-132069)
(cherry picked from commit 99e9798d61)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-04-05 10:53:13 +02:00
Miss Islington (bot)
240c200cce
[3.13] gh-130115: fix thread identifiers for 32-bit musl (GH-130391) (GH-132089)
CPython's pthread-based thread identifier relies on pthread_t being able
to be represented as an unsigned integer type.

This is true in most Linux libc implementations where it's defined as an
unsigned long, however musl typedefs it as a struct *.

If the pointer has the high bit set and is cast to PyThread_ident_t, the
resultant value can be sign-extended [0]. This can cause issues when
comparing against threading._MainThread's identifier. The main thread's
identifier value is retrieved via _get_main_thread_ident which is backed
by an unsigned long which truncates sign extended bits.

  >>> hex(threading.main_thread().ident)
  '0xb6f33f3c'
  >>> hex(threading.current_thread().ident)
  '0xffffffffb6f33f3c'

Work around this by conditionally compiling in some code for non-glibc
based Linux platforms that are at risk of sign-extension to return a
PyLong based on the main thread's unsigned long thread identifier if the
current thread is the main thread.

[0]: https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Arrays-and-pointers-implementation.html

---------
(cherry picked from commit 72123063dd)

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Co-authored-by: Vincent Fazio <vfazio@gmail.com>
2025-04-04 22:57:35 +02:00
Miss Islington (bot)
53752d20c4
[3.13] Fix typo in template_replace() test helper docstring (GH-132094) (#132095)
Fix typo in `template_replace()` test helper docstring (GH-132094)
(cherry picked from commit ac3a7bfecc)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
2025-04-04 20:04:18 +02:00