gh-123780: Make test_pkgutil clean up `spam` module (GH-123036)
(cherry picked from commit eca3fe40c2)
Co-authored-by: Malcolm Smith <smith@chaquo.com>
gh-123523: Rework typing documentation for generators and coroutines, and link to it from `collections.abc` docs (GH-123544)
(cherry picked from commit 56e4a417ce)
Co-authored-by: Stanislav Terliakov <50529348+sterliakov@users.noreply.github.com>
gh-123321: Make Parser/myreadline.c locking safe in free-threaded build (GH-123690)
Use a `PyMutex` to avoid the race in mutex initialization. Use relaxed
atomics to avoid the data race on reading `_PyOS_ReadlineTState` when
checking for re-entrant calls.
(cherry picked from commit 0c080d7c77)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This switches the main pyrepl event loop to always be non-blocking so that it
can listen to incoming interruptions from other threads.
This also resolves invalid display of exceptions from other threads
(gh-123178).
This also fixes freezes with pasting and an active input hook.
(cherry picked from commit 033510e11d)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Change <page up> and <page down> keys of the Python REPL to history
search forward/backward.
(cherry picked from commit 8311b11800)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Ensure clang++ is autodetected on iOS. (gh-123749)
(cherry picked from commit d359c7c47b)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
gh-123275: Add tests for `PYTHON_GIL=1` and `-Xgil=1` (gh-123754)
(cherry picked from commit fe24b718d2)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
gh-123275: Support `-Xgil=1` and `PYTHON_GIL=1` on non-free-threaded builds (gh-123276)
(cherry picked from commit 84ad264ce6)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
gh-123418: Update Android build to use OpenSSL 3.0.15 (GH-123685)
(cherry picked from commit 1fdfce9452)
Co-authored-by: Zachary Ware <zach@python.org>
gh-118508: Clarify which characters are matched by `\s` (GH-119155)
Clarify re syntax
(cherry picked from commit 22fdb8cf89)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Remove EOL 1.1.1w from CI and move it to the 'old' set in multissltests,
add latest 3.3.2 to both CI and multissltests.
(cherry picked from commit d83e30cadd)
Co-authored-by: Zachary Ware <zach@python.org>
Also adds openssl/openssl GitHub URL template for newer OpenSSL downloads
(cherry picked from commit 56b00f4705)
Co-authored-by: Zachary Ware <zach@python.org>
gh-123321: Fix Parser/myreadline.c to prevent a segfault during a multi-threaded race (GH-123323)
(cherry picked from commit a4562fedad)
Co-authored-by: Bar Harel <bharel@barharel.com>
Add shims for iOS C++ compilation (GH-123620)
Add shims for iOS C++ compilation.
(cherry picked from commit 135dad9bd7)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
gh-121804: always show error location for SyntaxError's in basic repl (GH-123202)
(cherry picked from commit 6822cb23c6)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Switch more _Py_IsImmortal(...) assertions to _Py_IsImmortalLoose(...)
The remaining calls to _Py_IsImmortal are in free-threaded-only code,
initialization of core objects, tests, and guards that fall back to
code that works with mortal objects.
(cherry picked from commit 57c471a688)
gh-123409: fix `IPv6Address.reverse_pointer` for IPv4-mapped addresses (GH-123419)
Fix functionality that was broken with better textual representation for IPv4-mapped addresses (gh-87799)
(cherry picked from commit 77a2fb4bf1)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
gh-123458: Skip SBOM generation if no git repository is detected (GH-123507)
(cherry picked from commit db42934270)
Co-authored-by: Seth Michael Larson <seth@python.org>
gh-101525: Skip test_gdb if the binary is relocated by BOLT. (gh-118572)
(cherry picked from commit f95fc4de11)
Co-authored-by: Donghee Na <donghee.na@python.org>
gh-123091: Use _Py_IsImmortalLoose() (#123511)
Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c
and ceval.c.
(cherry picked from commit f1a0d96f41)
gh-116263: Do not rollover empty files in RotatingFileHandler (GH-122788)
(cherry picked from commit 6094c6fc2f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-123570: Add link to `weakref.ref` from `weakref_slot` docs in `dataclasses` (GH-123571)
(cherry picked from commit c3ed775899)
Co-authored-by: sobolevn <mail@sobolevn.me>