Commit graph

55244 commits

Author SHA1 Message Date
Miss Islington (bot)
b2a2f032dc
[3.14] gh-130662: Accept leading zeros in precision/width for Fraction's formatting (GH-130663) (#136361)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-07-07 09:50:02 +00:00
Miss Islington (bot)
57d6db529b
[3.14] gh-136289: Fix test_sqlite3 on platforms with strict UTF-8 filesystem (GH-136326) (GH-136350)
(cherry picked from commit 85b817da94)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-07-07 12:43:44 +03:00
Jelle Zijlstra
3d01565da4
[3.14] gh-136316: Make typing.evaluate_forward_ref better at evaluating nested forwardrefs (GH-136319) (#136346)
(cherry picked from commit 9312702d2e)
2025-07-07 00:10:57 +00:00
Miss Islington (bot)
d86ca7b610
[3.14] gh-136285: Improve pickle protocol testing in test_interpreters (GH-136286) (#136333)
gh-136285: Improve `pickle` protocol testing in `test_interpreters` (GH-136286)
(cherry picked from commit 06e347b846)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-07-06 11:13:13 +03:00
Miss Islington (bot)
2b2cf81a6c
[3.14] gh-136315: Fix skipped multithreading test in test_zstd (GH-136320) (#136322)
gh-136315: Fix skipped multithreading test in test_zstd (GH-136320)

Fix skipped test in test_zstd
(cherry picked from commit 5dac137b9f)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-07-05 11:24:19 -07:00
Miss Islington (bot)
c62c523e03
[3.14] gh-136297: Test all pickle protocols in test_zoneinfo_property.py (GH-136298) (#136311)
gh-136297: Test all `pickle` protocols in `test_zoneinfo_property.py` (GH-136298)
(cherry picked from commit 5de7e3f973)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-07-05 06:39:48 +00:00
Miss Islington (bot)
f2f3edb8d7
[3.14] gh-135773: have pyvenv.cfg without home key anchor a venv and deduce home (GH-135831) (#136287)
gh-135773: have pyvenv.cfg without home key anchor a venv and deduce home (GH-135831)

This is still formally undefined behaviour, but we may as well
keep the *same* undefined behaviour as previous versions.

PEP 796 proposes a cleaner and more consistent replacement for 3.15+
(cherry picked from commit 93263d4314)

Co-authored-by: Richard Levasseur <rlevasseur@google.com>
2025-07-05 00:36:12 +10:00
Miss Islington (bot)
fa7e76e4dd
[3.14] gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH-135664) (GH-136271)
* "--!>" now ends the comment.
* "-- >" no longer ends the comment.
* Support abnormally ended empty comments "<-->" and "<--->".

---------
(cherry picked from commit 8ac7613dc8)

Co-author: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2025-07-04 07:26:03 +00:00
Miss Islington (bot)
03ce4b2617
[3.14] gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930) (GH-136255)
* Whitespaces no longer accepted between `</` and the tag name.
  E.g. `</ script>` does not end the script section.

* Vertical tabulation (`\v`) and non-ASCII whitespaces no longer recognized
  as whitespaces. The only whitespaces are `\t\n\r\f `.

* Null character (U+0000) no longer ends the tag name.

* Attributes and slashes after the tag name in end tags are now ignored,
  instead of terminating after the first `>` in quoted attribute value.
  E.g. `</script/foo=">"/>`.

* Multiple slashes and whitespaces between the last attribute and closing `>`
  are now ignored in both start and end tags. E.g. `<a foo=bar/ //>`.

* Multiple `=` between attribute name and value are no longer collapsed.
  E.g. `<a foo==bar>` produces attribute "foo" with value "=bar".

* Whitespaces between the `=` separator and attribute name or value are no
  longer ignored. E.g. `<a foo =bar>` produces two attributes "foo" and
  "=bar", both with value None; `<a foo= bar>` produces two attributes:
  "foo" with value "" and "bar" with value None.

---------
(cherry picked from commit 0243f97cba)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2025-07-03 20:57:53 +00:00
Miss Islington (bot)
4877f4343c
[3.14] gh-130664: Treat '0' fill character with align '=' as zero-padding for Fraction's (GH-131067) (GH-136241)
(cherry picked from commit c113a8e523)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-07-03 11:22:03 +00:00
Miss Islington (bot)
4bc9c018d1
[3.14] gh-135069: Fix exception message in encodings.idna module (GH-135071) (#136235)
gh-135069: Fix exception message in encodings.idna module (GH-135071)
(cherry picked from commit 8dc3383abe)

Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
2025-07-03 10:18:27 +00:00
Miss Islington (bot)
1a4f92b9fb
[3.14] gh-135640: Adds more type checking to ElementTree (GH-135643) (GH-136225)
(cherry picked from commit e0245c789f)

Co-authored-by: Kira <kirawhoprograms@fastmail.com>
2025-07-03 08:15:01 +00:00
Miss Islington (bot)
5216a6c547
[3.14] gh-135836: Fix IndexError in asyncio.create_connection() (GH-135875) (#136221)
gh-135836: Fix `IndexError` in `asyncio.create_connection()` (GH-135875)
(cherry picked from commit 9084b15156)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-07-03 04:34:30 +00:00
Miss Islington (bot)
8810ccfc60
[3.14] gh-135836: Fix IndexError in asyncio.create_connection with empty exceptions list (GH-135845) (#136167)
gh-135836: Fix `IndexError` in `asyncio.create_connection` with empty exceptions list (GH-135845)
(cherry picked from commit 0e19db653d)

Co-authored-by: heliang666s <147408835+heliang666s@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-07-03 09:37:18 +05:30
Miss Islington (bot)
8ba024ddf5
[3.14] gh-134280: Disable constant folding for ~ with a boolean argument (GH-134982) (GH-136185)
This moves the deprecation warning from compile time to run time.
(cherry picked from commit 86c3316183)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-07-02 11:28:09 +03:00
Miss Islington (bot)
5e09d1913b
[3.14] gh-87298: Add tests for find_in_strong_cache() bug in _zoneinfo (GH-24829) (GH-136181)
(cherry picked from commit 12ce16bc13)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Paul Ganssle <p.ganssle@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-07-01 15:20:53 +00:00
Miss Islington (bot)
028901e97f
[3.14] gh-133982: Use implementation-specific open in test_fileio.OtherFileTests (GH-135364) (GH-136148)
gh-133982: Use implementation-specific `open` in `test_fileio.OtherFileTests` (GH-135364)
(cherry picked from commit 23caccf74c)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-06-30 22:23:34 +00:00
Miss Islington (bot)
e86ac72995
[3.14] gh-85702: Catch PermissionError in zoneinfo.load_tzdata() (GH-136117) (#136128)
gh-85702: Catch PermissionError in zoneinfo.load_tzdata() (GH-136117)
(cherry picked from commit ee47670e8b)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-06-30 14:58:18 +00:00
Miss Islington (bot)
2e6d3f0a1b
[3.14] gh-136087: Remove \r from documented os.linesep values (GH-136088) (#136111)
gh-136087: Remove `\r` from documented `os.linesep` values (GH-136088)
(cherry picked from commit 980a56843b)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-06-30 10:44:29 +03:00
Miss Islington (bot)
5e65cbbe64
[3.14] Doc: fix duplicated words (GH-136086) (#136108)
Doc: fix duplicated words (GH-136086)

---------
(cherry picked from commit 698bab5a40)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-06-29 18:45:26 -04:00
Miss Islington (bot)
7df3eee645
[3.14] Doc: Fix duplicate words in idlelib (GH-136089) (#136090)
Doc: Fix duplicate words in idlelib (GH-136089)
(cherry picked from commit f04d2b8819)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
2025-06-29 07:12:50 +00:00
Pablo Galindo Salgado
c66b54f361
[3.14] gh-91048: Fix external inspection multi-threaded performance (GH-136005) (#136080)
(cherry picked from commit 5334732f9c)
2025-06-28 19:12:54 +01:00
Bénédikt Tran
c9c51bd770
[3.14] gh-135571: Guard _hashlib usage in test_hashlib.py (GH-135572) (#136042)
(cherry picked from commit 065194c1a9)

Co-authored-by: Will Childs-Klein <willck93@gmail.com>
2025-06-28 10:15:39 +02:00
Miss Islington (bot)
3bd4a49201
[3.14] gh-136028: Fix parsing month names containing "İ" (U+0130) in strptime() (GH-136029) (GH-136037)
This affects locales az_AZ, ber_DZ, ber_MA and crh_UA.
(cherry picked from commit 731f5b8ab3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-27 14:12:15 +00:00
Miss Islington (bot)
1b218680b7
[3.14] gh-78465: Fix error message for cls.__new__(cls, ...) where cls is not instantiable (GH-135981) (GH-136030)
Previous error message suggested to use cls.__new__(), which
obviously does not work. Now the error message is the same as for
cls(...).
(cherry picked from commit c45f4f3ebe)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-27 12:01:48 +00:00
Miss Islington (bot)
33c83cea07
[3.14] gh-128051: Fix tests if sys.float_repr_style is 'legacy' (GH-135908) (#136025)
gh-128051: Fix tests if sys.float_repr_style is 'legacy' (GH-135908)
(cherry picked from commit f3aec60d7a)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-06-27 10:26:51 +00:00
Miss Islington (bot)
a168c77536
[3.14] gh-53203: Fix strptime() for %c, %x and %X formats on some locales (GH-135971) (GH-136019)
* Add detection of decimal non-ASCII alt digits.
* Add support of non-decimal alt digits on locale lzh_TW.
* Accept only numbers in correct range if alt digits are known.
* Fix bug in detecting the position of the week day name on locales byn_ER and wal_ET.
* Fix support of single-digit hour on locales ar_SA and bg_BG.
* Add support for %T, %R, %r, %C, %OC.
* Prepare code to use nl_langinfo().

(cherry picked from commit 07183ebce3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-27 08:16:31 +00:00
Miss Islington (bot)
9798a8de1a
[3.14] gh-135995: Fix missing char in palmos encoding (GH-135990) (#136001)
gh-135995: Fix missing char in palmos encoding (GH-135990)

0x8b correctly encodes to ‹, but 0x9b was mistakenly marked as a control character instead of ›.
---------
(cherry picked from commit 58a42dea97)

Co-authored-by: Nathan Korth <nkorth@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-06-26 23:01:43 +00:00
Miss Islington (bot)
29cb4d670e
[3.14] IDLE: Update NEWS2x.txt with 2.7.0 release date (GH-129908) (#135999)
IDLE: Update NEWS2x.txt with 2.7.0 release date (GH-129908)
(cherry picked from commit 642e5dfc74)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-06-26 20:46:14 +00:00
Miss Islington (bot)
2045453171
[3.14] gh-129958: New syntax error in format spec applies to both f-strings and t-strings (GH-135570) (#135982)
(cherry picked from commit fb9e292919)

Co-authored-by: Dylan <dylwil3@gmail.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2025-06-26 18:40:09 +02:00
Miss Islington (bot)
3b5d82a426
[3.14] gh-135956: Remove duplicate word in _pydatetime docstring (GH-135957) (#135962)
gh-135956: Remove duplicate word in _pydatetime docstring (GH-135957)

_pydatetime.isoformat docstring repeats 'giving'.
(cherry picked from commit e3ea6f2b3b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-06-26 04:09:11 +00:00
Miss Islington (bot)
c8e914cfb5
[3.14] gh-135721: skip test_trashcan_python_class on wasm buildbots with stack overflow (GH-135766) (GH-135955)
gh-135721: skip `test_trashcan_python_class` on wasm buildbots with stack overflow (GH-135766)
(cherry picked from commit 3fb6cfe7a9)

Co-authored-by: Pastukhov Nikita <diementros@yandex.ru>
2025-06-25 23:02:39 +00:00
Miss Islington (bot)
df1c124240
[3.14] gh-91555: Revert disabling of logger while handling log record. (GH-135858) (GH-135910)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2025-06-25 18:03:13 +01:00
Miss Islington (bot)
090a42b5eb
[3.14] gh-135855: Raise TypeError When Passing Non-dict Object to _interpreters.set___main___attrs (gh-135900)
(cherry picked from commit 4e6f0d116, AKA gh-135856)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2025-06-24 19:19:31 +00:00
Miss Islington (bot)
3cdb659a0c
[3.14] gh-135487: fix reprlib.Repr.repr_int when given very large integers (GH-135506) (#135887)
gh-135487: fix `reprlib.Repr.repr_int` when given very large integers (GH-135506)
(cherry picked from commit e5f03b94b6)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-24 12:02:02 +00:00
Miss Islington (bot)
961dd80e0e
[3.14] gh-135494: Fix python -m test --pgo -x test_re (GH-135713) (#135880)
gh-135494: Fix python -m test --pgo -x test_re (GH-135713)

Fix regrtest to support excluding tests from --pgo tests.
(cherry picked from commit 15c6d63fe6)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-06-24 10:48:10 +00:00
Miss Islington (bot)
aad47c1e0b
[3.14] Bump mypy to 1.16.1 (GH-135720) (#135848)
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-06-23 13:09:24 +00:00
Miss Islington (bot)
85fbf80ca2
[3.14] gh-134986: Catch PermissionError when trying to call perf in tests (GH-134987) (#135841)
gh-134986: Catch PermissionError when trying to call perf in tests (GH-134987)

Using Ubuntu 24.04 on the Windows Subsystem for Linux, perf will raise a
`PermissionError` instead of `FileNotFoundError`. This commit modifies
the tests to catch that.
(cherry picked from commit 6ab842fce5)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-06-23 10:53:55 +00:00
Miss Islington (bot)
10f9db9b35
[3.14] gh-135815: skip netrc security checks if os.getuid is missing (GH-135816) (#135825)
gh-135815: skip `netrc` security checks if `os.getuid` is missing (GH-135816)
(cherry picked from commit b57b619e34)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-22 20:12:57 +00:00
Miss Islington (bot)
2b5c904fbb
[3.14] gh-127146: Skip test_os.test_mode for Emscripten (GH-135764) (#135784)
Temporarily skip test_os.test_mode on Emscripten; this fails consistently
on the buildbot, but not on other test configurations. Reported as GH-135783
for follow up.
(cherry picked from commit f4911258a8)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-06-21 19:13:40 +08:00
Miss Islington (bot)
e388b29a10
[3.14] gh-135557: use atomic stores in heapq operations in free-threading (GH-135601) (#135787)
gh-135557: use atomic stores in `heapq` operations in free-threading (GH-135601)
(cherry picked from commit 13cac83347)

Co-authored-by: Xuanteng Huang <44627253+xuantengh@users.noreply.github.com>
2025-06-21 16:32:27 +05:30
Miss Islington (bot)
fa62dfe888
[3.14] gh-135645: Added supports_isolated_interpreters to sys.implementation (GH-135667) (#135786)
gh-135645: Added `supports_isolated_interpreters` to `sys.implementation` (GH-135667)
(cherry picked from commit 8ca1e4d846)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2025-06-21 08:21:50 +00:00
Miss Islington (bot)
35b90e8bec
[3.14] gh-135698: Fix Cross-interpreter Queue.full() With Negative/Default max_size (gh-135775)
We weren't handling non-positive maxsize values (including the default) properly
in Queue.full().  This change fixes that and adjusts an associated assert.

(cherry picked from commit c5ea8e8e8, AKA gh-135724)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2025-06-20 20:51:01 +00:00
Ken Jin
60fc42c169
[3.14] gh-135608: Add a null check for attribute promotion to fix a JIT crash (GH-135613) (#135739)
gh-135608: Add a null check for attribute promotion to fix a JIT crash (GH-135613)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
2025-06-20 15:24:25 +08:00
Miss Islington (bot)
203753b4bb
[3.14] gh-127146: Add skip_emscripten_stack_overflow in a few places (GH-135722) (#135733)
More tests that hit stack limits on some platforms.
(cherry picked from commit c8c13f8036)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-06-19 21:54:04 +00:00
Miss Islington (bot)
0370cb42da
gh-135543: Emit sys.remote_exec audit event when sys.remote_exec is called (GH-135544)
(cherry picked from commit 1ddfe59320)

Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
2025-06-19 20:51:06 +00:00
Miss Islington (bot)
a170086162
[3.14] gh-135273: Unify ZoneInfo.from_file signatures (GH-135274) (#135716)
gh-135273: Unify `ZoneInfo.from_file` signatures (GH-135274)

Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature.
(cherry picked from commit 7cc8949692)

Co-authored-by: Andrii Hrimov <andrew.hrimov@gmail.com>
2025-06-19 15:14:14 +00:00
Miss Islington (bot)
53b36e04d4
[3.14] gh-126112: Fix test_os.TimerfdTests: use 10 ms resolution (GH-135681) (#135704)
gh-126112: Fix test_os.TimerfdTests: use 10 ms resolution (GH-135681)

Use 10 ms for CLOCK_RES instead of 100 ms to tolerate slow buildbots.
(cherry picked from commit 5c25c884b9)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-06-19 10:06:57 +00:00
Miss Islington (bot)
bc8ed42176
[3.14] gh-133485: Use interpreters.Interpreter in InterpreterPoolExecutor (gh-135695)
Most importantly, this resolves the issues with functions and types defined in __main__.
It also expands the number of supported objects and simplifies the implementation.

(cherry picked from commit 725da50520, AKA gh-133957)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2025-06-19 00:23:12 +00:00
Miss Islington (bot)
c03f94e7fe
[3.14] gh-135450: Remove assertion in _PyCode_CheckNoExternalState (gh-135694)
The assertion reflected a misunderstanding of situations where "hidden" variables might exist,
namely generator expressions and comprehensions.

(cherry picked from commit 15f2bac02c, AKA gh-135466)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-06-18 23:57:18 +00:00