Commit graph

124091 commits

Author SHA1 Message Date
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
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
Miss Islington (bot)
0c0ffbe39f
[3.13] gh-132075: Fix possible use of sockaddr structures with uninitialized members (GH-132076) (GH-132086)
Now all structure members are initialized with zeroes by default.
(cherry picked from commit 345baa77ba)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-04 14:33:57 +00:00
Miss Islington (bot)
d30052a4ed
gh-131423: Update OpenSSL build tag to 3.0.16.2 to fix ARM64 crash (GH-132051)
(cherry picked from commit 24decb05dd)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-04-03 18:16:21 +00: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)
75d453b0ab
[3.13] gh-131544: Update docs for PyType_AddWatcher (gh-132015) (gh-132019)
gh-131544: Update docs for PyType_AddWatcher (gh-132015)
(cherry picked from commit 25275bda79)

Co-authored-by: Donghee Na <donghee.na@python.org>
2025-04-03 01:24:43 +09: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
Malcolm Smith
24bee4e5cf
[3.13] Backport miscellaneous Android testbed changes (#131985)
Backport miscellaneous Android testbed changes from #125946, but without the
Android API version bump.
2025-04-02 08:11:57 +08:00
Victor Stinner
c318a03b17
[3.13] gh-111178: Fix getsockaddrarg() undefined behavior (#131668) (#131977)
gh-111178: Fix getsockaddrarg() undefined behavior (#131668)

Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.

On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.

(cherry picked from commit 8cd29c2b53)
2025-04-01 14:40:00 +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)
6ec9c753c7
[3.13] Minor improvements to the programming FAQ (GH-127261) (#131964)
Minor improvements to the programming FAQ (GH-127261)
(cherry picked from commit 23a658b9af)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-01 07:25:40 +00:00
Miss Islington (bot)
2745984d13
[3.13] gh-125957: sync argument naming in sphinx docs of the cmath and help() (GH-125958) (#131962)
gh-125957: sync argument naming in sphinx docs of the cmath and help() (GH-125958)
(cherry picked from commit 0a3eb8855c)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-01 07:22:29 +00:00
Miss Islington (bot)
38943bef25
[3.13] gh-131531: Add android.py package command (GH-131532) (#131960)
Adds a `package` entry point to the `android.py` build script to support
creating an Android distribution artefact.
(cherry picked from commit fe5c4c53e7)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-04-01 10:05:39 +08:00
Miss Islington (bot)
67087d9327
[3.13] gh-129917: Update installers to use SQLite 3.49.1 (GH-131025) (#131957)
gh-129917: Update installers to use SQLite 3.49.1 (GH-131025)

(cherry picked from commit 45a3ab5a81)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Ned Deily <nad@python.org>
2025-03-31 21:37:14 +00:00
Miss Islington (bot)
4913b6f944
[3.13] gh-131675: Fix mi_atomic_yield in mimalloc on 32-bit ARM (gh-131784) (gh-131954)
Use the standard `__ARM_ARCH` macro, which is supported by GCC and Clang.

The branching logic for of `__ARMEL__` has been removed so if the target
architecture supports v7+ instructions, a yield is emitted, otherwise a nop
is emitted. This covers both big and little endian scenarios.
(cherry picked from commit 03f6c8e239)

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Co-authored-by: Vincent Fazio <vfazio@gmail.com>
2025-03-31 14:58:29 -04:00
Miss Islington (bot)
29b958a36b
[3.13] gh-131865: Properly apply exported CFLAGS for dtrace/systemtap builds (GH-131866) (#131950)
gh-131865: Properly apply exported CFLAGS for dtrace/systemtap builds (GH-131866)

When using --with-dtrace the resulting object file could be missing
specific CFLAGS exported by the build system due to the systemtap
script using specific defaults.

Exporting the CC and CFLAGS variables before the dtrace invocation
allows us to properly apply CFLAGS exported by the build system
even when cross-compiling.

The fix does not affect the dtrace invocation on Solaris/macOS.
(cherry picked from commit 0cd4befb02)

Co-authored-by: stratakis <cstratak@redhat.com>
2025-03-31 20:15:45 +02: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
Miss Islington (bot)
19187991a8
[3.13] gh-129994: update docs when using dualstack_ipv6 in socket.create_server (GH-129996) (#131890)
gh-129994: update docs when using `dualstack_ipv6` in `socket.create_server` (GH-129996)
(cherry picked from commit 044a1e13d5)

Co-authored-by: Alexander Ershov <150328014+AEErshov@users.noreply.github.com>
2025-03-30 12:07:08 +02:00
Miss Islington (bot)
2570896ad7
[3.13] gh-131885: Document that dict.setdefault and dict.get take no keyword arguments (GH-128208) (#131893)
gh-131885: Document that `dict.setdefault` and `dict.get` take no keyword arguments (GH-128208)
(cherry picked from commit edfbd8c062)

Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
2025-03-30 09:28:49 +00: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)
7f7fc549b4
[3.13] gh-118518: Minor improvements to perf docs (GH-130866) (#131059)
gh-118518: Minor improvements to perf docs (GH-130866)

Minor improvements to perf docs
(cherry picked from commit ecdf6b15b0)

Co-authored-by: stratakis <cstratak@redhat.com>
2025-03-28 11:42:58 +00:00
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)
2ccb84a871
[3.13] gh-128446: Run Windows CI tests on each commit (GH-131702) (#131705)
gh-128446: Run Windows CI tests on each commit (GH-131702)
(cherry picked from commit 7d9442f0d5)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-03-28 13:08:18 +02:00
Miss Islington (bot)
5547c895e2
[3.13] gh-131818: Add imply -P in -I's help message (GH-131819) (#131822)
gh-131818: Add imply `-P` in `-I`'s help message (GH-131819)
(cherry picked from commit 8bd88e2827)

Co-authored-by: Hang <bebound@gmail.com>
2025-03-28 08:13:00 +00:00
Miss Islington (bot)
9118cf77ae
[3.13] Fix typo in importlib.metadata.rst (gh-131596) (#131630)
Fix typo in importlib.metadata.rst (gh-131596)
(cherry picked from commit 5fc889ffbf)

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
2025-03-27 15:42:47 +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