summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-127303: Add docs for token.EXACT_TOKEN_TYPES (GH-127304) (#127391)Miss Islington (bot)2024-11-291-1/+2
| | | | | | | | | | | | gh-127303: Add docs for token.EXACT_TOKEN_TYPES (GH-127304) --------- (cherry picked from commit dd3a87d2a8f8750978359a99de2c5cb2168351d1) Co-authored-by: Илья Любавский <100635212+lubaskinc0de@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tomas R. <tomas.roun8@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] gh-126807: pygettext: Do not attempt to extract messages from ↵Miss Islington (bot)2024-11-141-0/+6
| | | | | | | | | | | | | | | | | | function definitions. (GH-126808) (GH-126847) Fixes a bug where pygettext would attempt to extract a message from a code like this: def _(x): pass This is because pygettext only looks at one token at a time and '_(x)' looks like a function call. However, since 'x' is not a string literal, it would erroneously issue a warning. (cherry picked from commit 9a456383bed52010b90bd491277ea855626a7bba) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.12] gh-126623: Update libexpat to 2.6.4, make future updates easier ↵Miss Islington (bot)2024-11-131-0/+28
| | | | | | | | | | (GH-126792) (GH-126797) gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792) Update libexpat to 2.6.4, make future updates easier. (cherry picked from commit 3c9996909402fadc98e6ca2a64e75a71a7427352) Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.12] gh-126525: Fix `makeunicodedata.py` output on macOS and Windows ↵Miss Islington (bot)2024-11-121-1/+1
| | | | | | | | (GH-126526) (#126726) gh-126525: Fix `makeunicodedata.py` output on macOS and Windows (GH-126526) (cherry picked from commit f223efb2a2d6a3e86556be7295cbbd3ef839f489) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.12] gh-89640: harden float word ordering (#125571 and #126387) (#126430)Erlend E. Aasland2024-11-051-1/+1
| | | | | | | | | | | Properly detect float word ordering on Linux (gh-125571) autoconf-archive patch by Dan Amelang. (cherry picked from commit 26d627779f79d8d5650fe7be348432eccc28f8f9) Hardcode WASM float word ordering to little endian (gh-126387) (cherry picked from commit 532fc08102d62c04d55f5b8aac00bd9e7e12ff4b)
* [3.12] gh-124612: Use ghcr.io/python/autoconf instead of public image ↵Miss Islington (bot)2024-10-301-4/+2
| | | | | | | (GH-124657) (#126184) (cherry picked from commit b502573f7f800dbb2e401fa2a7a05eceac692c7a) Co-authored-by: Donghee Na <donghee.na@python.org>
* [3.12] gh-113993: Make interned strings mortal (GH-120520, GH-121364, ↵Petr Viktorin2024-09-272-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GH-121903, GH-122303) (#123065) This backports several PRs for gh-113993, making interned strings mortal so they can be garbage-collected when no longer needed. * Allow interned strings to be mortal, and fix related issues (GH-120520) * Add an InternalDocs file describing how interning should work and how to use it. * Add internal functions to *explicitly* request what kind of interning is done: - `_PyUnicode_InternMortal` - `_PyUnicode_InternImmortal` - `_PyUnicode_InternStatic` * Switch uses of `PyUnicode_InternInPlace` to those. * Disallow using `_Py_SetImmortal` on strings directly. You should use `_PyUnicode_InternImmortal` instead: - Strings should be interned before immortalization, otherwise you're possibly interning a immortalizing copy. - `_Py_SetImmortal` doesn't handle the `SSTATE_INTERNED_MORTAL` to `SSTATE_INTERNED_IMMORTAL` update, and those flags can't be changed in backports, as they are now part of public API and version-specific ABI. * Add private `_only_immortal` argument for `sys.getunicodeinternedsize`, used in refleak test machinery. Make sure the statically allocated string singletons are unique. This means these sets are now disjoint: - `_Py_ID` - `_Py_STR` (including the empty string) - one-character latin-1 singletons Now, when you intern a singleton, that exact singleton will be interned. * Add a `_Py_LATIN1_CHR` macro, use it instead of `_Py_ID`/`_Py_STR` for one-character latin-1 singletons everywhere (including Clinic). * Intern `_Py_STR` singletons at startup. * Beef up the tests. Cover internal details (marked with `@cpython_only`). * Add lots of assertions * Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other API (GH-121364) * Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs * Document immortality in some functions that take `const char *` This is PyUnicode_InternFromString; PyDict_SetItemString, PyObject_SetAttrString; PyObject_DelAttrString; PyUnicode_InternFromString; and the PyModule_Add convenience functions. Always point out a non-immortalizing alternative. * Don't immortalize user-provided attr names in _ctypes * Immortalize names in code objects to avoid crash (GH-121903) * Intern latin-1 one-byte strings at startup (GH-122303) There are some 3.12-specific changes, mainly to allow statically allocated strings in deepfreeze. (In 3.13, deepfreeze switched to the general `_Py_ID`/`_Py_STR`.) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* gh-117505: Run ensurepip in isolated env in Windows installer (GH-118257)Miss Islington (bot)2024-09-181-2/+2
| | | | | | ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/__init__.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages. (cherry picked from commit c9073eb1a99606df1efeb8959e9f11a8ebc23ae2) Co-authored-by: Michael Vincent <377567+Vynce@users.noreply.github.com>
* gh-123915: Ensure that Windows AMD64 and ARM64 release builds use different ↵Miss Islington (bot)2024-09-101-1/+1
| | | | | | | directories (GH-123918) (cherry picked from commit 00ffdf27367fb9aef247644a96f1a9ffb5be1efe) Co-authored-by: adang1345 <adang1345@gmail.com>
* [3.12] gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893) (#123897)Miss Islington (bot)2024-09-101-0/+1
| | | | | | gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893) (cherry picked from commit fb1b51a58df4315f7ef3171a5abeb74f132b0971) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] Fix typos (#123775) (#123867)Victor Stinner2024-09-091-1/+1
| | | | | | | Fix typos (#123775) (cherry picked from commit 9017b95ff2dcff16bcb0b0a609ed2b0daa845943) Co-authored-by: algonell <algonell@gmail.com>
* [3.12] gh-123700: Update OpenSSL versions in multissltests and CI (GH-123704)Miss Islington (bot)2024-09-041-1/+2
| | | | | | | | Remove EOL 1.1.1w from CI and move it to the 'old' set in multissltests, add latest 3.3.2 to both CI and multissltests. (cherry picked from commit d83e30caddcbf9482273743d287577517ec735b7) Co-authored-by: Zachary Ware <zach@python.org>
* [3.12] gh-123418: Update CI to use fresh OpenSSL releases (GH-123698)Zachary Ware2024-09-041-3/+5
| | | | Also adds openssl/openssl GitHub URL template for newer OpenSSL downloads (cherry picked from commit 56b00f4705634af2861a8aa9c2eb5769012220f0)
* [3.12] gh-123458: Skip SBOM generation if no git repository is detected ↵Miss Islington (bot)2024-09-021-0/+18
| | | | | | | | (GH-123507) (#123615) gh-123458: Skip SBOM generation if no git repository is detected (GH-123507) (cherry picked from commit db42934270c5c23be9f6804cad98dfd8234caf6f) Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.12] build(deps): bump hypothesis from 6.108.10 to 6.111.2 in /Tools ↵Hugo van Kemenade2024-09-021-1/+1
| | | | | | (GH-123567) (#123592) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [3.12] Fix syntax in generate_re_casefix.py (GH-122699) (#122722)Miss Islington (bot)2024-08-061-2/+2
| | | | | | This was broken in gh-97963. (cherry picked from commit b72c748d7fb4ecc0bc4626c7bc05fbc6c83f0ba8) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-122044: Don't error during gitignore filtering with no files ↵Miss Islington (bot)2024-07-271-0/+4
| | | | | | (GH-122045) (#122354) Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.12] gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271) (GH-122276)Miss Islington (bot)2024-07-251-3/+3
| | | | | (cherry picked from commit 6c09b8de5c67406113e8d082e05c9587e35a852a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-117482: Simplify the Fix For Builtin Types Slot Wrappers (gh-122241)Eric Snow2024-07-241-5/+0
| | | | | | | | | | | | | | | | | In gh-121602, I applied a fix to a builtin types initialization bug. That fix made sense in the context of some broader future changes, but introduced a little bit of extra complexity. For earlier versions those future changes are not relevant; we can avoid the extra complexity. Thus we can revert that earlier change and replace it with this one, which is more focused and conceptually simpler. This is essentially the implementation of an idea that @markshannon pointed out to me. Note that this change would be much smaller if we didn't have to deal with repr compatibility for builtin types that explicitly inherit tp slots (see expect_manually_inherited()). The alternative is to stop *explicitly* inheriting tp slots in static PyTypeObject values, which is churn that we can do separately. (cherry picked from commit 716c6771fcfd3be90bba9f888a579b36c02cdb13, AKA gh-121932)
* [3.12] GH-121970: Rewrite the C-API annotations extension (GH-121985) (#122025)Adam Turner2024-07-191-8/+15
| | | | | (cherry picked from commit 22c9d9c1fcc3bb6186524330b169eda6df450f1b) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.12] gh-117482: Fix Builtin Types Slot Wrappers (gh-121632)Eric Snow2024-07-111-0/+5
| | | | | | | When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter). This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't. This change fixes that by preserving the original data from the static type struct and checking that. (cherry picked from commit 5250a031332eb9499d5fc190d7287642e5a144b9, AKA gh-121602) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-71587: Drop local reference cache to `_strptime` module in ↵neonene2024-06-131-1/+0
| | | | | | | `_datetime` (gh-120431) The _strptime module object was cached in a static local variable (in the datetime.strptime() implementation). That's a problem when it crosses isolation boundaries, such as reinitializing the runtme or between interpreters. This change fixes the problem by dropping the static variable, instead always relying on the normal sys.modules cache (via PyImport_Import()). (cherry picked from commit 127c1d2771749853e287632c086b6054212bf12a, AKA gh-120224)
* [3.12] gh-112844: Update CPE references for external dependencies ↵Miss Islington (bot)2024-05-201-1/+15
| | | | | | (GH-118521) (#119238) Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.12] gh-118671: Updated dead ActiveState links (GH-118730) (#118754)Miss Islington (bot)2024-05-081-2/+2
| | | | | | Co-authored-by: trag1c <trag1cdev@yahoo.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-116122: Add SBOM generation to PCbuild/build.bat (GH-116138)Seth Michael Larson2024-05-011-3/+18
| | | | | (cherry picked from commit 72dae53e09a5344bf4922d934a34a2fa48a11c86) Co-authored-by: Seth Michael Larson <seth@python.org>
* gh-118347: Fix Windows installer not updating launcher (GH-118386)Miss Islington (bot)2024-04-292-6/+6
| | | | | (cherry picked from commit 96d8ca7ad6c4f23f023dd6ed0abd042b29dff4a2) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.12] gh-117613: Argument Clinic: ensure that defining class params are ↵neonene2024-04-171-1/+7
| | | | positional-only (#117939)
* [3.12] gh-99108: Update and check HACL* version information (GH-117295) ↵Miss Islington (bot)2024-03-271-0/+14
| | | | | | | | | (GH-117302) gh-99108: Update and check HACL* version information (GH-117295) (cherry picked from commit 669ef49c7d42f35da6f7ee280102353b9b37f83e) Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.12] gh-112536: Add --tsan test for reasonable TSAN execution times. ↵Antoine Pitrou2024-03-181-0/+3
| | | | | | | | (gh-116601) (#116929) (cherry picked from commit ebf29b3) Co-authored-by: Donghee Na <donghee.na@python.org>
* [3.12] gh-116576: Fix `Tools/scripts/sortperf.py` sorting the same list ↵Miss Islington (bot)2024-03-111-1/+2
| | | | | | | | (GH-116577) (#116582) gh-116576: Fix `Tools/scripts/sortperf.py` sorting the same list (GH-116577) (cherry picked from commit 4704e55a71c859c5d17cc2747ba62f49da58ea2d) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] GH-116313: get WASI builds to run under wasmtime 18 w/ WASI ↵Brett Cannon2024-03-051-2/+4
| | | | 0.2/preview2 primitives (GH-116327) (GH-116373)
* [3.12] chore: fix typos (#116345) (#116370)Terry Jan Reedy2024-03-051-1/+1
| | | | Co-authored-by: cui fliter <imcusg@gmail.com> (cherry picked from commit e7ba6e9dbe5433b4a0bcb0658da6a68197c28630)
* gh-115554: Improved logic for handling multiple existing py.exe launcher ↵Miss Islington (bot)2024-03-053-74/+134
| | | | | | | installs (GH-115793) (cherry picked from commit 9b7f253b55f10df03d43c8a7c2da40ea523ac7a1) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.12] gh-116265: Remove obsolete sentence. (GH-116284) (#116331)Miss Islington (bot)2024-03-041-4/+2
| | | | | | | Remove sentence in Tools/c-analyzer/README referring to deleted ignore-globals.txt. (cherry picked from commit 88b5c665ee1624af1bc5097d3eb2af090b9cabed) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] GH-115978: Disable `*readv()` and `*writev()` on WASI (GH-116228) ↵Miss Islington (bot)2024-03-021-0/+9
| | | | | | | | | | (GH-116231) GH-115978: Disable `*readv()` and `*writev()` on WASI (GH-116228) Wasmtime doesn't implement these functions in a way to pass test_posix (https://github.com/bytecodealliance/wasmtime/issues/7830). (cherry picked from commit 5dc8c84d397110f9edfa56793ad8887b1f176d79) Co-authored-by: Brett Cannon <brett@python.org>
* [3.12] gh-112844: Add SBOM for external dependencies (GH-115789) (#116128)Miss Islington (bot)2024-02-291-17/+91
| | | | Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.12] gh-108303: Move `Lib/test/sortperf.py` to `Tools/scripts` (GH-114687) ↵Miss Islington (bot)2024-02-181-0/+196
| | | | | | | | (#115625) gh-108303: Move `Lib/test/sortperf.py` to `Tools/scripts` (GH-114687) (cherry picked from commit f9154f8f237e31e7c30f8698f980bee5e494f1e0) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] GH-113516: don't set `LDSHARED` when building for WASI (GH-115495) ↵Brett Cannon2024-02-151-1/+0
| | | | (GH-115496)
* [3.12] gh-115399: Upgrade bundled libexpat to 2.6.0 (GH-115431) (#115469)Miss Islington (bot)2024-02-142-1/+5
| | | | | | gh-115399: Upgrade bundled libexpat to 2.6.0 (GH-115431) (cherry picked from commit 4b2d1786ccf913bc80ff571c32b196be1543ca54) Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.12] gh-112302: Move pip SBOM discovery to release-tools (GH-115360) (#115486)Miss Islington (bot)2024-02-141-251/+0
| | | | Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.12] gh-114563: C decimal falls back to pydecimal for unsupported format ↵John Belmonte2024-02-121-0/+1
| | | | | | | | | | | | | | | | | | | | | strings (GH-114879) (GH-115353) Immediate merits: * eliminate complex workarounds for 'z' format support (NOTE: mpdecimal recently added 'z' support, so this becomes efficient in the long term.) * fix 'z' format memory leak * fix 'z' format applied to 'F' * fix missing '#' format support Suggested and prototyped by Stefan Krah. Fixes gh-114563, gh-91060 (cherry picked from commit 72340d15cdfdfa4796fdd7c702094c852c2b32d2) Co-authored-by: John Belmonte <john@neggie.net> Co-authored-by: Stefan Krah <skrah@bytereef.org>
* [3.12] gh-112302: Change 'licenseConcluded' field to 'NOASSERTION' ↵Miss Islington (bot)2024-02-061-5/+7
| | | | | | | | | | | | | | (GH-115038) (#115088) * gh-112302: Change 'licenseConcluded' field to 'NOASSERTION' (GH-115038) (cherry picked from commit 4bf41879d03b1da3c6d38c39a04331e3ae2e7545) Co-authored-by: Seth Michael Larson <seth@python.org> * Update pip SBOM package to version in source --------- Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.12] gh-112302: Backport SBOM generation tooling (#114730)Seth Michael Larson2024-02-061-0/+474
| | | [3.12] Backport SBOM generation tooling
* [3.12] gh-115015: Argument Clinic: fix generated code for METH_METHOD ↵Erlend E. Aasland2024-02-062-1/+2
| | | | | methods without params (#115016) (#115067) (cherry picked from commit 09096a1647913526a3d4fa69a9d2056ec82a8f37)
* [3.12] gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.13. (GH-115055)Miss Islington (bot)2024-02-061-2/+3
| | | | | | Also update multissltests to use 1.1.1w, 3.0.13, 3.1.5, and 3.2.1. (cherry picked from commit 299e16ca0f303a1e00bd0e04679862a5d4db5ab2) Co-authored-by: Ned Deily <nad@python.org>
* [3.12] Bump ruff to 0.2.0 (GH-114932) (#114935)Miss Islington (bot)2024-02-021-0/+2
| | | | | | Bump ruff to 0.2.0 (GH-114932) (cherry picked from commit 920b89f62751e64a35fa1bebc03701af6d6f31f2) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-65701: document that freeze doesn't work with framework builds on ↵Miss Islington (bot)2023-12-222-0/+10
| | | | | | | | | | | | | | | | macOS (GH-113352) (#113362) gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352) * gh-65701: document that freeze doesn't work with framework builds on macOS The framework install is inherently incompatible with freeze. Document that that freeze doesn't work with framework builds and bail out early when trying to run freeze anyway. (cherry picked from commit df1eec3dae3b1eddff819fd70f58b03b3fbd0eda) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-106560: Fix redundant declarations in Python/frozen.c (#112612) ↵Victor Stinner2023-12-031-1/+12
| | | | | | | | | | | | (#112651) gh-106560: Fix redundant declarations in Python/frozen.c (#112612) Avoid duplicated declarations of "extern" functions in Python/frozen.c. Compiler warnings seen by building Python with gcc -Wredundant-decls. (cherry picked from commit d9e444dbb86e173ee5b8491e3facbd447b91eaed)
* [3.12] Bump mypy to 1.7.1 (#112581) (#112601)Alex Waygood2023-12-011-1/+1
|
* [3.12] gh-106931: Intern Statically Allocated Strings Globally (gh-107272) ↵Eric Snow2023-11-271-0/+2
| | | | | | | | | (gh-110713) 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. (cherry-picked from commit b72947a8d26915156323ccfd04d273199ecb870c)