1723 Commits
Author SHA1 Message Date
db34557ea0 [3.14] gh-158876: Update bundled Expat to 2.9.0 (GH-158881) (#159920)
(cherry picked from commit 0071fb5111)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-10-20 18:39:19 +00:00
Victor StinnerandStan Ulbrych 1de946cf6a [3.14] gh-158445: Add C API tests on build information functions (#159515) (#159525)
[3.15] gh-158445: Add C API tests on build information functions (#159515)

* gh-158445: Add C API tests on build information functions (#158603)

Add tests on functions:

* Py_GetBuildInfo()
* Py_GetCompiler()
* Py_GetCopyright()
* Py_GetPlatform()
* Py_GetVersion()

Changes:

* Add Modules/_testlimitedcapi.c and
  Lib/test/test_capi/test_build.py files.
* Add internal _Py_GetBuiltWithAssert() function.
* Reimplemenet support.built_with_c_assertions() using
  _Py_GetBuiltWithAssert() to cover more cases like buildbots using
  CFLAGS=-UNDEBUG in release mode.

(cherry picked from commit a831abba14)

* gh-155742: Add support.built_with_c_assertions() (#156776)


(cherry picked from commit c700121b15)

---------


(cherry picked from commit cb7a629f4d)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-10-16 12:03:56 +00:00
Miss Islington (bot)andWulian233 3ef92a272f [3.14] gh-159113: Update PCBuild/find_python.bat to allow discovery of Python 3.14 and 3.15 (GH-159114) (#159249)
gh-159113: Update `PCBuild/find_python.bat` to allow discovery of Python 3.14 and 3.15 (GH-159114)
(cherry picked from commit 9c15cc9d69)

Co-authored-by: Wulian233 <1055917385@qq.com>
2026-10-12 23:17:59 +02:00
Victor Stinner d9dde70e48 [3.14] gh-155503: Add more PyType C API tests (#155505) (#159085) (#159089)
[3.15] gh-155503: Add more PyType C API tests (#155505) (#159085)

gh-155503: Add more PyType C API tests (#155505)

Add tests on functions:

* PyType_ClearCache()
* PyType_GetFlags()
* PyType_IsSubtype()
* PyType_Ready()

Move PyType limited C API tests from _testcapi to _testlimitedcapi.
Add a new Modules/_testlimitedcapi/type.c file.

(cherry picked from commit 29837a952c)
(cherry picked from commit 18c00673aa)
2026-10-09 22:11:41 +00:00
Miss Islington (bot)andChris Eibl 6490ca6f03 [3.14] gh-157789: Use compiler option `-Og` in case of clang-cl debug builds (GH-157791) (#158921)
Use compiler option ``-Og`` in case of clang-cl debug builds on Windows to reduce stack usage.
(cherry picked from commit 9028df36bb)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2026-10-07 07:35:16 +02:00
Miss Islington (bot)andZachary Ware 81c40fa12e [3.14] gh-158010: Update Windows builds to use OpenSSL 3.5.9 (GH-158437)
(cherry picked from commit 115c297fdc)

Co-authored-by: Zachary Ware <zach@python.org>
2026-09-29 16:54:10 +00:00
fe0482ab8a [3.14] gh-158102: Add tests for the slice C API (GH-158120) (GH-158292)
Test PySlice_Check(), PySlice_New(), PySlice_GetIndices(), PySlice_Unpack(),
PySlice_AdjustIndices() and PySlice_GetIndicesEx() -- both the macro and the
deprecated function.

Document the length and step precondition of PySlice_AdjustIndices()
(cherry picked from commit 8c056c33aa)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-09-29 15:39:19 +03:00
Chris EiblandSteve Dower 390f3d3106 [3.14] gh-153668: Temporarily disable unicodectype.c optimization on WinARM64 due to compiler bug (GH-153669) (#158221)
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
(cherry picked from commit 9ea05d4b8f)

# Conflicts:
#	PCbuild/pythoncore.vcxproj

* dummy edit to trigger MSI CI

* dummy edit, 2nd attempt

* remove dummy edit

---------

Co-authored-by: Steve Dower <steve.dower@python.org>
2026-09-26 16:24:01 +03:00
2649b3760c [3.14] GH-144679: When building with VS 2026 on Windows, use PlatformToolset v145 by default (GH-144680) (#158188)
* GH-144679: When building with VS 2026 on Windows, use PlatformToolset v145 by default (GH-144680)
(cherry picked from commit c06f4f4301)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>

* Silence experimental coroutine deprecation warnings (#150788)

Co-authored-by: Zachary Ware <zach@python.org>
(cherry picked from commit 7241db1169)

---------

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
2026-09-25 20:10:12 +00:00
Miss Islington (bot)andStan Ulbrych 5659aee18f [3.14] gh-157953: Update bundled Expat to 2.8.5 (GH-157957) (#157996)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-09-23 14:12:56 +00:00
Miss Islington (bot)andZachary Ware 0267ee68bb [3.14] gh-156369: Update Windows builds to OpenSSL 3.5.8 (GH-156531)
(cherry picked from commit b7ce9c3f1a)

Co-authored-by: Zachary Ware <zach@python.org>
2026-08-28 12:05:35 -05:00
29a9a3d8ce [3.14] gh-124111: Update Windows build to use Tcl/Tk 9.0.4 (GH-150102) (GH-149477) (GH-151562) (GH-153901) (#150197)
Co-authored-by: Steve Dower <steve.dower@python.org>
Co-authored-by: Jonathan J. Helmus <jjhelmus@gmail.com>
2026-08-03 13:10:34 +03:00
Serhiy StorchakaandClaude Fable 5 ffa3ba98d9 [3.14] gh-76595: Add tests for PyCapsule_Import() (GH-154588) (GH-154620)
Add _testcapi helpers to create a capsule with an arbitrary name and to call PyCapsule_Import(), and Python tests covering the current behavior: only the first component of the dotted name is imported, the rest are attribute lookups.

(cherry picked from commit d24d9d0f1d)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 15:34:10 +00:00
Miss Islington (bot)andStan Ulbrych 6f931c9609 [3.14] gh-152216: Update bundled expat to 2.8.2 (GH-152234) (#153525)
gh-152216: Update bundled expat to 2.8.2 (GH-152234)

* Update bundled expat to 2.8.2
* `make regen-sbom`
* Update download URL
* Drop warnings (yay!)
(cherry picked from commit c22e9c9dae)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-07-10 19:10:09 +00:00
Miss Islington (bot)andHarjoth Khara 8c5f13c8e0 [3.14] gh-153438: Update NuGet download URL (GH-153482) (GH-153510)
gh-153438: Update NuGet download URL (GH-153482)
(cherry picked from commit 106eb532ea)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
2026-07-10 13:36:38 +01:00
Victor Stinner 6374772d8c [3.14] gh-152132: Test Py_CompileString() in test_capi.test_run (#153470) (#153473)
gh-152132: Test Py_CompileString() in test_capi.test_run (#153470)

PyRun functions now raises ValueError if the start argument is
invalid.

Add Modules/_testlimitedcapi/run.c.

(cherry picked from commit d83d26724b)
2026-07-10 02:08:14 +00:00
Miss Islington (bot)andBart van der Braak 7d5970be86 [3.14] gh-152919: Ensure nuget.org source exist before python install (GH-152919)
(cherry picked from commit 8c35afa221)

Co-authored-by: Bart van der Braak <bartvdbraak@gmail.com>
2026-07-03 08:53:44 +00:00
Zachary Ware 49d78123b7 [3.14] gh-151159: Update Windows builds to use OpenSSL 3.5.7 (GH-151190)
(cherry picked from commit 6688b0c715)
2026-06-09 17:49:34 +00:00
Serhiy Storchaka cb96d5ea4a [3.14] gh-151130: Add more tests for PyWeakref_* C API (GH-151131) (GH-151141)
(cherry picked from commit c3cd75afdf)
2026-06-09 11:45:18 +00:00
Zachary Ware 63c578a733 [3.14] gh-149254: Update Windows builds to OpenSSL 3.5.6 (GH-149329) 2026-05-16 15:51:23 -05:00
Zachary Ware 487ebb478a [3.14] gh-149254: Update Windows builds to OpenSSL 3.0.20 (GH-149327) 2026-05-03 15:04:51 -05:00
Zachary Ware a7f06e3840 [3.14] gh-144551: Update Windows builds to use OpenSSL 3.0.19 (GH-144797)
(cherry picked from commit 928602c0ac)
2026-02-13 19:38:31 +00:00
Miss Islington (bot)andChris Eibl 3d448061a1 [3.14] GH-141808: Do not generate the jit stencils twice in case of PGO builds on Windows. (GH-142043) (#142100)
GH-141808: Do not generate the jit stencils twice in case of PGO builds on Windows. (GH-142043)

* do not build the jit stencils twice in case of PGO builds on Windows

* blurb it
(cherry picked from commit f2ca1581ca)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-11-29 21:09:19 +00:00
Miss Islington (bot)andWulian233 f10dc2666c gh-139769: Update PCBuild/find_python.bat to allow discovery of Python 3.14 (GH-139770)
Enable 3.14 py.exe can be use on PCBuild
(cherry picked from commit 570d17259f)

Co-authored-by: Wulian233 <1055917385@qq.com>
2025-10-08 15:26:22 +00:00
d8898e1fbe Adds support for building with VisualStudioVersion = 18.0 (GH-138980)
(cherry picked from commit 6920fa4bcd)

Co-authored-by: Steve Dower <steve.dower@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-08 16:13:13 +01:00
Miss Islington (bot)andZachary Ware a450151642 [3.14] gh-139573: Update Windows builds to use OpenSSL 3.0.18 (GH-139574) (#139586)
gh-139573: Update Windows builds to use OpenSSL 3.0.18 (GH-139574)
(cherry picked from commit 063cef9999)

Co-authored-by: Zachary Ware <zach@python.org>
2025-10-05 08:00:29 +03:00
9b8826b2c7 [3.14] gh-137134: Update SQLite to 3.50.4 for binary releases (GH-137135) (#137436)
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ned Deily <nad@python.org>
2025-08-06 15:45:54 +03:00
Miss Islington (bot)andPeter Bierma ecd97caaf5 [3.14] gh-136421: Load _datetime static types during interpreter initialization (GH-136583) (GH-136943)
gh-136421: Load `_datetime` static types during interpreter initialization (GH-136583)

`_datetime` is a special module, because it's the only non-builtin C extension that contains static types. As such, it would initialize static types in the module's execution function, which can run concurrently. Since static type initialization is not thread-safe, this caused crashes. This fixes it by moving the initialization of `_datetime`'s static types to interpreter startup (where all other static types are initialized), which is already properly protected through other locks.
(cherry picked from commit a10960699a)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-07-21 19:23:05 -04:00
Bénédikt Tran 70280953d2 [3.14] gh-135755: rename undocumented HACL_CAN_COMPILE_SIMD{128,256} macros (GH-135847) (#136045)
Rename undocumented `HACL_CAN_COMPILE_SIMD{128,256}` macros
to `_Py_HACL_CAN_COMPILE_VEC{128,256}`. These macros are private.
(cherry picked from commit 1e975aee28)
2025-06-28 10:05:58 +02:00
Miss Islington (bot)andEmma Smith 91d9e9e64e [3.14] gh-134262: Catch both URLError and ConnectionError in retries (GH-135365) (#135611)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-06-17 12:16:17 +00:00
941011374a [3.14] gh-119132: Remove "experimental" tag from the CPython free-threading. (gh-135550) (gh-135565)
---------
(cherry picked from commit f079979599)

Co-authored-by: Donghee Na <donghee.na@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
2025-06-16 14:58:14 +00:00
Miss Islington (bot)andChris Eibl dba307a757 [3.14] GH-135287: clang-cl PGO builds on Windows fail with could not open '/GENPROFILE' (GH-135289)
GH-135287: clang-cl PGO builds on Windows fail with `could not open '/GENPROFILE'` (GH-135289)
(cherry picked from commit 0045100ccb)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-06-09 12:18:51 +00:00
Miss Islington (bot)andSteve Dower 32574d4bc0 gh-134923: Use /GENPROFILE and /USEPROFILE for Windows PGO builds (GH-134924)
(cherry picked from commit 8865b4f95b)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-05-30 19:04:47 +00:00
Miss Islington (bot)andEmma Smith 34b451532b [3.14] gh-134262: Add retries to downloads in PCbuild\get_external.py (GH-134865)
(cherry picked from commit e9d845b41d)

Includes fix for off-by-one error from GH-134867
(cherry-picked from commit e64395e8eb)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-05-28 23:47:26 +00:00
Miss Islington (bot) 6ce2045139 [3.14] GH-133779: Fix finding pyconfig.h on Windows JIT builds (GH-134359)
(cherry picked from commit 7ad90463df)
2025-05-20 13:22:24 -04:00
Steve Dower 7686c752b3 [3.14] gh-133779: Revert Windows generation of pyconfig.h and go back to a static header. (GH-133966)
Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds.
This was usually the case already, but this change guarantees it in all circumstances.
2025-05-19 21:24:53 +01:00
Miss Islington (bot)andAdam Turner f7c441cc82 [3.14] gh-132983: Reduce the size of `_zstdmodule.h` (GH-133793) (#133854)
gh-132983: Reduce the size of ``_zstdmodule.h`` (GH-133793)
(cherry picked from commit 1a548c0a50)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-10 21:51:11 +00:00
Adam Turner e6f8e0a035 GH-132983: Build `_zstd` on Windows (#133366) 2025-05-06 00:58:47 +01:00
Adam Turner 3f80165a26 GH-91048: Minor fixes for `_remotedebugging & rename to _remote_debugging` (#133398) 2025-05-05 02:30:14 +02:00
Adam Turner 40be123499 Regenerate pcbuild.sln in Visual Studio 2022 (#133394)
* Regenerate pcbuild.sln in Visual Studio 2022
* Move _remotedebugging to the end
2025-05-04 21:10:19 +01:00
Yan Yanchii 0a1fedb70b gh-126835: Rename ast_opt.c to ast_preprocess.c and related stuff after moving const folding to the peephole optimizier (#131830) 2025-05-04 21:07:35 +03:00
Pablo Galindo Salgado 2bc8365231 GH-91048: Add utils for printing the call stack for asyncio tasks (#133284) 2025-05-04 00:51:57 +00:00
Brandt Bucher bfcbb28223 GH-113464: Get LLVM from cpython-bin-deps on Windows (GH-133278) 2025-05-02 11:17:15 -07:00
Brandt Bucher 2da48e32f6 GH-133171: Prevent combinations of --disable-gil and --enable-experimental-jit... for now (GH-133179) 2025-05-02 09:26:03 -07:00
60202609a2 gh-132661: Implement PEP 750 (#132662)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Wingy <git@wingysam.xyz>
Co-authored-by: Koudai Aono <koxudaxi@gmail.com>
Co-authored-by: Dave Peck <davepeck@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Paul Everitt <pauleveritt@me.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-30 11:46:41 +02:00
Wulian233 995b1a72f2 Fixed a typo in the PCbuild/readme.txt about PGO clang-cl (#133083)
Fixed a typo in the readme.txt section about PGO clang-cl
2025-04-28 13:39:16 +00:00
Pablo Galindo Salgado e8cf3a1a64 gh-91048: Refactor _testexternalinspection and add Windows support (#132852) 2025-04-25 14:12:16 +01:00
Sergey B Kirpichev 79f7c67bf6 gh-128813: hide mixed-mode functions for complex arithmetic from C-API (#131703) 2025-04-22 14:18:18 +02:00
Chris Eibl e5f68fd29b GH-131296: Suppress "unused label" warning for clang-cl closer to actual occurrence (GH-131900) 2025-04-10 23:17:33 +01:00
Neil SchemenauerandKumar Aditya d687900f98 gh-128384: Use a context variable for warnings.catch_warnings (gh-130010)
Make `warnings.catch_warnings()` use a context variable for holding
the warning filtering state if the `sys.flags.context_aware_warnings`
flag is set to true.  This makes using the context manager thread-safe in
multi-threaded programs.

Add the `sys.flags.thread_inherit_context` flag.  If true, starting a new
thread with `threading.Thread` will use a copy of the context
from the caller of `Thread.start()`.

Both these flags are set to true by default for the free-threaded build
and false for the default build.

Move the Python implementation of warnings.py into _py_warnings.py.

Make _contextvars a builtin module.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-04-09 16:18:54 -07:00