Commit graph

123750 commits

Author SHA1 Message Date
Miss Islington (bot)
aa1beed858
[3.13] gh-129248: Filter out the iOS log prefix from testbed runner output. (GH-129252) (#129283)
Filter out the iOS log prefix from testbed runner output.
(cherry picked from commit a58083811a)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-01-25 09:12:32 +00:00
Miss Islington (bot)
104bcff983
[3.13] GH-125722: Remove Sphinx patches (GH-129277) (#129278)
GH-125722: Remove Sphinx patches (GH-129277)
(cherry picked from commit d40692db06)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-25 03:55:36 +00:00
Miss Islington (bot)
e07a6fe7c3
[3.13] Improve tests for _colorize.can_colorize() (GH-129234) (GH-129265)
(cherry picked from commit 7907203bc0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-24 17:00:54 +00:00
Victor Stinner
1ee321b4c0
[3.13] gh-128679: Clear the ref tracer in _PyTraceMalloc_Stop() (#129258)
_PyTraceMalloc_Stop() now calls PyRefTracer_SetTracer(NULL, NULL).
2025-01-24 14:54:02 +01:00
Miss Islington (bot)
eed7865cee
[3.13] gh-97850: Remove the mention of removal from ResourceReader docs (GH-128602) (#128654)
gh-97850: Remove the mention of removal from `ResourceReader` docs (GH-128602)

Remove the mention of removal from ResourceReader docs
(cherry picked from commit a1284e9797)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-23 22:17:32 +01:00
Miss Islington (bot)
6a261a02a7
[3.13] gh-126172: Fix a misleading statement in PYTHON_BASIC_REPL documentation (GH-127203) (#129152)
gh-126172: Fix a misleading statement in PYTHON_BASIC_REPL documentation (GH-127203)

Fix a misleading statement in PYTHON_BASIC_REPL documentation.
(cherry picked from commit f18b226492)

Co-authored-by: Michael Kashirin <88917554+mkashirin@users.noreply.github.com>
2025-01-23 22:17:11 +01:00
Miss Islington (bot)
75ec6caa48
[3.13] gh-128479: fix asyncio staggered race leaking tasks, and logging unhandled exception.append exception (GH-128475) (#129227)
gh-128479: fix asyncio staggered race leaking tasks, and logging unhandled exception.append exception (GH-128475)
(cherry picked from commit ec91e1c276)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-23 22:16:02 +01:00
Miss Islington (bot)
5c102a12a1
[3.13] gh-118878: Pyrepl: show completions menu below the current line (GH-118939) (#129161)
gh-118878: Pyrepl: show completions menu below the current line (GH-118939)

(cherry picked from commit 29caec62ee)

Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-01-23 22:15:27 +01:00
Miss Islington (bot)
52ccf264df
[3.13] gh-128330: Terminal control characters should be restored on repl exit (GH-128331) (#129233)
gh-128330: Terminal control characters should be restored on repl exit (GH-128331)
(cherry picked from commit 0b15d9c0d2)

Co-authored-by: Andy Fiddaman <andy@omnios.org>
2025-01-23 17:55:28 +00:00
Victor Stinner
e3b3e01d6a
[3.13] gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191) (#129217)
gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191)

Support calling PyTraceMalloc_Track() and PyTraceMalloc_Untrack()
during late Python finalization.

* Call _PyTraceMalloc_Fini() later in Python finalization.
* Test also PyTraceMalloc_Untrack() without the GIL
* PyTraceMalloc_Untrack() now gets the GIL.
* Test also PyTraceMalloc_Untrack() in test_tracemalloc_track_race().

(cherry picked from commit 46c7e13c05)
2025-01-23 13:59:19 +01:00
Miss Islington (bot)
d674792ba7
[3.13] Add colour to GitHub Actions output (GH-129196) (#129198)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-22 21:45:08 +00:00
Hugo van Kemenade
cc3dc8ab24
[3.13] gh-127873: Only check sys.flags.ignore_environment for PYTHON* env vars (GH-127877) (#129138) 2025-01-22 21:09:51 +02:00
Miss Islington (bot)
f7f8b8b758
[3.13] gh-124363: Treat debug expressions in f-string as raw strings (GH-128399) (#129187)
gh-124363: Treat debug expressions in f-string as raw strings (GH-128399)

(cherry picked from commit 60a3a0dd6f)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-01-22 17:19:07 +00:00
Miss Islington (bot)
0b90dc8e89
[3.13] gh-128636: Fix crash in PyREPL when os.environ is overwritten with an invalid value (GH-128653) (#129186)
gh-128636: Fix crash in PyREPL when `os.environ` is overwritten with an invalid value (GH-128653)
(cherry picked from commit ba9a4b6215)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-22 16:38:13 +00:00
Miss Islington (bot)
67971cd605
[3.13] gh-128770: fix ResourceWarning in test_pyrepl (GH-128906) (#129179) 2025-01-22 13:13:08 +00:00
Miss Islington (bot)
7f6e80a03e
[3.13] gh-128894: Fix TracebackException._format_syntax_error on custom SyntaxError metadata (GH-128946) (#129178) 2025-01-22 13:12:39 +00:00
Miss Islington (bot)
a379749217
[3.13] gh-129093: Fix f-string debug text sometimes getting cut off when expression contains ! (GH-129159) (#129163)
gh-129093: Fix f-string debug text sometimes getting cut off when expression contains `!` (GH-129159)
(cherry picked from commit 767cf70844)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-22 00:50:22 +00:00
Miss Islington (bot)
0ddcb61ffe
[3.13] gh-123024: Correctly prepare/restore around help and show-history commands (GH-124485) (#129155)
gh-123024: Correctly prepare/restore around help and show-history commands (GH-124485)
(cherry picked from commit 5a9afe2362)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-01-21 22:15:57 +00:00
Miss Islington (bot)
3048dcd15a
[3.13] gh-125553: Fix backslash continuation in untokenize (GH-126010) (#129153)
gh-125553: Fix backslash continuation in `untokenize` (GH-126010)
(cherry picked from commit 7ad793e5db)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-21 21:04:55 +00:00
Miss Islington (bot)
0c7045378f
[3.13] gh-126332: Fix pyrepl crash for double ctrl-z in line overflow (GH-126650) (#129154)
gh-126332: Fix pyrepl crash for double ctrl-z in line overflow (GH-126650)

(cherry picked from commit d147e5e52c)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2025-01-21 21:04:41 +00:00
Diego Russo
ffcef2d6f9
[3.13] Move to public Linux arm64 hosted runners (#129146) 2025-01-21 22:40:59 +02:00
Miss Islington (bot)
508ace6705
[3.13] gh-122845: fix parameter_list_starargs in function definition pseudo-grammar (GH-122847) (#129150)
gh-122845: fix parameter_list_starargs in function definition pseudo-grammar (GH-122847)

Thanks to Artur Chakhvadze for bugfix.
(cherry picked from commit 6105846390)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-01-21 20:12:43 +00:00
Hugo van Kemenade
383af395af
[3.13] gh-128595: Default to stdout isatty for colour detection instead of stderr (GH-128498) (#129057)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Fix `test__colorize` unexpected keyword argument 'file' on buildbots (#129070)
2025-01-21 18:14:24 +02:00
Miss Islington (bot)
972d95313c
[3.13] gh-118915: C API: Document compiler flag macros (GH-129028) (GH-129086)
(cherry picked from commit 6e02096e2f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-21 11:47:55 +01:00
Miss Islington (bot)
8ab29d95a2
[3.13] Docs: fix typo in Doc/howto/mro.rst (GH-129095) (GH-129122)
(cherry picked from commit da310d209a)

Co-authored-by: smelnikov <13030121+smelnikov@users.noreply.github.com>
2025-01-21 10:40:31 +01:00
Miss Islington (bot)
f10f2a2e77
[3.13] GH-121970: Extract `changes` into a new extension (GH-129105) (#129109)
GH-121970: Extract ``changes`` into a new extension (GH-129105)
(cherry picked from commit e54ac3b69e)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-20 23:58:41 +00:00
Miss Islington (bot)
c5e1131cfb
[3.13] gh-111178: fix UBSan failures in Modules/_multiprocessing/semaphore.c (GH-129084) (#129100)
gh-111178: fix UBSan failures in `Modules/_multiprocessing/semaphore.c` (GH-129084)

fix UBSan failures for `SemLockObject`
(cherry picked from commit 5ed5572cac)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-20 21:05:52 +00:00
Miss Islington (bot)
2077082463
[3.13] doc: fix venv creating for the local Python using uv (GH-129094) (#129096)
Co-authored-by: Filipe Laíns 🇵🇸 <lains@riseup.net>
2025-01-20 21:13:12 +02:00
Miss Islington (bot)
03b2ecf41c
[3.13] GH-128131: Completely support random read access of uncompressed unencrypted files in ZipFile (GH-128143) (#129091)
GH-128131: Completely support random read access of uncompressed unencrypted files in ZipFile (GH-128143)
(cherry picked from commit dda02eb7be)

Co-authored-by: 5ec1cff <56485584+5ec1cff@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-20 18:28:52 +00:00
Miss Islington (bot)
a1c48a750c
[3.13] gh-128588: gh-128550: remove eager tasks optimization that missed and introduced incorrect cancellations (GH-129063) (#129089)
gh-128588: gh-128550: remove eager tasks optimization that missed and introduced incorrect cancellations (GH-129063)
(cherry picked from commit ed6934e71e)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-20 17:36:50 +00:00
Miss Islington (bot)
22e9faf08a
[3.13] Docs C API: Clarify what happens when null bytes are passed to PyUnicode_AsUTF8 (GH-127458) (#129080)
Docs C API: Clarify what happens when null bytes are passed to `PyUnicode_AsUTF8` (GH-127458)
(cherry picked from commit e792f4bc2e)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan U. <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-01-20 16:04:53 +00:00
Miss Islington (bot)
2f8eefe97a
[3.13] gh-129044: Update glossary entry for 'loader' to reflect current import system (GH-129073) (#129077)
gh-129044: Update glossary entry for 'loader' to reflect current import system (GH-129073)
(cherry picked from commit e1fa2fcc7c)

Co-authored-by: nikalinov <92603661+nikalinov@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-20 15:51:52 +00:00
Miss Islington (bot)
55d3d8165c
[3.13] gh-128978: Fix a NameError in sysconfig.expand_makefile_vars (GH-128979) (#129065)
gh-128978: Fix a `NameError` in `sysconfig.expand_makefile_vars` (GH-128979)

This fixes a regression introduced by 4a53a397c3.
(cherry picked from commit df66ff14b4)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-20 13:54:48 +00:00
Miss Islington (bot)
0351ed5049
[3.13] Fix a typo in syslog's error message (GH-129029) (#129049)
Fix a typo in `syslog`'s error message (GH-129029)
(cherry picked from commit 9b1c1817af)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-20 10:37:21 +00:00
Serhiy Storchaka
c6a566e47b
[3.13] gh-71339: Add additional assertion methods in test.support (GH-128707) (GH-128815)
Add a mix-in class ExtraAssertions containing the following methods:

* assertHasAttr() and assertNotHasAttr()
* assertIsSubclass() and assertNotIsSubclass()
* assertStartsWith() and assertNotStartsWith()
* assertEndsWith() and assertNotEndsWith()

(cherry picked from commit 06cad77a5b)
2025-01-20 11:19:00 +02:00
Miss Islington (bot)
59b919b082
[3.13] GH-125722: Use long options for Sphinx (GH-129039) (#129041)
GH-125722: Use long options for Sphinx (GH-129039)
(cherry picked from commit 4967fa6a9c)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-20 09:17:29 +02:00
Miss Islington (bot)
5fe7650552
[3.13] GH-125722: Increase minimum supported Sphinx to 8.1.3 (GH-128922) (#129037)
(cherry picked from commit d46b577ec0)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-20 00:52:00 +00:00
Miss Islington (bot)
080d17e945
[3.13] gh-129020: Remove ambiguous sentence from tokenize.untokenize docs (GH-129021) (#129035)
gh-129020: Remove ambiguous sentence from `tokenize.untokenize` docs (GH-129021)
(cherry picked from commit bca35f0e78)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-20 00:11:27 +00:00
Miss Islington (bot)
2120089547
[3.13] gh-80222: Fix email address header folding with long quoted-string (GH-122753) (#129007)
gh-80222: Fix email address header folding with long quoted-string (GH-122753)

Email generators using email.policy.default could incorrectly omit the
quote ('"') characters from a quoted-string during header refolding,
leading to invalid address headers and enabling header spoofing. This
change restores the quote characters on a bare-quoted-string as the
header is refolded, and escapes backslash and quote chars in the string.
(cherry picked from commit 5aaf416858)

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
2025-01-19 16:06:28 -05:00
Victor Stinner
6b47499510
[3.13] gh-128679: Fix tracemalloc.stop() race conditions (#128897)
tracemalloc_alloc(), tracemalloc_realloc(), PyTraceMalloc_Track(),
PyTraceMalloc_Untrack() and _PyTraceMalloc_TraceRef() now check
tracemalloc_config.tracing after calling TABLES_LOCK().

_PyTraceMalloc_Stop() now protects more code with TABLES_LOCK(),
especially setting tracemalloc_config.tracing to 1.

Add a test using PyTraceMalloc_Track() to test tracemalloc.stop()
race condition.

Call _PyTraceMalloc_Init() at Python startup.
2025-01-18 23:39:07 +00:00
Tian Gao
ef9961840b
[3.13] gh-128991: Release the enter frame reference within bdb callba… (#129002)
[3.13] gh-128991: Release the enter frame reference within bdb callback (GH-128992)

* Release the enter frame reference within bdb callback

* 📜🤖 Added by blurb_it.

---------

(cherry picked from commit 61b35f74aa)
2025-01-18 17:21:23 -05:00
Miss Islington (bot)
03ee311e5a
[3.13] gh-128998: Fix indentation of numbered list and literal block (GH-128999) (#129000)
gh-128998: Fix indentation of numbered list and literal block (GH-128999)
(cherry picked from commit e8092e5cdc)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-18 20:58:20 +00:00
Peter Bierma
453eaa9ffc
[3.13] Pre-commit: Drop specific language version and bump hooks (GH-128801) (#128994)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-18 22:52:07 +02:00
Miss Islington (bot)
b7ddcc3efb
[3.13] gh-121542: Document trailing newline behavior in set_content() (GH-121543) (#128995)
gh-121542: Document trailing newline behavior in `set_content()` (GH-121543)
(cherry picked from commit fba475ae6f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Yizheng Meng <dev@rapidcow.org>
2025-01-18 18:40:30 +00:00
Ed Nutting
fdac3629e9
[3.13] gh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF_STAT_INC/_Py_INCREF_IMMORTAL_STAT_INC (GH-127717) (#128713)
Previously, `_Py_RefcntAdd` hasn't called
`_Py_INCREF_STAT_INC/_Py_INCREF_IMMORTAL_STAT_INC` which is incorrect.

Now it has been fixed.
(cherry picked from commit ab05beb8ce)
2025-01-18 19:00:46 +02:00
Victor Stinner
430ccbc009
[3.13] gh-111495: Add more tests on PyEval C APIs (#122789) (#128987)
* gh-111495: Add more tests on PyEval C APIs (#122789)

* Add Lib/test/test_capi/test_eval.py
* Add Modules/_testlimitedcapi/eval.c

(cherry picked from commit bf8b374639)

* gh-111495: Fix refleaks in test_capi.test_eval tests (#122851)

(cherry picked from commit b4a316087c)
2025-01-18 14:49:55 +00:00
Miss Islington (bot)
fff334e538
[3.13] gh-125997: suggest efficient alternatives for time.sleep(0) (GH-128752) (#128984)
gh-125997: suggest efficient alternatives for `time.sleep(0)` (GH-128752)
(cherry picked from commit f4afaa6f11)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-18 11:08:42 +00:00
Miss Islington (bot)
c75894a36b
[3.13] gh-128961: Fix exhausted array iterator crash in __setstate__() (GH-128962) (#128976)
(cherry picked from commit 4dade055f4)

Co-authored-by: Tomasz Pytel <tompytel@gmail.com>
2025-01-18 10:17:42 +00:00
Miss Islington (bot)
d8a442637b
[3.13] gh-128916: Do not set SO_REUSEPORT on non-AF_INET* sockets (GH-128933) (#128969)
gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933)

* gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets

Do not attempt to set ``SO_REUSEPORT`` on sockets of address familifies other
than ``AF_INET`` and ``AF_INET6``, as it is meaningless with these address
families, and the call with fail with Linux kernel 6.12.9 and newer.

* Apply suggestions from code review



---------
(cherry picked from commit 3829104ab4)

Co-authored-by: Michał Górny <mgorny@gentoo.org>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2025-01-18 03:45:42 +00:00
Miss Islington (bot)
77e29c75da
[3.13] Fix definition of a generator iterator in glossary.rst (GH-128952) (#128967)
Fix definition of a `generator iterator` in `glossary.rst` (GH-128952)

Fix possible typo/grammar in glossary.rst

As discussed in https://discuss.python.org/t/typo-in-glossary-entry-for-generator-iterator/77163
(cherry picked from commit 8174770d31)

Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
2025-01-18 00:52:10 +00:00