Skip to content

[3.14] GH-136895: Update JIT builds to use LLVM 21 (GH-140329)#146419

Closed
mcepl wants to merge 2122 commits intopython:mainfrom
openSUSE-Python:3.14-llvm21-compat
Closed

[3.14] GH-136895: Update JIT builds to use LLVM 21 (GH-140329)#146419
mcepl wants to merge 2122 commits intopython:mainfrom
openSUSE-Python:3.14-llvm21-compat

Conversation

@mcepl
Copy link
Contributor

@mcepl mcepl commented Mar 25, 2026

Backport of GH-140329 to 3.14, with the addition of:

  • JIT: harden LLVM 20 upgrade with defensive improvements
  • Enable x86_64 trampoline support on all x86_64 platforms, not just
    macOS. While currently only macOS emits X86_64_RELOC_BRANCH
    relocations, this ensures the trampoline infrastructure is ready if
    future LLVM changes produce out-of-range calls on other x86_64
    platforms.

  • Add error handling to extract_tarball() in get_external.py so that
    corrupted or incomplete downloads produce a clear error message
    instead of an opaque traceback.

  • Replace hardcoded LLVM version check in get_externals.bat with
    a prefix-based 'llvm-' match using findstr, so future LLVM version
    bumps only require changing the version string in one place.

Also, bump the JIT toolchain from LLVM 20 to LLVM 21 (21.1.8). Updated across
CI workflows, build scripts, documentation, and the externals tag.

miss-islington and others added 30 commits February 7, 2026 13:31
…r `asyncio.Timeout` (pythonGH-144449) (python#144565)

pythongh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (pythonGH-144449)
(cherry picked from commit 0e7c06a)

Co-authored-by: kovan <xaum.io@gmail.com>
…ue value (pythonGH-144568) (python#144579)

pythongh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (pythonGH-144568)
(cherry picked from commit 9349972)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
pythonGH-144574) (python#144588)

For `enum.bin`, update versionadded directive from 3.10 to 3.11 (pythonGH-144574)
(cherry picked from commit d736349)

Co-authored-by: Guo Ci <zguoci@gmail.com>
… (python#144609)

pythongh-106318: Add example for str.isalnum() (pythonGH-137550)
(cherry picked from commit 3dd7a3c)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
…onGH-142823) (python#144611)

pythongh-106318: Add examples for str.partition() method (pythonGH-142823)
(cherry picked from commit 432ddd9)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
…4365) (pythonGH-144499)

(cherry picked from commit d5cb9f6)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
…elegation (pythonGH-144622) (pythonGH-144624)

This was done in pythonGH-119743 (3.14).
(cherry picked from commit aa6ed80)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
…line (pythonGH-134180) (python#144631)

pythongh-134179: Use sys._clear_internal_caches() at test_cmd_line (pythonGH-134180)

Use sys._clear_internal_caches() instead of deprecated sys._clear_type_cache() at test_cmd_line.
(cherry picked from commit dd2da42)

Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
…able-{macos, wasi}.yml` (pythonGH-144518) (python#144635)

pythongh-144492: Fix `process_changed_files` outputs for `reusable-{macos, wasi}.yml` (pythonGH-144518)

Fix `process_changed_files` double-processing reusable-{macos, wasi] ending up with incorrect outputs
(cherry picked from commit fd190d1)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
) (python#144641)

(cherry picked from commit 80ba4e1)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
…gnal_name() (pythonGH-144653) (python#144658)

pythongh-144652: Support Windows exit status in support get_signal_name() (pythonGH-144653)

Format Windows exit status as hexadecimal.
(cherry picked from commit b121dc4)

Co-authored-by: Victor Stinner <vstinner@python.org>
…oupby (pythonGH-143738) (pythonGH-144626)

(cherry picked from commit a91b5c3)

Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
) (python#144663)

Clarify the docs for `args` in asyncio callbacks (pythonGH-143873)
(cherry picked from commit 40a82ab)

Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Ken Jin <kenjin@python.org>
…function (pythonGH-144630) (python#144670)

pythongh-144629: Add test for the PyFunction_GetAnnotations() function (pythonGH-144630)
(cherry picked from commit cc81707)

Co-authored-by: Nybblista <170842536+nybblista@users.noreply.github.com>
(cherry picked from commit e682141)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
python#144683)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
…144678)

Backport changes from the main branch.

Test also datetime.h in test_cppext.
pythonGH-143651) (python#144662)

pythongh-143650: Fix importlib race condition on import failure (pythonGH-143651)

Fix a race condition where a thread could receive a partially-initialized
module when another thread's import fails. The race occurs when:

1. Thread 1 starts importing, adds module to sys.modules
2. Thread 2 sees the module in sys.modules via the fast path
3. Thread 1's import fails, removes module from sys.modules
4. Thread 2 returns a stale module reference not in sys.modules

The fix adds verification after the "skip lock" optimization in both Python
and C code paths to check if the module is still in sys.modules. If the
module was removed (due to import failure), we retry the import so the
caller receives the actual exception from the import failure rather than
a stale module reference.
(cherry picked from commit ac8b5b6)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
) (python#144699)

pythongh-106318: Improve str.rstrip() method doc (pythonGH-143893)
(cherry picked from commit 936d60d)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
…H-144548) (python#144704)

pythongh-142518: Define lock-free and per-object lock (pythonGH-144548)

- Add definitions of lock-free and per-object lock to the glossary
- Cross-reference these from list thread safety notes
- Change admonition to rubric
(cherry picked from commit 12dbae4)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
…rations (pythonGH-144184) (python#144708)

* Address feedback; move thread safety section below see-also
* Address feedback - don't mention equality comparison only
* Change admonition to rubric; cross-reference glossary

---------
(cherry picked from commit 35dc547)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
…pythonGH-144656) (python#144710)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
…19457) (pythonGH-144731)

This was causing ucd_3_2_0.numeric() to pick up only decimal
changes between Unicode 3.2.0 and the current version.
(cherry picked from commit 3e0322f)

Co-authored-by: William Meehan <wmeehan@fb.com>
…strptime` (pythonGH-131049) (pythonGH-144735)

(cherry picked from commit 2e3e76e)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
…scapes (pythonGH-107281) (pythonGH-144753)

Lookup for CJK ideograms and Hangul syllables is now case-insensitive,
as is the case for other character names.
(cherry picked from commit e66f4a5)

Co-authored-by: James <snoopjedi@gmail.com>
… within signal handlers (pythonGH-144736) (pythonGH-144767)

pythongh-144706: Warn against using synchronization primitives within signal handlers (pythonGH-144736)
(cherry picked from commit 945bf8c)

Co-authored-by: Robsdedude <dev@rouvenbauer.de>
@mcepl
Copy link
Contributor Author

mcepl commented Mar 25, 2026

wrong base, duplicate of GH-146420

@mcepl mcepl closed this Mar 25, 2026
@hugovk hugovk removed request for a team and berkerpeksag March 25, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.