summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-123700: Update OpenSSL versions in multissltests and CI (GH-123702)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.13] gh-123418: Update CI to use fresh OpenSSL releases (GH-123696)Miss Islington (bot)2024-09-041-3/+5
| | | | | | Also adds openssl/openssl GitHub URL template for newer OpenSSL downloads (cherry picked from commit 56b00f4705634af2861a8aa9c2eb5769012220f0) Co-authored-by: Zachary Ware <zach@python.org>
* [3.13] gh-123458: Skip SBOM generation if no git repository is detected ↵Miss Islington (bot)2024-09-021-0/+18
| | | | | | | | (GH-123507) (#123616) 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.13] build(deps): bump hypothesis from 6.108.10 to 6.111.2 in /Tools ↵Hugo van Kemenade2024-09-021-1/+1
| | | | | | | | (GH-123567) (#123591) (cherry picked from commit 88210c295d51364c9f779989bc528084b8fe8765) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [3.13] gh-122688: Fix support of var-positional parameter in Argument Clinic ↵Serhiy Storchaka2024-09-022-10/+12
| | | | | | | | | | (GH-122689) (#122852) * Parameters after the var-positional parameter are now keyword-only instead of positional-or-keyword. * Correctly calculate min_kw_only. * Raise errors for invalid combinations of the var-positional parameter with "*", "/" and deprecation markers. (cherry picked from commit 8393608dd9f157ae25ee44777541e62fa80a6d82)
* [3.13] GH-121723: Skip test_config_queue_handler_multiprocessing_context in ↵Miss Islington (bot)2024-08-221-0/+1
| | | | | | emulated JIT CI (GH-122991) (cherry picked from commit 7b8328b6b33939dfff4606d286b10069a09223dd) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] GH-118943: Handle races when moving jit_stencils.h (GH-122709)Miss Islington (bot)2024-08-081-1/+6
| | | | | | (cherry picked from commit 44659d392751f0161a0f958fec39ad013da45427) Co-authored-by: Miro Hrončok <miro@hroncok.cz> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.13] Fix syntax in generate_re_casefix.py (GH-122699) (#122721)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.13] gh-117657: Avoid race in `PAUSE_ADAPTIVE_COUNTER` in free-threaded ↵Miss Islington (bot)2024-07-301-1/+0
| | | | | | | | | | build (GH-122190) (#122475) The adaptive counter doesn't do anything currently in the free-threaded build and TSan reports a data race due to concurrent modifications to the counter. (cherry picked from commit 2b163aa9e796b312bb0549d49145d26e4904768e) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-122044: Don't error during gitignore filtering with no files ↵Miss Islington (bot)2024-07-271-0/+4
| | | | | | (GH-122045) (#122355) Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.13] gh-122201: Lock mutex when setting handling_thread to NULL ↵Miss Islington (bot)2024-07-261-1/+0
| | | | | | | | | | (GH-122204) (#122319) In the free-threaded build, we need to lock pending->mutex when clearing the handling_thread in order not to race with a concurrent make_pending_calls in the same interpreter. (cherry picked from commit c557ae97d6bd9d04164a19b4fe136610e54dbdd8) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] GH-122155: Fix cases generator to correctly compute 'peek' offset for ↵Mark Shannon2024-07-263-6/+17
| | | | error handling (GH-122158) (GH-122174)
* [3.13] gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271) (GH-122275)Miss Islington (bot)2024-07-251-3/+3
| | | | | (cherry picked from commit 6c09b8de5c67406113e8d082e05c9587e35a852a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] GH-121970: Rewrite the C-API annotations extension (#121985) (#122027)Adam Turner2024-07-191-8/+15
| | | | | | GH-121970: Rewrite the C-API annotations extension (#121985) Co-authored-by: Petr Viktorin <encukou@gmail.com> (cherry picked from commit 22c9d9c1fcc3bb6186524330b169eda6df450f1b)
* [3.13] Add note about PYTHON_JIT environment variable to JIT README (GH-121942)Miss Islington (bot)2024-07-171-2/+6
| | | | (cherry picked from commit f113c1a2a9d4fb2860de1bd8c05677f00fd49bd9) Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
* [3.13] GH-120371: Add WASI SDK 22 support (GH-121870) (GH-121873)Miss Islington (bot)2024-07-161-0/+8
| | | | | | | | GH-120371: Add WASI SDK 22 support (GH-121870) Required disabling stub functions now provided by wasi-libc. (cherry picked from commit f589f263bcb54332e47bfc76cbb06f775e82b778) Co-authored-by: Brett Cannon <brett@python.org>
* [3.13] gh-117657: Remove TSAN suppressions for _abc.c (GH-121508) (#121598)Miss Islington (bot)2024-07-101-2/+0
| | | | | | | The functions look thread-safe and I haven't seen any warnings issued when running the tests locally. (cherry picked from commit 7641743d48b276de88a709ad40d715b6c5d7a2ea) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-117657: Fix TSan race in _PyDict_CheckConsistency (GH-121551) ↵Miss Islington (bot)2024-07-101-8/+0
| | | | | | | | | (#121590) The only remaining race in dictobject.c was in _PyDict_CheckConsistency when the dictionary has shared keys. (cherry picked from commit 3ec719fabf936ea7a012a76445b860759155de86) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] GH-121521: Detect when wasmtime is not installed in ↵Miss Islington (bot)2024-07-091-6/+18
| | | | | | | | `Tools/wasm/wasi.py` (GH-121522) (GH-121558) GH-121521: Detect when wasmtime is not installed in `Tools/wasm/wasi.py` (GH-121522) (cherry picked from commit f62161837e68c1c77961435f1b954412dd5c2b65) Co-authored-by: Brett Cannon <brett@python.org>
* [3.13] gh-117657: Fix TSAN races in setobject.c (GH-121511) (#121541)Miss Islington (bot)2024-07-091-3/+0
| | | | | | | | The `used` field must be written using atomic stores because `set_len` and iterators may access the field concurrently without holding the per-object lock. (cherry picked from commit 9c08f40a613d9aee78de4ce4ec3e125d1496d148) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-117657: Fix data races reported by TSAN in some set methods ↵Miss Islington (bot)2024-07-011-1/+0
| | | | | | | | | | | (GH-120914) (#121240) Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed atomic loads in the free-threaded build. After this change, the TSAN doesn't report data races for this method. (cherry picked from commit 294e72496439da984cb8dba9100d3613c8cc8a6d) Co-authored-by: AN Long <aisk@users.noreply.github.com>
* [3.13] Ignore some failing tests in emulated JIT CI (GH-120977)Miss Islington (bot)2024-06-261-1/+4
| | | | (cherry picked from commit 07daaf1ce10eb6d7a5ca9ea7c9055bf571d9e57f) Co-authored-by: Diego Russo <diego.russo@arm.com>
* [3.13] gh-113993: Allow interned strings to be mortal, and fix related ↵Petr Viktorin2024-06-242-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | issues (GH-120520) (GH-120945) * 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. * For free-threaded builds, intern `_Py_LATIN1_CHR` singletons at startup. * Beef up the tests. Cover internal details (marked with `@cpython_only`). * Add lots of assertions Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] GH-120602: Support LLVM_VERSION_SUFFIX for JIT builds (GH-120768)Miss Islington (bot)2024-06-201-1/+1
| | | | | (cherry picked from commit 285f42c850da0d8ca31850088eb7b9247cbbbc71) Co-authored-by: Xarblu <xarblu@protonmail.com>
* [3.13] gh-117657: Fix `__slots__` thread safety in free-threaded build ↵Miss Islington (bot)2024-06-171-2/+0
| | | | | | | | | (GH-119368) (#120655) Fix a race in `PyMember_GetOne` and `PyMember_SetOne` for `Py_T_OBJECT_EX`. These functions implement `__slots__` accesses for Python objects. (cherry picked from commit 362cd2680b45a36c3467b9721ff7fc0ceb338452) Co-authored-by: Daniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
* [3.13] gh-117657: Fix TSan reported data race on ioctl_works (GH-120175) ↵Miss Islington (bot)2024-06-171-1/+0
| | | | | | | (#120654) (cherry picked from commit 460cc9e14e221c53c0038a847bfd411fe184ebf3) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-120433: Mention ``chocolatey`` for installing llvm on Windows as ↵Miss Islington (bot)2024-06-171-0/+6
| | | | | | | | an alternative option (GH-120434) (#120651) gh-120433: Mention ``chocolatey`` for installing llvm on Windows as an alternative option (GH-120434) (cherry picked from commit 95737bbf18765a24b6585708588c9b707dc30d27) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.13] gh-117657: Add TSAN suppression for set_default_allocator_unlocked ↵Miss Islington (bot)2024-06-141-0/+2
| | | | | | | | | | (GH-120500) (#120510) gh-117657: Add TSAN suppression for set_default_allocator_unlocked (GH-120500) Add TSAN suppression for set_default_allocator_unlocked (cherry picked from commit 2bacc2343c24c49292dea3461f6b7664fc2d33e2) Co-authored-by: AN Long <aisk@users.noreply.github.com>
* [3.13] gh-117657: Make PyType_HasFeature atomic (GH-120210) (#120443)Miss Islington (bot)2024-06-131-1/+0
| | | | | | | | gh-117657: Make PyType_HasFeature atomic (GH-120210) Make PyType_HasFeature atomic (cherry picked from commit eebae2c460dabdc70dc0d9b6e189368eb1abb716) Co-authored-by: Ken Jin <kenjin@python.org>
* [3.13] gh-71587: Drop local reference cache to `_strptime` module in ↵Miss Islington (bot)2024-06-121-1/+0
| | | | | | | | | `_datetime` (gh-120424) 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) Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
* [3.13] gh-117657: Make Py_TYPE and Py_SET_TYPE thread safe (GH-120165) ↵Miss Islington (bot)2024-06-121-2/+0
| | | | | | | | | | (GH-120403) gh-117657: Make Py_TYPE and Py_SET_TYPE thread safe (GH-120165) (cherry picked from commit e16aed63f64b18a26859eff3de976ded373e66b8) Co-authored-by: Ken Jin <kenjin@python.org> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
* [3.13] gh-117657: Fix TSAN race involving import lock (GH-118523) (#120169)Miss Islington (bot)2024-06-061-4/+0
| | | | | | | | This adds a `_PyRecursiveMutex` type based on `PyMutex` and uses that for the import lock. This fixes some data races in the free-threaded build and generally simplifies the import lock code. (cherry picked from commit e21057b99967eb5323320e6d1121955e0cd2985e) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-117657: Fix race involving GC and heap initialization (GH-119923) ↵Miss Islington (bot)2024-06-041-3/+0
| | | | | | | | | | | | | | | | | (#120038) The `_PyThreadState_Bind()` function is called before the first `PyEval_AcquireThread()` so it's not synchronized with the stop the world GC. We had a race where `gc_visit_heaps()` might visit a thread's heap while it's being initialized. Use a simple atomic int to avoid visiting heaps for threads that are not yet fully initialized (i.e., before `tstate_mimalloc_bind()` is called). The race was reproducible by running: `python Lib/test/test_importlib/partial/pool_in_threads.py`. (cherry picked from commit e69d068ad0bd6a25434ea476a647b635da4d82bb) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-117398: Use Per-Interpreter State for the _datetime Static Types ↵Miss Islington (bot)2024-06-032-0/+2
| | | | | | | | | | | (gh-120009) We make use of the same mechanism that we use for the static builtin types. This required a few tweaks. This change is the final piece needed to make _datetime support multiple interpreters. I've updated the module slot accordingly. (cherry picked from commit 105f22ea46ac16866e6df18ebae2a8ba422b7f45, AKA gh-119929) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-117657: Fix itertools.count thread safety (GH-119268) (#120007)Sam Gross2024-06-031-1/+0
| | | | | | Fix itertools.count in free-threading mode (cherry picked from commit 87939bd5790accea77c5a81093f16f28d3f0b429) Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
* [3.13] gh-117657: Fix race involving immortalizing objects (GH-119927) (#120005)Sam Gross2024-06-031-2/+0
| | | | | | | | | | | The free-threaded build currently immortalizes objects that use deferred reference counting (see gh-117783). This typically happens once the first non-main thread is created, but the behavior can be suppressed for tests, in subinterpreters, or during a compile() call. This fixes a race condition involving the tracking of whether the behavior is suppressed. (cherry picked from commit 47fb4327b5c405da6df066dcaa01b7c1aefab313)
* [3.13] gh-117657: Avoid `sem_clockwait` in TSAN (GH-119915) (#119992)Miss Islington (bot)2024-06-031-9/+0
| | | | | | | The `sem_clockwait` function is not currently instrumented, which leads to false positives. (cherry picked from commit 41c1cefbae71d687d1a935233b086473df65e15c) Co-authored-by: Sam Gross <colesbury@gmail.com>
* gh-119679: Ensures correct import libraries are included in Windows install ↵Miss Islington (bot)2024-06-031-8/+14
| | | | | | | packages (GH-119790) (cherry picked from commit fd01271366abefa8f991e53f090387882fbd6bdd) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.13] gh-117657: Fix data races report by TSAN unicode-hash (gh-119907) ↵Miss Islington (bot)2024-06-031-1/+0
| | | | | | | | (gh-119963) gh-117657: Fix data races report by TSAN unicode-hash (gh-119907) (cherry picked from commit 0594a27e5f1d87d59fa8a761dd8ca9df4e42816d) Co-authored-by: Donghee Na <donghee.na@python.org>
* [3.13] gh-117657: Fix TSAN reported race in `_PyEval_IsGILEnabled`. ↵Miss Islington (bot)2024-06-021-1/+0
| | | | | | | | | (GH-119921) (#119939) The GIL may be disabled concurrently with this call so we need to use a relaxed atomic load. (cherry picked from commit f3b89a63cbb6d46e5ed40d5cd9813cdf9189ce35) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-117657: Add TSAN suppression for `set_discard_entry` (GH-119908) ↵Miss Islington (bot)2024-06-011-0/+2
| | | | | | | | (#119914) Seen in CI occasionally when running `test_weakref`. (cherry picked from commit 7dc745d1f5d9558047a52cad5e01df7567533269) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-117657: Fix TSAN race in QSBR assertion (GH-119887) (#119904)Miss Islington (bot)2024-06-011-2/+0
| | | | | | | Due to a limitation in TSAN, all reads from `PyThreadState.state` must be atomic to avoid reported races. (cherry picked from commit 90ec19fd33e2452902b9788d4821f1fbf6542304) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-117657: Fix TSAN race in free-threaded GC (GH-119883) (#119903)Miss Islington (bot)2024-06-011-3/+0
| | | | | | | | Only call `gc_restore_tid()` from stop-the-world contexts. `worklist_pop()` can be called while other threads are running, so use a relaxed atomic to modify `ob_tid`. (cherry picked from commit 60593b2052ca275559c11028d50e19f8e5dfee13) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-97747: Improvements to WASM browser REPL. (GH-97665) (GH-119828)Miss Islington (bot)2024-05-312-8/+69
| | | | | (cherry picked from commit 010aaa32fb93c5033a698d7213469af02d76fef3) Co-authored-by: Katie Bell <katie@katharos.id.au>
* [3.13] gh-119661: Add _Py_SINGLETON() include in Argumenet Clinic (#119712) ↵Victor Stinner2024-05-291-3/+9
| | | | | | | | | | | (#119716) gh-119661: Add _Py_SINGLETON() include in Argumenet Clinic (#119712) When the _Py_SINGLETON() is used, Argument Clinic now adds an explicit "pycore_runtime.h" include to get the macro. Previously, the macro may or may not be included indirectly by another include. (cherry picked from commit 7ca74a760a5d3cdf48159f003d4db7c2778e9261)
* [3.13] gh-117398: Statically Allocate the Datetime C-API (GH-119472) (gh-119641)Eric Snow2024-05-281-0/+3
| | | | | | | This is a backport of 3 commits that go together. (cherry picked from commit a895756) (cherry picked from commit b30d30c) (cherry picked from commit a89fc26)
* gh-117505: Run ensurepip in isolated env in Windows installer (GH-118257)Miss Islington (bot)2024-05-221-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>
* [3.13] gh-119213: Be More Careful About _PyArg_Parser.kwtuple Across ↵Miss Islington (bot)2024-05-221-0/+2
| | | | | | | | | | | | | Interpreters (gh-119331) (gh-119410) _PyArg_Parser holds static global data generated for modules by Argument Clinic. The _PyArg_Parser.kwtuple field is a tuple object, even though it's stored within a static global. In some cases the tuple is statically allocated and thus it's okay that it gets shared by multiple interpreters. However, in other cases the tuple is set lazily, allocated from the heap using the active interprepreter at the point the tuple is needed. This is a problem once that interpreter is destroyed since _PyArg_Parser.kwtuple becomes at dangling pointer, leading to crashes. It isn't a problem if the tuple is allocated under the main interpreter, since its lifetime is bound to the lifetime of the runtime. The solution here is to temporarily switch to the main interpreter. The alternative would be to always statically allocate the tuple. This change also fixes a bug where only the most recent parser was added to the global linked list. (cherry picked from commit 81865002aee8eaaeb3c7e402f86183afa6de77bf) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-112844: Update CPE references for external dependencies ↵Miss Islington (bot)2024-05-201-1/+15
| | | | | | (GH-118521) (#119237) Co-authored-by: Seth Michael Larson <seth@python.org>
* [3.13] GH-118943: Fix a race condition when generating jit_stencils.h ↵Miss Islington (bot)2024-05-161-7/+12
| | | | | (GH-119101) (cherry picked from commit 4702b7b5bdc07d046576b4126cf4e4f5f7145abb)