Commit graph

1698 commits

Author SHA1 Message Date
Bénédikt Tran
1e975aee28
gh-135755: rename undocumented HACL_CAN_COMPILE_SIMD{128,256} macros (#135847)
Rename undocumented `HACL_CAN_COMPILE_SIMD{128,256}` macros
to `_Py_HACL_CAN_COMPILE_VEC{128,256}`. These macros are private.
2025-06-27 17:12:21 +02:00
Emma Smith
acc20a83f4
gh-134262: Catch both URLError and ConnectionError in retries (#135365) 2025-06-17 14:51:23 +03:00
Donghee Na
f079979599
gh-119132: Remove "experimental" tag from the CPython free-threading. (gh-135550)
* gh-119132: Remove "experimental" tag from the CPython free-threading build

* Address code review

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

* Add NEWS.d

* Regen configure.ac

* Update doc

* Update

* Update

* Update

* Update Doc/howto/free-threading-python.rst

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

* Update ctypes.rst

* Update

* Update Doc/howto/free-threading-python.rst

Co-authored-by: T. Wouters <thomas@python.org>

* Apply suggestions from code review

Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

---------

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 23:32:52 +09:00
Chris Eibl
0045100ccb
GH-135287: clang-cl PGO builds on Windows fail with could not open '/GENPROFILE' (GH-135289) 2025-06-09 12:52:38 +01:00
Steve Dower
8865b4f95b
gh-134923: Use /GENPROFILE and /USEPROFILE for Windows PGO builds (GH-134924) 2025-05-30 19:37:29 +01:00
Emma Smith
e64395e8eb
gh-134262: Fix off by one errors in download retry functions (GH-134867) 2025-05-28 18:15:39 -05:00
Emma Smith
e9d845b41d
gh-134262: Add retries to downloads in PCbuild\get_external.py (GH-134820) 2025-05-28 22:18:34 +01:00
Brandt Bucher
7ad90463df
GH-133779: Fix finding pyconfig.h on Windows JIT builds (GH-134349) 2025-05-20 12:32:26 -04:00
Steve Dower
986c367028
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 11:35:22 +01:00
Adam Turner
1a548c0a50
gh-132983: Reduce the size of `_zstdmodule.h` (#133793) 2025-05-10 22:25:22 +01:00
Adam Turner
8bb92863de
Update the PCbuild sub-projects list (GH-133397) 2025-05-08 12:31:24 +01:00
Hugo van Kemenade
9748fb3867 Python 3.15.0a0 2025-05-07 18:47:42 +03: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
Lysandros Nikolaou
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 Schemenauer
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
Adam Turner
231a50fa9a
gh-109599: Expose CapsuleType via the _types module (#131969) 2025-04-04 23:37:41 +01:00
Bénédikt Tran
0a97427ee5
gh-99108: Implement HACL* HMAC (#130157)
A new extension module, `_hmac`, now exposes the HACL* HMAC (formally verified) implementation.

The HACL* implementation is used as a fallback implementation when the OpenSSL implementation of HMAC
is not available or disabled. For now, only named hash algorithms are recognized and SIMD support provided
by HACL* for the BLAKE2 hash functions is not yet used.
2025-04-04 19:04:00 +02:00
Steve Dower
24decb05dd
gh-131423: Update OpenSSL build tag to 3.0.16.2 to fix ARM64 crash (GH-132051) 2025-04-03 17:35:21 +01:00
Pablo Galindo Salgado
943cc1431e
gh-131591: Implement PEP 768 (#131937)
Co-authored-by: Ivona Stojanovic <stojanovic.i@hotmail.com>
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
2025-04-03 16:20:01 +01:00
Erlend E. Aasland
45a3ab5a81
gh-129917: Update installers to use SQLite 3.49.1 (#131025)
Co-authored-by: Ned Deily <nad@python.org>
2025-03-31 23:13:17 +02:00
Chris Eibl
4940d96135
GH-131296: Fix clang-cl warnings on Windows in sqlite3 (GH-131906) 2025-03-31 16:15:31 +01:00
Chris Eibl
cf839c3373
GH-131296: Fix clang-cl warning on Windows in liblzma (GH-131897)
Also removes warnings suppression for MSVC that no longer need to be suppressed.
2025-03-31 15:50:44 +01:00
Steve Dower
d260631be0
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 15:07:57 +00:00
Chris Eibl
488174dc68
GH-131691: Fix exception handling setting for clang-cl on Windows (GH-131730)
The /EHa option for Clang-CL behaves differently than the same option for MSVC, which is why we don't use it for both compilers.
2025-03-25 23:07:52 +00:00
Chris Eibl
c3b8d73208
GH-131473: Override PreferredToolArchitecture when using Visual Studio bundled clang-cl (GH-131689)
tweak PreferredToolArchitecture for bundled clang-cl
2025-03-24 23:15:51 +00:00
Chris Eibl
d16f455cd8
GH-131521: Uses correct build flags for zlib-ng on Windows (GH-131526)
Do not enable AdvancedVectorExtensions2 for all *.c files, so that the resulting binary can be executed on older CPUs, too. Also enable AdvancedVectorExtensions512 where necessary, and add the ClangCL flags required to enable vector extensions.
2025-03-24 16:21:57 +00:00
Victor Stinner
7101cba6bf
gh-131238: Move _Py_VISIT_STACKREF() to pycore_stackref.h (#131560)
* Move _Py_VISIT_STACKREF() from pycore_gc.h to pycore_stackref.h.
* Remove pycore_interpframe.h include from pycore_genobject.h.
* Remove now useless includes from C files.
* Add pycore_interpframe_structs.h to Makefile.pre.in and
  pythoncore.vcxproj.
2025-03-21 23:24:14 +01:00
Victor Stinner
3a09986553
gh-131238: Add pycore_interpframe.h to PYTHON_HEADERS (#131545)
Add pycore_interpframe.h to Makefile.pre.in and pythoncore.vcxproj.
2025-03-21 16:24:15 +01:00
Chris Eibl
54efe296bc
GH-131473: Add missing %(AdditionalOptions) reference to pythoncore.vcxproj (GH-131475) 2025-03-19 19:50:04 +00:00
Steve Dower
63a638c43f
gh-91349: Replace zlib with zlib-ng in Windows build (GH-131438) 2025-03-19 19:03:25 +00:00
Victor Stinner
4b54031323
gh-131238: Remove pycore_runtime.h from pycore_pystate.h (#131356)
* Remove includes from pycore_pystate.h:

  * pycore_runtime_structs.h
  * pycore_runtime.h
  * pycore_tstate.h
  * pycore_interp.h

* Reorganize internal headers. Move _gc_thread_state from
  pycore_interp_structs.h to pycore_tstate.h.
* Add 3 new header files to PCbuild/pythoncore.vcxproj.
2025-03-19 17:33:24 +01:00
Victor Stinner
b8367e7cf3
gh-130931: Add pycore_typedefs.h internal header (#131396)
Declare _PyInterpreterFrame and _PyRuntimeState types before
declaring their structure members. Break reference cycles between
header files.
2025-03-19 15:23:32 +01:00
Chris Eibl
468a7aaeb4
GH-131278: Add option to build with computed gotos on Windows with clang-cl (GH-131279) 2025-03-17 20:32:23 +00:00
Mark Shannon
a45f25361d
GH-131238: More refactoring of core header files (GH-131351)
Adds new pycore_stats.h header file to help break dependencies involving the pycore_code.h header.
2025-03-17 14:41:05 +00:00
Chris Eibl
0ce056d265
gh-130213: update hacl_star_rev to 322f6d58290e0ed7f4ecb84fcce12917aa0f594b (GH-130960)
Updates the HACL* implementation used by hashlib from upstream sources.
2025-03-15 10:42:27 -07:00
Ken Jin
a8ee1e16f5
gh-130039: Tailcall for windows builds (GH-130040)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-03-11 10:52:56 +08:00
Chris Eibl
91d6db7ee0
GH-131035: Use -flto=thin for clang-cl on Windows (GH-131036) 2025-03-10 16:47:45 +00:00
Burkov Egor
2904ec2273
gh-130878: Add extra check to prepare_ssl.py (GH-130879) 2025-03-05 17:08:30 +00:00
Chris Eibl
d8a1cf469e
gh-130090: Support PGO for clang-cl on Windows (GH-129907) 2025-03-04 19:29:03 +00:00
Chris Eibl
3a555f09f3
gh-130419: Do not build the _freeze_module project twice in Windows PGO builds (GH-130420) 2025-02-24 21:35:00 +00:00