summaryrefslogtreecommitdiffstats
path: root/Tools/build
Commit message (Collapse)AuthorAgeFilesLines
* gh-112302: Change 'licenseConcluded' field to 'NOASSERTION' (#115038)Seth Michael Larson2024-02-061-5/+7
|
* GH-80789: Get rid of the ``ensurepip`` infra for many wheels (#109245)Sviatoslav Sydorenko (Святослав Сидоренко)2024-01-301-5/+1
| | | | | | Co-authored-by: vstinner@python.org Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com> Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* gh-91325: Skip Stable ABI checks with Py_TRACE_REFS special build (GH-92046)Petr Viktorin2024-01-291-9/+10
| | | | | | Skip Stable ABI checks with Py_TRACE_REFS special build This build is not compatible with Py_LIMITED_API nor with the stable ABI.
* gh-114250: Fetch metadata for pip and its vendored dependencies from PyPI ↵Seth Michael Larson2024-01-261-50/+213
| | | | (#114450)
* GH-112354: `END_FOR` instruction to only pop one value. (GH-114247)Mark Shannon2024-01-241-0/+8
| | | | * Compiler emits END_FOR; POP_TOP instead of END_FOR. To support tier 2 side exits in loops.
* gh-114178: Fix generate_sbom.py for out-of-tree builds (#114179)Erlend E. Aasland2024-01-171-0/+1
|
* gh-112302: Point core developers to SBOM devguide on errors (#113490)Seth Michael Larson2024-01-101-9/+44
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-113258: Write frozen modules to the build tree on Windows (GH-113303)Itamar Oren2024-01-031-4/+4
| | | This ensures the source directory is not modified at build time, and different builds (e.g. different versions or GIL vs no-GIL) do not have conflicts.
* GH-111485: Delete the old generator code. (GH-113321)Mark Shannon2023-12-211-1/+1
|
* gh-113257: Automatically generate pip SBOM metadata from wheel (#113295)Seth Michael Larson2023-12-201-10/+106
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-113257: Fix SBOM metadata for pip 23.3.2 (#113262)Seth Michael Larson2023-12-191-1/+1
| | | Fix SBOM metadata for pip 23.3.2
* gh-113246: Updated bundled pip to 23.3.2 (gh-113249)Stéphane Bidoul2023-12-181-1/+1
| | | Updated bundled pip to 23.3.2
* gh-76785: More Fixes for test.support.interpreters (gh-113012)Eric Snow2023-12-121-0/+1
| | | This brings the module (along with the associated extension modules) mostly in sync with PEP 734. There are only a few small things to wrap up.
* gh-112302: Add Software Bill-of-Materials (SBOM) tracking for dependencies ↵Seth Michael Larson2023-12-072-0/+192
| | | | (#112303)
* gh-106560: Fix redundant declarations in Python/frozen.c (#112612)Victor Stinner2023-12-031-1/+12
| | | | | | Avoid duplicated declarations of "extern" functions in Python/frozen.c. Compiler warnings seen by building Python with gcc -Wredundant-decls.
* Fix typos in variable names, function names, and comments (GH-101868)Yang Hau2023-12-011-6/+6
|
* gh-112088: Run autoreconf in GHA check_generated_files (#112090)Victor Stinner2023-11-151-0/+31
| | | | | | | | | | | The "Check if generated files are up to date" job of GitHub Actions now runs the "autoreconf -ivf -Werror" command instead of the "make regen-configure" command to avoid depending on the external quay.io server. Add Tools/build/regen-configure.sh script to regenerate the configure with an Ubuntu container image. The "quay.io/tiran/cpython_autoconf:271" container image (https://github.com/tiran/cpython_autoconf) is no longer used.
* gh-109515: When generating deep frozen modules on Windows, use a list file ↵Riccardo Ghetta2023-10-302-5/+39
| | | | instead of arguments (GH-109516)
* gh-110481: Implement biased reference counting (gh-110764)Sam Gross2023-10-301-6/+3
|
* gh-90815: Add mimalloc memory allocator (#109914)Dino Viehland2023-10-301-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add mimalloc v2.12 Modified src/alloc.c to remove include of alloc-override.c and not compile new handler. Did not include the following files: - include/mimalloc-new-delete.h - include/mimalloc-override.h - src/alloc-override-osx.c - src/alloc-override.c - src/static.c - src/region.c mimalloc is thread safe and shares a single heap across all runtimes, therefore finalization and getting global allocated blocks across all runtimes is different. * mimalloc: minimal changes for use in Python: - remove debug spam for freeing large allocations - use same bytes (0xDD) for freed allocations in CPython and mimalloc This is important for the test_capi debug memory tests * Don't export mimalloc symbol in libpython. * Enable mimalloc as Python allocator option. * Add mimalloc MIT license. * Log mimalloc in Lib/test/pythoninfo.py. * Document new mimalloc support. * Use macro defs for exports as done in: https://github.com/python/cpython/pull/31164/ Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (#110139)Victor Stinner2023-09-301-1/+6
| | | | | | | | | | | | | | | | * pycore_pythread.h is now the central place to make sure that _POSIX_THREADS and _POSIX_SEMAPHORES macros are defined if available. * Make sure that pycore_pythread.h is included when _POSIX_THREADS and _POSIX_SEMAPHORES macros are tested. * PY_TIMEOUT_MAX is now defined as a constant, since its value depends on _POSIX_THREADS, instead of being defined as a macro. * Prevent integer overflow in the preprocessor when computing PY_TIMEOUT_MAX_VALUE on Windows: replace "0xFFFFFFFELL * 1000 < LLONG_MAX" with "0xFFFFFFFELL < LLONG_MAX / 1000". * Document the change and give hints how to fix affected code. * Add an exception for PY_TIMEOUT_MAX name to smelly.py * Add PY_TIMEOUT_MAX to the stable ABI
* gh-109256: allocate opcode IDs for internal opcodes in their own range (#109269)Irit Katriel2023-09-121-1/+1
|
* GH-108716: Turn off deep-freezing of code objects. (GH-108722)Mark Shannon2023-09-081-21/+9
|
* gh-108740: Fix "make regen-all" race condition (#108741)Victor Stinner2023-09-061-1/+1
| | | | | | | | | | | | | | | | | | Fix a race condition in "make regen-all". The deepfreeze.c source and files generated by Argument Clinic are now generated or updated before generating "global objects". Previously, some identifiers may miss depending on the order in which these files were generated. * "make regen-global-objects": Make sure that deepfreeze.c is generated and up to date, and always run "make clinic". * "make clinic" no longer runs generate_global_objects.py script. * "make regen-deepfreeze" now only updates deepfreeze.c (C file). It doesn't build deepfreeze.o (object) anymore. * Remove misleading messages in "make regen-global-objects" and "make clinic". They are now outdated, these commands are now safe to use. * Document generates files in Doc/using/configure.rst. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-109002: Ensure only one wheel for each vendored package (#109003)Łukasz Langa2023-09-061-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | Output with one wheel: ``` ❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py Verifying checksum for /Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl. Expected digest: 7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be Actual digest: 7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be ::notice file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Successfully verified the checksum of the pip wheel. ``` Output with two wheels: ``` ❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py ::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl::Found more than one wheel for package pip. ::error file=/Volumes/RAMDisk/cpython/Lib/ensurepip/_bundled/pip-23.2.1-py3-none-any.whl::Found more than one wheel for package pip. ``` Output without wheels: ``` ❯ GITHUB_ACTIONS=true ./Tools/build/verify_ensurepip_wheels.py ::error file=::Could not find a pip wheel on disk. ```
* Fix a typo in umarshal.py (#108803)KH2023-09-061-1/+1
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-108494: Argument Clinic partial supports of Limited C API (#108495)Victor Stinner2023-08-251-0/+1
| | | | | | | | | | Argument Clinic now has a partial support of the Limited API: * Add --limited option to clinic.c. * Add '_testclinic_limited' extension which is built with the limited C API version 3.13. * For now, hardcode in clinic.py that "_testclinic_limited.c" targets the limited C API.
* gh-107211: No longer export internal functions (7) (#108425)Victor Stinner2023-08-241-2/+2
| | | | | | | | | No longer export _PyUnicode_FromId() internal C API function. Change comment style to "// comment" and add comment explaining why other functions have to be exported. Update Tools/build/generate_token.py to update Include/internal/pycore_token.h comments.
* gh-105481: remove regen-opcode. Generated _PyOpcode_Caches in regen-cases. ↵Irit Katriel2023-08-231-67/+0
| | | | (#108367)
* gh-105481: opcode.h is no longer generated during the build (#108080)Irit Katriel2023-08-171-34/+3
|
* gh-105481: fix out of date comment (#108079)Irit Katriel2023-08-171-1/+1
|
* gh-105481: generate op IDs from bytecode.c instead of hard coding them in ↵Irit Katriel2023-08-162-108/+6
| | | | opcode.py (#107971)
* Attempt to speed up deepfreeze.py (#107887)Guido van Rossum2023-08-141-12/+23
| | | | | | * Instead of calling get_identifiers_and_strings(), extract identifiers and strings from pycore_global_strings.h. * Avoid ast.literal_eval(), it's very slow.
* gh-105481: split opcode_ids.h out of opcode.h so that it can be generated ↵Irit Katriel2023-08-111-15/+46
| | | | separately (#107866)
* Fix the long64 reader in umarshal.py (GH-107828)Martin DeMello2023-08-101-4/+4
|
* gh-105481: simplify definition of pseudo ops in Lib/opcode.py (#107561)Irit Katriel2023-08-021-9/+1
|
* gh-105481: combine regen-opcode-targets with regen-opcode to avoid ↵Irit Katriel2023-08-011-1/+11
| | | | calculating the specialized opcodes in two places (#107540)
* gh-105481: the ENABLE_SPECIALIZATION flag does not need to be generated by ↵Irit Katriel2023-08-011-5/+0
| | | | the build script, or exposed in opcode.py (#107534)
* gh-106931: Intern Statically Allocated Strings Globally (gh-107272)Eric Snow2023-07-271-0/+2
| | | | | We tried this before with a dict and for all interned strings. That ran into problems due to interpreter isolation. However, exclusively using a per-interpreter cache caused some inconsistency that can eliminate the benefit of interning. Here we circle back to using a global cache, but only for statically allocated strings. We also use a more-basic _Py_hashtable_t for that global cache instead of a dict. Ideally we would only have the global cache, but the optional isolation of each interpreter's allocator means that a non-static string object must not outlive its interpreter. Thus we would have to store a copy of each such interned string in the global cache, tied to the main interpreter.
* gh-105481: remove dependency of _inline_cache_entries on opname (#107339)Irit Katriel2023-07-271-3/+2
|
* gh-105481: do not auto-generate pycore_intrinsics.h (#106913)Irit Katriel2023-07-201-34/+3
|
* gh-105481: Generate the opcode lists in dis from data extracted from ↵Irit Katriel2023-07-181-6/+0
| | | | bytecodes.c (#106758)
* GH-106360: Support very basic superblock introspection (#106422)Mark Shannon2023-07-041-3/+4
| | | * Add len() and indexing support to uop superblocks.
* gh-106316: Remove pytime.h header file (#106317)Victor Stinner2023-07-011-1/+0
| | | | | | | | | | | | | | | | | Remove the "cpython/pytime.h" header file: it only contained private functions. Move functions to the internal pycore_time.h header file. Move tests from _testcapi to _testinternalcapi. Rename also test methods to have the same name than tested C functions. No longer export these functions: * _PyTime_Add() * _PyTime_As100Nanoseconds() * _PyTime_FromMicrosecondsClamp() * _PyTime_FromTimespec() * _PyTime_FromTimeval() * _PyTime_GetPerfCounterWithInfo() * _PyTime_MulDiv()
* make regen-stdlib-module-names rejects test modules (#105921)Victor Stinner2023-06-201-2/+17
| | | Make sure that sys.stdlib_module_names doesn't contain test modules.
* gh-105481: generate _specializations and _specialized_instructions from ↵Irit Katriel2023-06-191-12/+17
| | | | bytecodes.c (#105913)
* gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and ↵Irit Katriel2023-06-171-30/+0
| | | | replace by their new versions (#105865)
* gh-105407: Remove unused imports in tools (#105409)Victor Stinner2023-06-061-2/+0
|
* gh-102304: doc: Add links to Stable ABI and Limited C API (#105345)Victor Stinner2023-06-061-4/+4
| | | | | | | | | * Add "limited-c-api" and "stable-api" references. * Rename "stable-abi-list" reference to "limited-api-list". * Makefile: Document files regenerated by "make regen-limited-abi" * Remove first empty line in generated files: - Lib/test/test_stable_abi_ctypes.py - PC/python3dll.c
* gh-105091: stable_abi.py: Remove "Unixy" check from --all on other platforms ↵Petr Viktorin2023-05-301-1/+2
| | | | (GH-105092)