summaryrefslogtreecommitdiffstats
path: root/PCbuild
Commit message (Collapse)AuthorAgeFilesLines
* Fix broken XML in Visual Studio project file (GH-127142)Sergey Muraviov2024-11-221-0/+2
|
* gh-124111: Update tkinter for compatibility with Tcl/Tk 9.0.0 (GH-124156)Marc Culler2024-11-143-12/+20
|
* gh-76785: Minor Cleanup of "Cross-interpreter" Code (gh-126457)Eric Snow2024-11-072-0/+4
| | | | | | | | The primary objective here is to allow some later changes to be cleaner. Mostly this involves renaming things and moving a few things around. * CrossInterpreterData -> XIData * crossinterpdatafunc -> xidatafunc * split out pycore_crossinterp_data_registry.h * add _PyXIData_lookup_t
* gh-115999: Implement thread-local bytecode and enable specialization for ↵mpage2024-11-044-0/+12
| | | | | | | | | `BINARY_OP` (#123926) Each thread specializes a thread-local copy of the bytecode, created on the first RESUME, in free-threaded builds. All copies of the bytecode for a code object are stored in the co_tlbc array on the code object. Threads reserve a globally unique index identifying its copy of the bytecode in all co_tlbc arrays at thread creation and release the index at thread destruction. The first entry in every co_tlbc array always points to the "main" copy of the bytecode that is stored at the end of the code object. This ensures that no bytecode is copied for programs that do not use threads. Thread-local bytecode can be disabled at runtime by providing either -X tlbc=0 or PYTHON_TLBC=0. Disabling thread-local bytecode also disables specialization. Concurrent modifications to the bytecode made by the specializing interpreter and instrumentation use atomics, with specialization taking care not to overwrite an instruction that was instrumented concurrently.
* gh-99108: Cleanup references to inexisting `Modules/_blake2`. (GH-126270)Bénédikt Tran2024-11-011-9/+0
| | | | | | | | | * Remove references to `Modules/_blake2`. * Remove `Modules/_blake2` entry from CODEOWNERS The folder does not exist anymore. * Remove `Modules/_blake2` entry from `Tools/c-analyzer/TODO`
* gh-126084: Fix venvwlauncher.exe to run pythonw.exe (GH-126088)Christian Ullrich2024-10-291-1/+1
|
* gh-125604: Move _Py_AuditHookEntry, etc. Out of pycore_runtime.h (gh-125605)Eric Snow2024-10-182-4/+16
| | | | | | | | | | | | This is essentially a cleanup, moving a handful of API declarations to the header files where they fit best, creating new ones when needed. We do the following: * add pycore_debug_offsets.h and move _Py_DebugOffsets, etc. there * inline struct _getargs_runtime_state and struct _gilstate_runtime_state in _PyRuntimeState * move struct _reftracer_runtime_state to the existing pycore_object_state.h * add pycore_audit.h and move to it _Py_AuditHookEntry , _PySys_Audit(), and _PySys_ClearAuditHooks * add audit.h and cpython/audit.h and move the existing audit-related API there *move the perfmap/trampoline API from cpython/sysmodule.h to cpython/ceval.h, and remove the now-empty cpython/sysmodule.h
* gh-124102: Clean up unsupported VS and WiX detections (GH-124784)Wulian2024-10-181-5/+0
|
* gh-125625: Check for `py -3.13` in PCbuild/find_python.bat (GH-125626)Wulian2024-10-171-1/+1
|
* gh-124218: Refactor per-thread reference counting (#124844)Sam Gross2024-10-014-8/+8
| | | | | | | Currently, we only use per-thread reference counting for heap type objects and the naming reflects that. We will extend it to a few additional types in an upcoming change to avoid scaling bottlenecks when creating nested functions. Rename some of the files and functions in preparation for this change.
* gh-111495: Add tests for `PyCodec_*` C API (#123343)Bénédikt Tran2024-09-292-0/+2
|
* gh-124448: Update Windows builds to use Tcl/Tk 8.6.15 (GH-124449)Zachary Ware2024-09-253-5/+5
|
* gh-124102: Update internal PCbuild docs to accurately list build ↵Wulian2024-09-238-31/+13
| | | | dependencies (GH-124103)
* gh-121404: split compile.c into compile.c and codegen.c (#123651)Irit Katriel2024-09-094-0/+8
|
* gh-123418: Update OpenSSL to 3.0.15 on Windows (GH-123673)Zachary Ware2024-09-042-4/+4
|
* gh-107954, PEP 741: Add PyConfig_Get()/Set() functions (#123472)Victor Stinner2024-09-022-0/+4
| | | | | | | | | | | Add PyConfig_Get(), PyConfig_GetInt(), PyConfig_Set() and PyConfig_Names() functions to get and set the current runtime Python configuration. Add visibility and "sys spec" to config and preconfig specifications. _PyConfig_AsDict() now converts PyConfig.xoptions as a dictionary. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-111495: Add tests for PyTuple C API (#118757)Sergey B Kirpichev2024-08-262-0/+2
| | | | | Co-authored-by: kalyanr <kalyan.ben10@live.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-99108: Add HACL* Blake2 implementation to hashlib (GH-119316)Jonathan Protzenko2024-08-131-3/+15
| | | | | | | This replaces the existing hashlib Blake2 module with a single implementation that uses HACL\*'s Blake2b/Blake2s implementations. We added support for all the modes exposed by the Python API, including tree hashing, leaf nodes, and so on. We ported and merged all of these changes upstream in HACL\*, added test vectors based on Python's existing implementation, and exposed everything needed for hashlib. This was joint work done with @R1kM. See the PR for much discussion and benchmarking details. TL;DR: On many systems, 8-50% faster (!) than `libb2`, on some systems it appeared 10-20% slower than `libb2`.
* gh-111495: Add more tests on PyEval C APIs (#122789)Victor Stinner2024-08-082-0/+2
| | | | * Add Lib/test/test_capi/test_eval.py * Add Modules/_testlimitedcapi/eval.c
* gh-122417: Implement per-thread heap type refcounts (#122418)Sam Gross2024-08-064-0/+12
| | | | | | | The free-threaded build partially stores heap type reference counts in distributed manner in per-thread arrays. This avoids reference count contention when creating or destroying instances. Co-authored-by: Ken Jin <kenjin@python.org>
* gh-122573: Require Python 3.10 or newer for Windows builds (GH-122574)Jonathan Protzenko2024-08-041-3/+3
| | | | | | Match statements in tooling require a more recent Python. Tools/cases_generator/*.py (and `Tools/jit/*.py` in 3.13+). Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-100240: Use a consistent implementation for freelists (#121934)Sam Gross2024-07-222-0/+4
| | | | | | | | This combines and updates our freelist handling to use a consistent implementation. Objects in the freelist are linked together using the first word of memory block. If configured with freelists disabled, these operations are essentially no-ops.
* Fixed regenerating files in a checkout path with spaces (GH-121384)AraHaan2024-07-051-9/+9
|
* gh-112136: Restore removed _PyArg_Parser (#121262)Victor Stinner2024-07-032-0/+4
| | | | | | | Restore the private _PyArg_Parser structure and the private _PyArg_ParseTupleAndKeywordsFast() function, previously removed in Python 3.13 alpha 1. Recreate Include/cpython/modsupport.h header file.
* gh-61103: Support double complex (_Complex) type in ctypes (#120894)Sergey B Kirpichev2024-07-011-0/+1
| | | | | | | | | | | | | | | | | | Example: ```pycon >>> import ctypes >>> ctypes.__STDC_IEC_559_COMPLEX__ 1 >>> libm = ctypes.CDLL('libm.so.6') >>> libm.clog.argtypes = [ctypes.c_double_complex] >>> libm.clog.restype = ctypes.c_double_complex >>> libm.clog(1+1j) (0.34657359027997264+0.7853981633974483j) ``` Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-117139: Convert the evaluation stack to stack refs (#118450)Ken Jin2024-06-262-0/+4
| | | | | | | | | | | | | | | | | This PR sets up tagged pointers for CPython. The general idea is to create a separate struct _PyStackRef for everything on the evaluation stack to store the bits. This forces the C compiler to warn us if we try to cast things or pull things out of the struct directly. Only for free threading: We tag the low bit if something is deferred - that means we skip incref and decref operations on it. This behavior may change in the future if Mark's plans to defer all objects in the interpreter loop pans out. This implies a strict stack reference discipline is required. ALL incref and decref operations on stackrefs must use the stackref variants. It is unsafe to untag something then do normal incref/decref ops on it. The new incref and decref variants are called dup and close. They mimic a "handle" API operating on these stackrefs. Please read Include/internal/pycore_stackref.h for more information! --------- Co-authored-by: Mark Shannon <9448417+markshannon@users.noreply.github.com>
* gh-120642: Move private PyCode APIs to the internal C API (#120643)Victor Stinner2024-06-262-4/+0
| | | | | | | | | | | | | | | * Move _Py_CODEUNIT and related functions to pycore_code.h. * Move _Py_BackoffCounter to pycore_backoff.h. * Move Include/cpython/optimizer.h content to pycore_optimizer.h. * Remove Include/cpython/optimizer.h. * Remove PyUnstable_Replace_Executor(). Rename functions: * PyUnstable_GetExecutor() => _Py_GetExecutor() * PyUnstable_GetOptimizer() => _Py_GetOptimizer() * PyUnstable_SetOptimizer() => _Py_SetTier2Optimizer() * PyUnstable_Optimizer_NewCounter() => _PyOptimizer_NewCounter() * PyUnstable_Optimizer_NewUOpOptimizer() => _PyOptimizer_NewUOpOptimizer()
* gh-119344: Make critical section API public (#119353)Sam Gross2024-06-212-0/+8
| | | | | | | | | | This makes the following macros public as part of the non-limited C-API for locking a single object or two objects at once. * `Py_BEGIN_CRITICAL_SECTION(op)` / `Py_END_CRITICAL_SECTION()` * `Py_BEGIN_CRITICAL_SECTION2(a, b)` / `Py_END_CRITICAL_SECTION2()` The supporting functions and structs used by the macros are also exposed for cases where C macros are not available.
* gh-117511: Make PyMutex public in the non-limited API (#117731)Sam Gross2024-06-202-0/+8
|
* gh-119853: Add Include/refcount.h to projects (#119860)Victor Stinner2024-05-312-0/+4
|
* gh-116145: Updated bundled Tcl/Tk on Windows to 8.6.14 (GH-117030)Steve Dower2024-05-312-4/+4
|
* gh-97588: Align ctypes struct layout to GCC/MSVC (GH-97702)Matthias Görgens2024-05-292-2/+6
| | | | | | | Structure layout, and especially bitfields, sometimes resulted in clearly wrong behaviour like overlapping fields. This fixes Co-authored-by: Gregory P. Smith <gps@python.org> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Update Windows library names for the Python version bump (#118766)Kirill Podoprigora2024-05-081-1/+1
|
* gh-118734: Fixes Windows build when Use_TIER2 is unspecified (#118735)Steve Dower2024-05-073-3/+3
|
* gh-118518: Allow perf to work without frame pointers (#112254)Pablo Galindo Salgado2024-05-054-0/+8
|
* gh-111997: C-API for signalling monitoring events (#116413)Irit Katriel2024-05-043-1/+5
|
* gh-115119: Update Windows installer to mpdecimal 4.0.0 (#118506)Erlend E. Aasland2024-05-032-2/+2
|
* gh-118335: Rename --experimental-interpreter on Windows to ↵Guido van Rossum2024-05-021-3/+3
| | | | | --experimental-jit-interpreter (#118497) Also fix docs for this in whatsnew.
* gh-118335: Configure Tier 2 interpreter at build time (#118339)Guido van Rossum2024-05-013-2/+16
| | | | | | | | | | | | | | | | | | | | | | The code for Tier 2 is now only compiled when configured with `--enable-experimental-jit[=yes|interpreter]`. We drop support for `PYTHON_UOPS` and -`Xuops`, but you can disable the interpreter or JIT at runtime by setting `PYTHON_JIT=0`. You can also build it without enabling it by default using `--enable-experimental-jit=yes-off`; enable with `PYTHON_JIT=1`. On Windows, the `build.bat` script supports `--experimental-jit`, `--experimental-jit-off`, `--experimental-interpreter`. In the C code, `_Py_JIT` is defined as before when the JIT is enabled; the new variable `_Py_TIER2` is defined when the JIT *or* the interpreter is enabled. It is actually a bitmask: 1: JIT; 2: default-off; 4: interpreter.
* gh-117139: Add header for tagged pointers (GH-118330)Ken Jin2024-04-302-0/+4
| | | | | --------- Co-authored-by: Sam Gross <655866+colesbury@users.noreply.github.com>
* gh-116122: Add SBOM generation to PCbuild/build.bat (GH-116138)Seth Michael Larson2024-04-301-2/+13
|
* gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)Eric Snow2024-04-242-6/+6
| | | See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26.
* gh-117968: Add tests for the part of the PyRun family of the C API (GH-117982)Serhiy Storchaka2024-04-172-0/+4
| | | | Co-authored-by: NGRsoftlab <78017794+NGRsoftlab@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-115009: Update Windows installer to use SQLite 3.45.3 (GH-117445)Mariusz Felisiak2024-04-163-3/+3
|
* gh-117494: extract the Instruction Sequence data structure into a separate ↵Irit Katriel2024-04-044-0/+10
| | | | file (#117496)
* gh-116968: Reimplement Tier 2 counters (#117144)Guido van Rossum2024-04-041-0/+1
| | | | | | | | | | | | Introduce a unified 16-bit backoff counter type (``_Py_BackoffCounter``), shared between the Tier 1 adaptive specializer and the Tier 2 optimizer. The API used for adaptive specialization counters is changed but the behavior is (supposed to be) identical. The behavior of the Tier 2 counters is changed: - There are no longer dynamic thresholds (we never varied these). - All counters now use the same exponential backoff. - The counter for ``JUMP_BACKWARD`` starts counting down from 16. - The ``temperature`` in side exits starts counting down from 64.
* gh-76785: Add PyInterpreterConfig Helpers (gh-117170)Eric Snow2024-04-024-0/+8
| | | These helpers make it easier to customize and inspect the config used to initialize interpreters. This is especially valuable in our tests. I found inspiration from the PyConfig API for the PyInterpreterConfig dict conversion stuff. As part of this PR I've also added a bunch of tests.
* gh-94808:Improve coverage of PyObject_Print (GH-98749)MonadChains2024-04-012-0/+4
|
* gh-117323: Make `cell` thread-safe in free-threaded builds (#117330)Sam Gross2024-03-292-0/+4
| | | Use critical sections to lock around accesses to cell contents. The critical sections are no-ops in the default (with GIL) build.
* gh-87193: Support bytes objects with refcount > 1 in _PyBytes_Resize() ↵Serhiy Storchaka2024-03-252-0/+4
| | | | | (GH-117160) Create a new bytes object and destroy the old one if it has refcount > 1.