gh-129438: Update ``--enable-experimental-jit`` section with install requirements (GH-129450)
Add a note to the `JIT` docs that building CPython with `JIT` requires Python 3.11 or newer.
(cherry picked from commit 652f66ac38)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
gh-122907: Fix Builds Without HAVE_DYNAMIC_LOADING Set (gh-122952)
As of 529a160 (gh-118204), building with HAVE_DYNAMIC_LOADING stopped working. This is a minimal fix just to get builds working again. There are actually a number of long-standing deficiencies with HAVE_DYNAMIC_LOADING builds that need to be resolved separately.
(cherry picked from commit ee1b8ce26e)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
gh-127303: Add docs for token.EXACT_TOKEN_TYPES (GH-127304)
---------
(cherry picked from commit dd3a87d2a8)
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>
* gh-126316: Make grp.getgrall() thread-safe: add a mutex (#127055)
grpmodule.c is no longer built with the limited C API, since PyMutex
is excluded from the limited C API.
(cherry picked from commit 3c2bd66e21)
* Revert ABI changes
Don't use Argument Clinic for grp.getgrgid() to avoid changing the
ABI (change PyInterpreterState structure by adding an "id"
identifier).
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 9a456383be)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
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 3c99969094)
Co-authored-by: Seth Michael Larson <seth@python.org>
gh-126525: Fix `makeunicodedata.py` output on macOS and Windows (GH-126526)
(cherry picked from commit f223efb2a2)
Co-authored-by: sobolevn <mail@sobolevn.me>
Properly detect float word ordering on Linux (gh-125571)
autoconf-archive patch by Dan Amelang.
(cherry picked from commit 26d627779f)
Hardcode WASM float word ordering to little endian (gh-126387)
(cherry picked from commit 532fc08102)
GH-121634: have `wasi.py` accept the host target triple as an argument (GH-123030)
(cherry picked from commit b15b81ed4f)
Co-authored-by: Brett Cannon <brett@python.org>
gh-123915: Ensure that Windows AMD64 and ARM64 release builds use different directories (GH-123918)
(cherry picked from commit 00ffdf2736)
Co-authored-by: adang1345 <adang1345@gmail.com>
gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893)
(cherry picked from commit fb1b51a58d)
Co-authored-by: Victor Stinner <vstinner@python.org>
gh-124254: Detect freethreaded MSI component when doing an upgrade on Windows (GH-124279)
(cherry picked from commit df7228ce14)
Co-authored-by: Steve Dower <steve.dower@python.org>
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 d83e30cadd)
Co-authored-by: Zachary Ware <zach@python.org>
Also adds openssl/openssl GitHub URL template for newer OpenSSL downloads
(cherry picked from commit 56b00f4705)
Co-authored-by: Zachary Ware <zach@python.org>
gh-123458: Skip SBOM generation if no git repository is detected (GH-123507)
(cherry picked from commit db42934270)
Co-authored-by: Seth Michael Larson <seth@python.org>
* 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 8393608dd9)
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 2b163aa9e7)
Co-authored-by: Sam Gross <colesbury@gmail.com>
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 c557ae97d6)
Co-authored-by: Sam Gross <colesbury@gmail.com>
The functions look thread-safe and I haven't seen any warnings issued
when running the tests locally.
(cherry picked from commit 7641743d48)
Co-authored-by: Sam Gross <colesbury@gmail.com>
The only remaining race in dictobject.c was in _PyDict_CheckConsistency
when the dictionary has shared keys.
(cherry picked from commit 3ec719fabf)
Co-authored-by: Sam Gross <colesbury@gmail.com>
GH-121521: Detect when wasmtime is not installed in `Tools/wasm/wasi.py` (GH-121522)
(cherry picked from commit f62161837e)
Co-authored-by: Brett Cannon <brett@python.org>
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 9c08f40a61)
Co-authored-by: Sam Gross <colesbury@gmail.com>
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 294e724964)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
* 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>