Commit graph

53909 commits

Author SHA1 Message Date
Miss Islington (bot)
32c3dcc7a4
[3.13] gh-138162: Fix logging.LoggerAdapter with merge_extra=True and without the extra argument (GH-140511) (GH-140785)
(cherry picked from commit 327dbbedff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-30 11:31:54 +00:00
Mikhail Efimov
08cacb2a14
[3.13] gh-140576: Fixed crash produced by lexer in case of dedented zero byte (GH-140583) (#140762) 2025-10-29 14:33:55 +00:00
Miss Islington (bot)
62a3b6b0d9
[3.13] gh-140082: Forward colorizing from libregrtest to unittest (GH-140083) (#140755)
gh-140082: Forward colorizing from libregrtest to unittest (GH-140083)

libregrtest redirects test output to a file as part of its operation.
When `unittest` checks to see if it should colorize with
`isatty(sys.stdout)` that fails resulting in no colorizing of the
unittest output.

Update `libregrtest` to set `FORCE_COLOR=1` when redirecting test output
so that unittest will do color printing.
(cherry picked from commit 6ff62ac4fb)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-29 12:55:54 +00:00
Miss Islington (bot)
b3649a7122
[3.13] gh-140702: Log color and GHA env vars in test.pythoninfo (GH-140747) (#140754)
gh-140702: Log color and GHA env vars in test.pythoninfo (GH-140747)
(cherry picked from commit 376559bf54)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-29 12:51:18 +00:00
Cody Maloney
a1a71efa6e
[3.13] gh-140607: Validate returned byte count in RawIOBase.read (GH-140611) (#140730)
* [3.13] gh-140607: Validate returned byte count in RawIOBase.read (GH-140611)

While `RawIOBase.readinto` should return a count of bytes between 0 and
the length of the given buffer, it is not required to. Add validation
inside RawIOBase.read() that the returned byte count is valid.
(cherry picked from commit 0f0a362768)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Shamil <ashm.tech@proton.me>
Co-authored-by: Victor Stinner <vstinner@python.org>

* fixup: Use older attribute name

---------

Co-authored-by: Shamil <ashm.tech@proton.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-29 13:31:57 +01:00
Miss Islington (bot)
a026f02fd4
[3.13] gh-140657: Don't rerun test_import single phase init test (GH-140712) (#140714)
gh-140657: Don't rerun test_import single phase init test (GH-140712)

test_basic_multiple_interpreters_main_no_reset() leaks memory:
import_in_subinterp() is called with postcleanup=False.
(cherry picked from commit c6d4c79c9a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-28 17:29:44 +00:00
Miss Islington (bot)
bec053c184
[3.13] GH-140590: Fix setstate for functools.partial C-module (GH-140671) (#140699)
GH-140590: Fix setstate for functools.partial C-module (GH-140671)

(cherry picked from commit d26686a7f8)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
2025-10-28 18:14:14 +05:30
Miss Islington (bot)
9c8eade20c
[3.13] gh-140634: Fix a reference counting bug in os.sched_param.__reduce__() (GH-140667) (GH-140686)
(cherry picked from commit 364ae607d8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-27 20:05:10 +00:00
Miss Islington (bot)
0e3b47b839
[3.13] gh-140633: AppleFrameworkLoader: Ignore AttributeError when setting __file__ (GH-140635) (GH-140659)
(cherry picked from commit 3416e7c8dc)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-27 14:08:09 +01:00
Bartosz Sławecki
15f92e66eb
[3.13] gh-137568: Ignore startup file in test_dumb_terminal_exits_cleanly (GH-140295) (GH-140632)
(cherry picked from commit 06c779474c)
2025-10-26 15:36:47 +00:00
Sebastian Pipping
7abbf51839
[3.13] gh-140593: Fix a memory leak in function my_ElementDeclHandler of pyexpat (GH-140602) (#140630)
[3.13] gh-140593: Fix a memory leak in function `my_ElementDeclHandler` of `pyexpat` (GH-140602)

Ensure that the memory allocated for the content model
passed to `my_ElementDeclHandler` is freed in all error
paths.

(cherry picked from commit e34a5e3304)
2025-10-26 15:22:20 +00:00
Miss Islington (bot)
0f0ca07d79
[3.13] gh-140482: Preserve and restore stty echo as a test environment (GH-140519) (#140563)
gh-140482: Preserve and restore `stty echo` as a test environment (GH-140519)
(cherry picked from commit b3c713a0af)


gh-140482: Restore `stty echo` as a test environment

Co-authored-by: Barry Warsaw <barry@python.org>
2025-10-24 18:30:59 +00:00
Miss Islington (bot)
166b3549d7
[3.13] gh-136535: Tests: Correct Py_TPFLAGS_MANAGED_DICT in test_class.py (gh-136538) (gh-140533) 2025-10-24 11:43:32 +00:00
Stan Ulbrych
1cc2c954d6
[3.13] gh-140471: Fix buffer overflow in AST node initialization with malformed _fields (GH-140506) (#140510)
(cherry picked from commit 95953b692d)
2025-10-24 00:38:02 +01:00
Miss Islington (bot)
adf0c11a26
[3.13] gh-140438: properly run the asyncio REPL tests (GH-140298) (#140508)
gh-140438: properly run the asyncio REPL tests (GH-140298)
(cherry picked from commit 1a3da2c070)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2025-10-23 15:47:55 +00:00
Miss Islington (bot)
640bc258c1
[3.13] gh-140474: Fix memory leak in array.array (GH-140478) (GH-140499)
gh-140474: Fix memory leak in `array.array` (GH-140478)
(cherry picked from commit aa9d0a61d5)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-23 12:18:01 +00:00
Peter Bierma
69230d1c56
[3.13] gh-140406: Fix memory leak upon __hash__ returning a non-integer (GH-140411) (GH-140441)
* gh-140406: Fix memory leak upon `__hash__` returning a non-integer (GH-140411)

(cherry picked from commit 71db05a12d)
2025-10-22 01:07:32 +00:00
Miss Islington (bot)
cd6b272f7a
[3.13] gh-135801: Add tests for filtering warnings by module (GH-140240) (GH-140247)
(cherry picked from commit fbf0843e39)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-21 18:18:27 +00:00
Miss Islington (bot)
2e2fe26fe6
[3.13] gh-139951: Test on GC collection disabled if threshold is zero (GH-140304) (#140363)
gh-139951: Test on GC collection disabled if threshold is zero (GH-140304)
(cherry picked from commit 5d0abb6971)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
2025-10-21 08:44:23 -07:00
Miss Islington (bot)
152e7d14dc
[3.13] docs: be clearer that glob results are unordered (GH-140184) (#140340)
(cherry picked from commit ed672f7a8a)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2025-10-20 07:32:05 +03:00
Miss Islington (bot)
b2ed70f016
[3.13] Lib/idlelib/idle_test/__init__.py: remove commented out duplicate code (GH-140259) (#140323)
`Lib/idlelib/idle_test/__init__.py`: remove commented out duplicate code (GH-140259)
(cherry picked from commit 790cdae5a0)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-19 04:49:57 -04:00
Miss Islington (bot)
0760a572f7
[3.13] gh-138859: Account for ParamSpec defaults that are not lists … (GH-138868) (#140208)
gh-138859: Account for `ParamSpec` defaults that are not lists … (GH-138868)
(cherry picked from commit 379fd020a0)

Co-authored-by: bzoracler <50305397+bzoracler@users.noreply.github.com>
2025-10-16 13:26:24 -07:00
Miss Islington (bot)
9fb32eb83e
[3.13] gh-140170: Fix test_site with -s flag (GH-140179) (#140201)
gh-140170: Fix test_site with -s flag (GH-140179)

Commit
(cherry picked from commit 7ac94fcb1d)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-16 10:57:00 +00:00
Miss Islington (bot)
f09a6a2fc8
[3.13] gh-140041: Fix import of ctypes on Android and Cygwin when ABI flags are present (GH-140178) (#140181)
Use sysconfig to determine the full name of libpython, rather than hardcoding
a library name that doesn't have ABI flags.
(cherry picked from commit 7f371ed84b)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-10-15 22:03:25 +00:00
Miss Islington (bot)
77976761ba
[3.13] gh-138993: Dedent credits text (GH-138994) (#140087)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-15 14:05:53 +03:00
Thomas Wouters
e40f1619ec Python 3.13.9
-----BEGIN PGP SIGNATURE-----
 
 iQKTBAABCgB9FiEEcWlgX2LHUTVtBUomqCHmgOX6YwUFAmjuVaJfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDcx
 Njk2MDVGNjJDNzUxMzU2RDA1NEEyNkE4MjFFNjgwRTVGQTYzMDUACgkQqCHmgOX6
 YwXJow//cfFrVV9JbaBvZhMPnVAdjPfLd1sskCzTEvM/SkNmUqqmjUGh6TgCf9uZ
 ujSDe8sZ+ihDSPMFEWg7uQQULn2qKioCvGptVMHIWIKaWjutb3qZJBfXKIFxpvr4
 jZyLnRsTVQZ3RllPGjlb0WzBrazmCLmVOsZyHCAmRpeSPPE77KJXn9dsz5PlA+KH
 8n2LsvuG2hqF46NBZu0ro43d6rX16TrBI7CGMZQMTMkDGe75vIQrhk/2Ek66UZtA
 6Y5grca1vsnSEPNaVXLKpC+Ndosf6ziI23YLoAnsE8q15lEsEwAiS8Rx2rqiWVgb
 MwrUccveyiqm5/bv0v+MHXOXzuipEchR/YfdyJPBm1JyeOEvYX+Zsp0sMe5nVIV8
 WHWgnrb0A0pIbCLL5LqoPdCrksOq23NYkE/ayvHmaOhFsQ62vedts/RFLpnyPlVl
 9iY/XE098MUvngsDkkCVqNwkZNYWymqnDRm2hqPWNqQlDSCPGhpR4dcPLr0FW8Ji
 iJUdYJ0Q5h6YJOMLZyfRkqlPUxay7PSw6+PjaKyHChpAAPlhqPqjsYcLSjxRJ3QX
 R5A7V1gavRV0opHnQzDoQxMacjmCA3ELnAXqBly8YyjOB+OuRg5UP1xDlwYkaHF4
 mwMMw731XM98MXphu4Q0PW594TQplLbDsdpmcWimFtAJu2NVW4U=
 =hm/l
 -----END PGP SIGNATURE-----

Python 3.13.9
2025-10-14 20:33:45 +02:00
Serhiy Storchaka
92f7965cf6
[3.13] gh-139640: Fix swallowing syntax warnings in different modules (GH-139755) (GH-140119)
Revert GH-131993.

Fix swallowing some syntax warnings in different modules if they accidentally
have the same message and are emitted from the same line.

Fix duplicated warnings in the "finally" block.

(cherry picked from commit 279db6bede)
2025-10-14 15:46:11 +00:00
Stan Ulbrych
c5ec267311
[3.13] gh-101828: Fix jisx0213 codecs removing null characters (gh-139340) (gh-140112)
* [3.13] gh-101828: Fix `jisx0213` codecs removing null characters (gh-139340)
(cherry picked from commit 87eadce3e0)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>

* Accidentally removed line
2025-10-14 14:48:29 +00:00
Miss Islington (bot)
bc3f2885f4
[3.13] gh-114827: clarify threading.Event.wait timeout behavior (GH-114834) (#140099)
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-10-14 14:13:31 +00:00
Thomas Wouters
8183fa5e3f Python 3.13.9 2025-10-14 15:52:31 +02:00
Miss Islington (bot)
bc2c8d748c [3.13] gh-139783: Fix inspect.getsourcelines() for the case when a decorator is followed by a comment or an empty line (GH-139836) (GH-139890)
(cherry picked from commit f4104f5d74)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-14 15:47:20 +02:00
Sergey B Kirpichev
bfb9639352
[3.13] gh-102431: Clarify constraints on operands of Decimal logical operations (GH-102836) (#140106)
* [3.13] gh-102431: Clarify constraints on operands of Decimal logical operations (GH-102836)

Sync C/Python implementation of the decimal: logical_ops for contexts.
(cherry picked from commit 6ecf77dbde)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-10-14 15:45:02 +02:00
Miss Islington (bot)
0e7893207b
[3.13] gh-138772: Fix and improve documentation for turtle color functions (GH-139325) (GH-140048)
Use multiple signatures for clarity.
Explain different forms of bgcolor() in details.
Fix outdated docstrings.
(cherry picked from commit 525dcfe523)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-13 15:56:31 +00:00
Miss Islington (bot)
cbb415e992
[3.13] gh-139905: Provide suggestion in error message if Generic.__init_subclass__ was not called (GH-139943) (#139956)
gh-139905: Provide suggestion in error message if `Generic.__init_subclass__` was not called (GH-139943)
(cherry picked from commit 5776d0d2e0)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-11 15:36:44 +00:00
Miss Islington (bot)
6a9908ee94
[3.13] gh-96491: Deduplicate version in IDLE shell title (GH-139841) (#139932)
gh-96491: Deduplicate version in IDLE shell title (GH-139841)

Saving to a file added both the filename and repeated the version.
---------
(cherry picked from commit d4e5802588)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-10-11 02:00:21 +00:00
Miss Islington (bot)
aee27d9d19
[3.13] gh-139783: Fix inspect.getsourcelines() for the case when a decorator is followed by a comment or an empty line (GH-139836) (GH-139890)
(cherry picked from commit f4104f5d74)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-10 21:26:36 +00:00
Miss Islington (bot)
b1bc743d36
[3.13] gh-139065: Fix trailing space before long word in textwrap (GH-139070) (GH-139903)
Fix trailing space before a wrapped long word if the line length with
a space is exactly "width".
(cherry picked from commit 1c598e0436)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-10 13:51:41 +00:00
Łukasz Langa
94ff4d4eb4
[3.13] gh-139391: properly handle signal.signal() in UnixConsole when called from a non-main thread (GH-139392) (#139861)
(cherry picked from commit b8c8b8f1d3)

Co-authored-by: yihong <zouzou0208@gmail.com>
2025-10-09 23:09:23 +05:30
Miss Islington (bot)
54f9613a37
[3.13] gh-139845: do not print twice in default asyncio REPL (GH-139846) (#139860)
gh-139845: do not print twice in default asyncio REPL (GH-139846)
(cherry picked from commit a310b3a99d)

Co-authored-by: yihong <zouzou0208@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-10-09 21:38:04 +05:30
Sam Gross
16d2e97cf3
[3.13] gh-137400: Fix thread-safety issues when profiling all threads (gh-137518) (gh-137733)
There were a few thread-safety issues when profiling or tracing all
threads via PyEval_SetProfileAllThreads or PyEval_SetTraceAllThreads:

* The loop over thread states could crash if a thread exits concurrently
  (in both the free threading and default build)
* The modification of `c_profilefunc` and `c_tracefunc` wasn't
  thread-safe on the free threading build.
(cherry picked from commit a10152f8fd)
2025-10-09 11:42:47 -04:00
Łukasz Langa
f6186a3709
[3.13] gh-133400: Fixed Ctrl+D (^D) behavior in :mod:_pyrepl module (GH-133883) (GH-139851)
(cherry picked from commit 81959a0364)

Co-authored-by: DeepWzh <wzh2012@outlook.com>
Co-authored-by: adam j hartz <adam@smatz.net>
2025-10-09 17:38:10 +02:00
Miss Islington (bot)
abe6f529ff
[3.13] gh-75989: TarFile.extractall and TarFile.extract now overwrite symlinks when extracting hardlinks (GH-137316) (GH-139771)
(cherry picked from commit 481d5b5455)

Co-authored-by: Alexander Urieles <aeurielesn@users.noreply.github.com>
2025-10-09 12:54:14 +02:00
Miss Islington (bot)
69a34938f8
[3.13] gh-139743: Avoid import-time print in test_sqlite3 (GH-139746) (GH-139829)
(cherry picked from commit 65089406a5)

Co-authored-by: Peter <peter86225@gmail.com>
2025-10-09 08:24:06 +00:00
Miss Islington (bot)
8234841e5b
[3.13] gh-139805: Bump test_repl_eio timeout for slow builtbots (GH-139807) (#139813)
gh-139805: Bump `test_repl_eio` timeout for slow builtbots (GH-139807)
(cherry picked from commit e7e3d1d4a8)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-08 22:57:30 +00:00
Kumar Aditya
dac827cb98
[3.13] gh-139748: fix leaks in AC error paths when using unicode FS-b… (#139792)
* [3.13] gh-139748: fix leaks in AC error paths when using unicode FS-based converters (GH-139765)
(cherry picked from commit b04a57deef)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-10-08 22:21:49 +05:30
Miss Islington (bot)
de84a03099
[3.13] gh-139308: Skip test_special_chars_csh on NetBSD due to csh variable expansion issue (GH-139341) (#139560)
gh-139308: Skip test_special_chars_csh on NetBSD due to csh variable expansion issue (GH-139341)

Skip test_special_chars_csh on NetBSD due to csh variable expansion issue
(cherry picked from commit ae6e7f572c)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: Filipe Laíns 🇵🇸 <lains@riseup.net>
2025-10-08 14:10:34 +00:00
Miss Islington (bot)
12ada79fe9
[3.13] gh-83424: Allow empty name if handle is non-null when create ctypes.CDLL on Windows (GH-136878) (#138547)
gh-83424: Allow empty name if handle is non-null when create ctypes.CDLL on Windows (GH-136878)
(cherry picked from commit ed522ed211)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2025-10-08 15:56:23 +02:00
Miss Islington (bot)
a688557720
[3.13] gh-137589: Zipfile tests: close file objects (GH-138080) (#139767)
gh-137589: Zipfile tests: close file objects (GH-138080)

Zipfile tests: close file objects
(cherry picked from commit 5cea843594)

Co-authored-by: Rogdham <3994389+Rogdham@users.noreply.github.com>
2025-10-08 15:52:15 +02:00
Bénédikt Tran
0c91d6848a
[3.13] gh-70765: avoid waiting for HTTP headers when parsing HTTP/0.9 requests (GH-139514) (#139602)
(cherry picked from commit 13dc2fde8c)
(cherry picked from commit 1fe89d324e)
2025-10-08 10:32:45 +00:00
Tomasz Pytel
b7bc9776e8
[3.13] gh-139516: Fix lambda colon start format spec in f-string in t… (#139726)
[3.13] gh-139516: Fix lambda colon start format spec in f-string in tokenizer (GH-139657)
(cherry picked from commit 539461d9ec)
2025-10-07 23:15:57 +01:00