summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* gh-116991: Improve `pygen --help` for `python` subparser (#116992)Nikita Sobolev2024-06-031-1/+4
|
* gh-117657: Fix data races report by TSAN unicode-hash (gh-119907)Donghee Na2024-06-031-1/+0
|
* gh-117657: Fix TSAN reported race in `_PyEval_IsGILEnabled`. (#119921)Sam Gross2024-06-021-1/+0
| | | | The GIL may be disabled concurrently with this call so we need to use a relaxed atomic load.
* gh-117657: Add TSAN suppression for `set_discard_entry` (#119908)Sam Gross2024-06-011-0/+2
| | | Seen in CI occasionally when running `test_weakref`.
* gh-117657: Fix TSAN race in QSBR assertion (#119887)Sam Gross2024-06-011-2/+0
| | | | Due to a limitation in TSAN, all reads from `PyThreadState.state` must be atomic to avoid reported races.
* gh-117657: Fix TSAN race in free-threaded GC (#119883)Sam Gross2024-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`.
* Bump types-psutil from 5.9.5.20240423 to 5.9.5.20240516 in /Tools (#119900)dependabot[bot]2024-06-011-1/+1
|
* build(deps-dev): bump types-setuptools from 69.5.0.20240423 to ↵dependabot[bot]2024-06-011-1/+1
| | | | 70.0.0.20240524 in /Tools (#119899)
* gh-97747: Improvements to WASM browser REPL. (#97665)Katie Bell2024-05-312-8/+69
| | | | | Improvements to WASM browser REPL. Adds a text box to write and run code outside the REPL, a stop button, and handling of Ctrl-D for EOF.
* gh-118235: Move RAISE_SYNTAX_ERROR actions to invalid rules and make sure ↵Petr Viktorin2024-05-301-0/+12
| | | | | | | | they stay there (GH-119731) The Full Grammar specification in the docs omits rule actions, so grammar rules that raise a syntax error looked like valid syntax. This was solved in ef940de by hiding those rules in the custom syntax highlighter. This moves all syntax-error alternatives to invalid rules, adds a validator that ensures that actions containing RAISE_SYNTAX_ERROR are in invalid rules, and reverts the syntax highlighter hack.
* gh-119689: generate stack effect metadata for pseudo instructions (#119691)Irit Katriel2024-05-295-20/+47
|
* gh-119661: Add _Py_SINGLETON() include in Argumenet Clinic (#119712)Victor Stinner2024-05-291-3/+9
| | | | | 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.
* gh-119396: Optimize unicode_repr() (#119617)Victor Stinner2024-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | Use stringlib to specialize unicode_repr() for each string kind (UCS1, UCS2, UCS4). Benchmark: +-------------------------------------+---------+----------------------+ | Benchmark | ref | change2 | +=====================================+=========+======================+ | repr('abc') | 100 ns | 103 ns: 1.02x slower | +-------------------------------------+---------+----------------------+ | repr('a' * 100) | 369 ns | 369 ns: 1.00x slower | +-------------------------------------+---------+----------------------+ | repr(('a' + squote) * 100) | 1.21 us | 946 ns: 1.27x faster | +-------------------------------------+---------+----------------------+ | repr(('a' + nl) * 100) | 1.23 us | 907 ns: 1.36x faster | +-------------------------------------+---------+----------------------+ | repr(dquote + ('a' + squote) * 100) | 1.08 us | 858 ns: 1.25x faster | +-------------------------------------+---------+----------------------+ | Geometric mean | (ref) | 1.16x faster | +-------------------------------------+---------+----------------------+
* gh-117557: Improve error messages when a string, bytes or bytearray of ↵Serhiy Storchaka2024-05-281-3/+22
| | | | length 1 are expected (GH-117631)
* Fix typos in comments (#119645)Xie Yanbo2024-05-283-3/+3
|
* gh-117398: Statically Allocate the Datetime C-API (GH-119472)Eric Snow2024-05-231-0/+3
|
* gh-117142: ctypes: Clean up c-analyzer .tsv files (GH-117544)neonene2024-05-222-47/+0
| | | Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-117505: Run ensurepip in isolated env in Windows installer (GH-118257)Michael Vincent2024-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.
* gh-119213: Be More Careful About _PyArg_Parser.kwtuple Across Interpreters ↵Eric Snow2024-05-221-0/+2
| | | | | | | | | (gh-119331) _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.
* gh-117657: Fix itertools.count thread safety (#119268)Arnon Yaari2024-05-211-1/+0
| | | Fix itertools.count in free-threading mode
* gh-112844: Update CPE references for external dependencies (#118521)Seth Michael Larson2024-05-201-1/+15
|
* GH-118943: Fix a race condition when generating jit_stencils.h (GH-118957)Brandt Bucher2024-05-161-7/+12
|
* Explain how to install LLVM on Fedora (GH-118983)Miro Hrončok2024-05-161-0/+6
| | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* GH-118836: Fix JIT build error when SHT_NOTE section is present (GH-119000)Michał Górny2024-05-131-0/+1
|
* gh-117657: Log TSAN warnings to separate files and archive them (#118747)mpage2024-05-101-0/+3
| | | | | | | This ensures we don't lose races that occur in subprocesses or interleave races from workers running in parallel. Log files are collected and packaged into a zipfile that can be downloaded from the "Artifacts" section of the workflow run.
* GH-118910: Less boilerplate in the tier 2 optimizer (#118913)Mark Shannon2024-05-101-3/+0
|
* gh-117657: Fix QSBR race condition (#118843)Alex Turner2024-05-101-1/+0
| | | | | | `_Py_qsbr_unregister` is called when the PyThreadState is already detached, so the access to `tstate->qsbr` isn't safe without locking the shared mutex. Grab the `struct _qsbr_shared` from the interpreter instead.
* gh-117657: Fix data races reported by TSAN on `interp->threads.main` (#118865)mpage2024-05-101-2/+0
| | | Use relaxed loads/stores when reading/writing to this field.
* gh-117657: Replace TSAN suppresions with more specific rules (#118722)Brett Simmers2024-05-091-24/+81
| | | | | | | | | Using `race:` filters out warnings if the function appears anywhere in the stack trace. This can hide a lot of unrelated warnings, especially for a function like `_PyEval_EvalFrameDefault`, which is somewhere on the stack more often than not. Change all free-threaded suppressions to `race_top:`, which only matches the top frame, and add any new suppressions this exposes.
* gh-117657: Fix data races when writing / reading `ob_gc_bits` (#118292)mpage2024-05-081-3/+0
| | | | | Use relaxed atomics when reading / writing to the field. There are still a few places in the GC where we do not use atomics. Those should be safe as the world is stopped.
* gh-118671: Updated dead ActiveState links (#118730)trag1c2024-05-081-2/+2
| | | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-118518: Allow perf to work without frame pointers (#112254)Pablo Galindo Salgado2024-05-051-0/+2
|
* build(deps): bump hypothesis from 6.100.0 to 6.100.2 in /Tools (#118462)dependabot[bot]2024-05-041-1/+1
| | | | | Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.100.0 to 6.100.2. - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.100.0...hypothesis-python-6.100.2)
* gh-74929: Implement PEP 667 (GH-115153)Tian Gao2024-05-041-0/+1
|
* gh-111997: C-API for signalling monitoring events (#116413)Irit Katriel2024-05-041-0/+1
|
* GH-113464: Generate a more efficient JIT (GH-118512)Brandt Bucher2024-05-032-81/+142
|
* gh-117657: Disable the function/code cache in free-threaded builds (#118301)mpage2024-05-031-1/+0
| | | | This is only used by the specializing interpreter and the tier 2 optimizer, both of which are disabled in free-threaded builds.
* GH-118251: Skip fewer test in emulated JIT CI (GH-118536)Savannah Ostrowski2024-05-031-0/+79
|
* GH-118487: Add Black to `.pre-commit-config.yaml` for JIT files (GH-118537)Savannah Ostrowski2024-05-031-2/+9
|
* gh-116126: Implement PEP 696 (#116129)Jelle Zijlstra2024-05-031-0/+2
| | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-116738: Make `_codecs` module thread-safe (#117530)Brett Simmers2024-05-021-1/+1
| | | | | | | | | | | | | | | The module itself is a thin wrapper around calls to functions in `Python/codecs.c`, so that's where the meaningful changes happened: - Move codecs-related state that lives on `PyInterpreterState` to a struct declared in `pycore_codecs.h`. - In free-threaded builds, add a mutex to `codecs_state` to synchronize operations on `search_path`. Because `search_path_mutex` is used as a normal mutex and not a critical section, we must be extremely careful with operations called while holding it. - The codec registry is explicitly initialized as part of `_PyUnicode_InitEncodings` to simplify thread-safety.
* GH-117442: Check eval-breaker at start (rather than end) of tier 2 loops ↵Mark Shannon2024-05-021-1/+0
| | | | (GH-118482)
* gdb/libpython.py: Update PyLongObjectPtr docstring (GH-118438)Andrej2024-05-021-6/+10
|
* GH-113464: Display a warning when building the JIT (GH-118481)Brandt Bucher2024-05-016-26/+38
|
* build(deps-dev): bump types-psutil from 5.9.5.20240316 to 5.9.5.20240423 in ↵dependabot[bot]2024-05-011-1/+1
| | | | | | /Tools (#118464) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump types-setuptools from 69.2.0.20240317 to 69.5.0.20240423 in /Tools ↵dependabot[bot]2024-05-011-1/+1
| | | | | | (#118463) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump mypy from 1.9.0 to 1.10.0 in /Tools (#118461)dependabot[bot]2024-05-011-1/+1
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* GH-115802: Use the GHC calling convention in JIT code (GH-118287)Brandt Bucher2024-05-014-11/+76
|
* gh-118335: Configure Tier 2 interpreter at build time (#118339)Guido van Rossum2024-05-012-3/+4
| | | | | | | | | | | | | | | | | | | | | | 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-116122: Add SBOM generation to PCbuild/build.bat (GH-116138)Seth Michael Larson2024-04-301-3/+18
|