Commit graph

53528 commits

Author SHA1 Message Date
Miss Islington (bot)
2b61f6ac39
[3.13] gh-132316: Require socket and GITHUB_TOKEN env to use GitHubArtifactDatabase (GH-132348) (#132367)
gh-132316: Require `socket` and `GITHUB_TOKEN` env to use `GitHubArtifactDatabase` (GH-132348)
(cherry picked from commit fcf2d07228)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-10 15:15:58 +00:00
Miss Islington (bot)
ce921075e8
[3.13] CI: set correct working directory for Hypothesis cache (GH-119345) (#132364)
CI: set correct working directory for Hypothesis cache (GH-119345)

Set cwd for Hypothesis database
(cherry picked from commit 055c739536)

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
2025-04-10 14:01:51 +00:00
Miss Islington (bot)
6c8d527937
[3.13] gh-130320: gettext: Test fallback translations (GH-130321) (GH-132359)
(cherry picked from commit 4d58c8cb24)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-04-10 12:20:36 +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)
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
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)
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)
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)
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
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)
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)
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
Tomasz Pytel
900dc2b034
[3.13] gh-128632: fix segfault on nested __classdict__ type param (GH-128744) (#132085)
(cherry picked from commit 891c61c1fa)

Co-authored-by: Tomasz Pytel <tompytel@gmail.com>
2025-04-04 08:23:40 -07:00
Miss Islington (bot)
d8986b7f5e
[3.13] gh-130655: Add a test for corrupt .mo files in gettext (GH-131911) (#132079)
gh-130655: Add a test for corrupt `.mo` files in `gettext` (GH-131911)
(cherry picked from commit a126cefc17)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-04-04 16:49:42 +02:00
Miss Islington (bot)
2c05ebd163
[3.13] gh-130655: Add a test for bad magic numbers in .mo files parsed by gettext (GH-131909) (#132077)
gh-130655: Add a test for bad magic numbers in `.mo` files parsed by `gettext` (GH-131909)
(cherry picked from commit 16a6270aa6)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-04-04 16:49:31 +02:00
Miss Islington (bot)
093c587388
[3.13] gh-130655: Add tests for gettext.find() (GH-130691) (#132084)
gh-130655: Add tests for `gettext.find()` (GH-130691)

(cherry picked from commit 3118693a1a)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
2025-04-04 16:39:35 +02:00
Tomas R.
2d909c356f
[3.13] gh-130197: pygettext: Test the --escape option (GH-131902) (GH-132032)
(cherry picked from commit 87d9983994)
2025-04-02 20:30:26 +00:00
Miss Islington (bot)
b1cd14bd05
[3.13] gh-131888: fix ResourceWarning in test_ftplib (GH-131889) (#132009)
gh-131888: fix ResourceWarning in test_ftplib (GH-131889)
(cherry picked from commit b0f77c4d25)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2025-04-02 12:54:21 +00:00
Miss Islington (bot)
57e4f0886d
[3.13] gh-132002: Fix crash of ContextVar on unhashable str subtype (GH-132003) (#132007)
gh-132002: Fix crash of `ContextVar` on unhashable `str` subtype (GH-132003)
(cherry picked from commit ab2a3dda1d)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-02 12:15:44 +00:00
Miss Islington (bot)
05e7fa2c2f
[3.13] gh-131736: only apply security_level workaround in test_ssl for security levels greater than 1 (GH-131739) (#131967)
gh-131736: only apply `security_level` workaround in `test_ssl` for security levels greater than 1 (GH-131739)
(cherry picked from commit 3b3720f1a2)

Co-authored-by: Will Childs-Klein <willck93@gmail.com>
2025-04-01 08:22:28 +00:00
Miss Islington (bot)
d52371c8cd
[3.13] gh-131936: Strengthen check in _suggestions._generate_suggestions (GH-131945) (#131949)
gh-131936: Strengthen check in `_suggestions._generate_suggestions` (GH-131945)
(cherry picked from commit 511d3440a0)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-03-31 17:54:20 +00:00
Miss Islington (bot)
b41c8cc671
[3.13] gh-126033: fix UAF in xml.etree.ElementTree.Element.remove when concurrent mutations happen (GH-126124) (#131929)
gh-126033: fix UAF in `xml.etree.ElementTree.Element.remove` when concurrent mutations happen (GH-126124)
(cherry picked from commit bab1398a47)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-31 14:50:03 +02:00
Bénédikt Tran
588bb6ddf4
[3.13] gh-126037: fix UAF in xml.etree.ElementTree.Element.find* when current mutations happen (#127964) (#131931)
gh-126037: fix UAF in `xml.etree.ElementTree.Element.find*` when concurrent mutations happen (#127964)

We fix a use-after-free in the `find`, `findtext` and `findall` methods of `xml.etree.ElementTree.Element`
objects that can be triggered when the tag to find implements an `__eq__` method that mutates the
element being queried.

(cherry picked from commit c57623c221)
2025-03-31 14:48:42 +02:00
Thomas Grainger
07d4c7e7db
[3.13] gh-128770: raise warnings as errors in test suite - except for test_socket which still logs warnings, and internal test warnings that are now logged (#131802)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
(cherry picked from commit 8a00c9a4d2)
2025-03-29 21:21:33 +02:00
Miss Islington (bot)
5c2c817723
[3.13] gh-131050: skip test_dh_params when TLS library lacks FFDHE ciphersuites (GH-131051) (#131874)
gh-131050: skip `test_dh_params` when TLS library lacks FFDHE ciphersuites (GH-131051)
(cherry picked from commit be2d2181e6)

Co-authored-by: Will Childs-Klein <willck93@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-29 10:54:11 +00:00
Miss Islington (bot)
9ffa80f21e
[3.13] gh-127541: Update os.walk example (GH-127765) (GH-131869)
gh-127541: Update os.walk example (GH-127765)

Update os.walk example to be more modern, skip `__pycache__` dirs rather than `CVS` dirs.
(cherry picked from commit a5949986d6)

Co-authored-by: Totosuki <116938397+totosuki@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-29 06:49:15 +00:00
Miss Islington (bot)
1059b0cc84
[3.13] gh-131807: fix ResourceWarning in test_ucn.py (GH-131808) (#131845)
gh-131807: fix ResourceWarning in test_ucn.py (GH-131808)
(cherry picked from commit adb67ed7e4)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-03-28 19:54:35 +00:00
Miss Islington (bot)
3e45b1fece
[3.13] gh-117174: Adapt test_multiple_statements_fail_early to new REPL behavior (follow-up gh-131065) (GH-131836) (#131841)
gh-117174: Adapt `test_multiple_statements_fail_early` to new REPL behavior (follow-up gh-131065) (GH-131836)

Adapt test to new REPL behavior (follow-up gh-117174)
(cherry picked from commit a6cf8275f8)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2025-03-28 16:51:04 +00:00
Steve Dower
de8bc17c33
gh-131423: Update to OpenSSL 3.0.16. (GH-131839)
The bin tag is 3.0.16.1 because we rebuilt without uplink support to fix gh-131804.
This PR also prevents making calls that are now unsafe without uplink, and updates
the tests to property interpret these failures as unsupported.
2025-03-28 16:28:11 +00:00
Miss Islington (bot)
e460602705
[3.13] gh-117174: Adapt test_multiple_statements_fail_early now that we have always source (GH-131065) (#131850)
gh-117174: Adapt test_multiple_statements_fail_early now that we have always source (GH-131065)
(cherry picked from commit 4192ce17ba)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-03-28 15:39:13 +00:00
Miss Islington (bot)
924a6ceb81
[3.13] gh-127949: fix resource warnings in test_tasks.py (GH-128172) (#131805)
gh-127949: fix resource warnings in `test_tasks.py` (GH-128172)
(cherry picked from commit b66a4ad9fc)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2025-03-28 19:32:03 +05:30
Miss Islington (bot)
8f6a9aa6ae
[3.13] gh-128231: Use runcode() return value for failing early (GH-129488) (#130513)
gh-128231: Use `runcode()` return value for failing early (GH-129488)
(cherry picked from commit 7ed3dc6392)

Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
2025-03-28 13:11:45 +02:00
Miss Islington (bot)
5c0be8ced6
[3.13] gh-131712: Build _suggestions extension on Windows (GH-131759) (#131790)
gh-131712: Build _suggestions extension on Windows (GH-131759)

Add a test checking that the '_suggestions' extension is available.
(cherry picked from commit 9ef9d687ff)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-03-27 09:19:46 +00:00
Brian Schubert
5bcb476df1
[3.13] gh-131649: fix test_string_literals SyntaxWarning (GH-131650) (#131766)
(cherry picked from commit 2d83891dfd)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2025-03-26 17:31:59 +01:00
Miss Islington (bot)
91ae3307ee
[3.13] gh-129900: Fix SystemExit return codes when the REPL is started from the command line (GH-129901) (#131734)
gh-129900: Fix `SystemExit` return codes when the REPL is started from the command line (GH-129901)
(cherry picked from commit 90b82f2b61)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-03-25 20:15:00 +00:00
Miss Islington (bot)
c22eef44d8
[3.13] gh-131677: Fix flaky test_lru_cache_threaded3 (gh-131679) (gh-131692)
The call to `with self.subTest(...)` was not thread-safe.
(cherry picked from commit a123245986)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-03-24 21:05:55 +00:00