Commit graph

5011 commits

Author SHA1 Message Date
John Seong
28b8d5ffcc
gh-133403: Add type annotations to generate_levenshtein_examples.py (#143317)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-18 21:50:17 +03:00
Mark Shannon
cecf564073
GH-146128: Fix AArch64 multi-instruction constants and relocations (GH-148598)
Fix AArch64 multi-instruction constants and relocations

* Elimates rendundant orr xN, xN, 0xffff after 16 or 32 bit loads
* Merges adrp (21rx) and ldr (12) relocations into single 33rx relocation, when safe to do so.
2026-04-16 15:33:09 +01:00
Mark Shannon
600f4dbd54
GH-145668: Add FOR_ITER specialization for virtual iterators. Specialize GET_ITER. (GH-147967)
* Add FOR_ITER_VIRTUAL to specialize FOR_ITER for virtual iterators
* Add GET_ITER_SELF to specialize GET_ITER for iterators (including generators)
* Add GET_ITER_VIRTUAL to specialize GET_ITER for iterables as virtual iterators
* Add new (internal) _tp_iteritem function slot to PyTypeObject
* Put limited RESUME at start of genexpr for free-threading. Fix up exception handling in genexpr
2026-04-16 15:22:22 +01:00
Petr Viktorin
0fcf2b72d3
gh-146636: PEP 803: Reference documentation (GH-148013)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-16 14:17:44 +02:00
Bénédikt Tran
69e0a78e6e
gh-148390: fix undefined behavior of memoryview(...).cast("?") (#148454) 2026-04-15 11:42:20 +00:00
Filipe Laíns
0012686d92
GH-145278: freeze encodings (partially) and linecache (#148347) 2026-04-14 21:01:23 +01:00
Hai Zhu
5ce0fe8b6c
gh-148378: Allow multiple consecutive recording ops per macro op (GH-148496) 2026-04-14 19:26:53 +08:00
Neko Asakura
e02ac1d907
gh-148515: make optimizer_generator respect multiple caches (#148524) 2026-04-14 12:51:05 +08:00
Charlie Lin
10d275fdf8
gh-148483: Use Py_GCC_ATTRIBUTE(unused) for stop_tracing label (GH-148481) 2026-04-13 21:05:34 +08:00
Neko Asakura
5e74d920c8
gh-148285: Allow recording uops after specializing uops (GH-148482) 2026-04-13 20:56:29 +08:00
Neko Asakura
9831dea3bf
gh-148211: decompose _POP_TWO/_POP_CALL(_ONE/_TWO) in JIT (GH-148377) 2026-04-11 20:46:56 +08:00
Neko Asakura
72006a71b2
gh-148211: decompose [_POP_TWO/_INSERT_2]_LOAD_CONST_INLINE_BORROW in JIT (GH-148357) 2026-04-11 18:27:51 +08:00
Neko Asakura
0f49232664
gh-148211: decompose _INSERT_1_LOAD_CONST_INLINE(_BORROW) in JIT (GH-148283) 2026-04-10 00:45:39 +08:00
Stan Ulbrych
ade914bd1d
gh-148286: Fail when new UB is found by CI UBSan (#148168) 2026-04-09 10:30:53 +01:00
Diego Russo
e11315d63b
GH-115802: Remove no-plt for Linux AArch64 (#148238) 2026-04-08 16:34:04 +01:00
Neko Asakura
d2fa4b2b13
gh-148211: decompose _POP_TOP_LOAD_CONST_INLINE(_BORROW) in JIT (GH-148230) 2026-04-08 23:20:31 +08:00
Kumar Aditya
e371ce10cd
gh-95004: specialize access to enums and fix scaling on free-threading (#148184)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-04-07 21:43:50 +05:30
Brandt Bucher
6bb7b33e8f
GH-146128: Remove the buggy AArch64 "33rx" relocation (#146263) 2026-04-07 07:52:59 +03:00
Stan Ulbrych
c43b490ca3
gh-145000: Find correct merge base in reusable-check-html-ids.yml workflow (#147975) 2026-04-04 20:47:11 +01:00
Stan Ulbrych
fe9befc1ca
gh-145883: Fix two heap-buffer-overflows in _zoneinfo (#145885) 2026-04-04 13:29:17 +01:00
Chris Eibl
dea4083aa9
GH-146210: Fix building the jit stencils on Windows when the interpreter is built with a different clang version (#146338)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-04-03 12:42:13 -07:00
Kumar Aditya
8e10bd77ea
gh-146587: fix type slot assignment incase of multiple slots for same name (#146593) 2026-03-30 18:07:38 +05:30
Ken Jin
1384f025f5
gh-126910: Verify that JIT stencils preserve frame pointer (GH-146524) 2026-03-28 03:38:54 +08:00
Diego Russo
6763d26b2b
GH-126910: reserve FP on AArch64 when generating JIT stencils (GH-146520) 2026-03-28 01:51:51 +08:00
Victor Stinner
3364e7e62f
gh-146207: Add support for OpenSSL 4.0.0 alpha1 (#146217)
OpenSSL 4.0.0 alpha1 removed these functions:

* SSLv3_method()
* TLSv1_method()
* TLSv1_1_method()
* TLSv1_2_method()

Other changes:

* Update test_openssl_version().
* Update multissltests.py for OpenSSL 4.
* Add const qualifier to fix compiler warnings.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-25 07:44:47 +01:00
Sam Gross
60093096ba
gh-146041: Avoid lock in sys.intern() for already interned strings (gh-146072)
Fix free-threading scaling bottleneck in sys.intern and `PyObject_SetAttr` by
avoiding the interpreter-wide lock when the string is already interned and
immortalized.
2026-03-24 14:29:37 -04:00
Brandt Bucher
535b09c19d
GH-126910: Allow most native profilers and debuggers to unwind through JIT frames (GH-143548) 2026-03-25 02:09:35 +08:00
Pieter Eendebak
951675c18a
gh-146306: JIT: Optimize float operations by mutating uniquely-referenced operands in place (GH-146307)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:16:02 +08:00
Hood Chatham
c94048be02
gh-146197: Add Emscripten to CI (#146198)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-23 16:34:53 +02:00
Petr Viktorin
91cd2e5806
gh-146175: Soft-deprecate outdated macros; convert internal usage (GH-146178)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-23 12:42:09 +01:00
reiden
e36f8db7e5
gh-143414: Implement unique reference tracking for JIT, optimize unpacking of such tuples (GH-144300)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-03-23 00:57:23 +08:00
Mark Shannon
879c85f6e4
GH-145667: Merge GET_ITER and GET_YIELD_FROM_ITER (GH-146120)
* Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER
2026-03-21 10:48:13 +00:00
Sergey B Kirpichev
52c01864c4
gh-145633: Refine notes on non-IEEE platforms (#145845)
* We don't specify what happens on non-IEEE platforms.
* Use rather PY_LITTLE_ENDIAN to get native endianness.
* Mention that unpack functions don't fail in CPython.
* Mention that PyFloat_Pack8 doesn't fail in CPython.

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-19 11:42:25 +00:00
Sam Gross
e0f7c1097e
gh-145779: Improve classmethod/staticmethod scaling in free-threaded build (#145826)
Add special cases for classmethod and staticmethod descriptors in
_PyObject_GetMethodStackRef() to avoid calling tp_descr_get, which
avoids reference count contention on the bound method and underlying
callable. This improves scaling when calling classmethods and
staticmethods from multiple threads.

Also refactor method_vectorcall in classobject.c into a new _PyObject_VectorcallPrepend() helper so that it can be used by
PyObject_VectorcallMethod as well.
2026-03-17 14:24:44 -04:00
Serhiy Storchaka
99e2c5eccd
gh-144545: Improve handling of default values in Argument Clinic (GH-146016)
* Add the c_init_default attribute which is used to initialize the C variable
  if the default is not explicitly provided.
* Add the c_default_init() method which is used to derive c_default from
  default if c_default is not explicitly provided.
* Explicit c_default and py_default are now almost always have precedence
  over the generated value.
* Add support for bytes literals as default values.
* Improve support for str literals as default values (support non-ASCII
  and non-printable characters and special characters like backslash or quotes).
* Fix support for str and bytes literals containing trigraphs, "/*" and "*/".
* Improve support for default values in converters "char" and "int(accept={str})".
* Converter "int(accept={str})" now requires 1-character string instead of
  integer as default value.
* Add support for non-None default values in converter "Py_buffer": NULL,
  str and bytes literals.
* Improve error handling for invalid default values.
* Rename Null to NullType for consistency.
2026-03-17 12:16:35 +02:00
Hood Chatham
1b118353bb
gh-145176 Move Emscripten files into Platforms/emscripten (#145806)
Moves Emscripten build files into Platforms/emscripten.
2026-03-17 09:39:45 +08:00
dependabot[bot]
ae1b307433
build(deps): bump hypothesis from 6.135.26 to 6.151.9 in /Tools (#145948)
Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.135.26 to 6.151.9.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.135.26...hypothesis-python-6.151.9)

---
updated-dependencies:
- dependency-name: hypothesis
  dependency-version: 6.151.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 19:07:07 +01:00
Brian Schubert
e167e06f8c
Bump mypy to 1.19.1 (#145956) 2026-03-15 12:48:56 +03:00
Stan Ulbrych
e1c224624a
gh-145783: Propagate errors raised in NEW_TYPE_COMMENT (#145784) 2026-03-13 11:05:20 +00:00
Sam Gross
bdf6de8c3f
gh-145685: Avoid contention on TYPE_LOCK in super() lookups (gh-145775) 2026-03-11 07:19:32 -04:00
Hood Chatham
ebb150e76a
gh-145219: Cache Emscripten build dependencies, add install-emscripten (#145664)
Modifies the Emscripten build script to allow for caching of dependencies, and
for automated installation of new EMSDK versions.

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2026-03-11 08:43:27 +08:00
Petr Viktorin
07a39ca07e
gh-145278: Revert "freeze encodings (partially) and linecache (#145279)" (#145689) 2026-03-09 18:18:14 +00:00
Filipe Laíns
3a0c716ad4
GH-145278: freeze encodings (partially) and linecache (#145279) 2026-03-09 13:28:00 +00:00
Chris Eibl
b4460925a4
Fix intermittent test_ci_fuzz_stdlib failures (GH-145641) 2026-03-09 10:23:34 +01:00
Hood Chatham
015613384f
gh-145219: Add Emscripten cross-build and clean configurability (#145581)
Modifies the Emscripten build script to allow for custom cross-build directory
names, and to only clean Emscripten-specific paths (optionally including the
build python).

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2026-03-09 02:25:21 +00:00
Hood Chatham
c3fb0d9d96
gh-145177: Support multiple Emscripten versions for Emscripten buildbot (#145180)
Adds an `--emsdk-cache` argument to the Emscripten build script and an
emscripten_version.txt file. If the `--emsdk-cache` argument is passed, the build script
will look in `emscripten_version.txt` to get the expected emsdk version is installed in
a folder called e.g., 4.0.12 in the directory indicated by the `--emsdk-cache` argument,
and run the build with that Emscripten tooling activated.
2026-03-06 08:42:41 +08:00
Victor Stinner
c8aa8de9a5
gh-141510: Use frozendict in the _opcode_metadata (#144910)
Enhance py_metadata_generator.py to skip duplicates.

Co-authored-by: Donghee Na <donghee.na@python.org>
2026-03-05 12:33:13 +01:00
Victor Stinner
72b3e374a3
gh-141510: Add frozendict support to python-gdb.py (#145511) 2026-03-05 00:57:54 +01:00
Stan Ulbrych
ae208d5665
Fix bugs in compute-changes.py logic for CIFuzz (#145232) 2026-03-04 22:43:44 +02:00
Zachary Ware
c9b96b1e6f
gh-136728: Combine OpenSSL and AWS-LC CI configurations (#144805) 2026-03-01 11:18:23 +02:00