Commit Graph

4401 Commits

Author SHA1 Message Date
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) b5eed8c80e
[3.13] Merge TSAN test matrices in CI (#123278) (#129673) 2025-02-06 15:37:22 +02:00
Miss Islington (bot) fcb265671c
[3.13] gh-129438: Update ``--enable-experimental-jit`` section with install requirements (GH-129450) (#129472)
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>
2025-01-30 10:22:05 +00:00
Miss Islington (bot) e1900db82d
[3.13] Replace `strict_concatenate = True` with `extra_checks = True` (GH-126391) (#129286)
Replace `strict_concatenate = True` with `extra_checks = True` (GH-126391)
(cherry picked from commit cc4f0a2770)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-01-25 09:45:22 +00:00
Miss Islington (bot) 32012ed3bc
[3.13] gh-109413: Add more type hints to `libregrtest` (GH-126352) (#126388)
gh-109413: Add more type hints to `libregrtest` (GH-126352)
(cherry picked from commit bfc1d2504c)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-01-08 09:00:46 +00:00
Miss Islington (bot) 883cb23dd1
[3.13] gh-128152: Argument Clinic: ignore pre-processor directives inside C comments (GH-128464) (#128478)
(cherry picked from commit a4e773c540)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-04 11:09:25 +00:00
Peter Bierma 3a8bdaf698
[3.13] gh-128083: Fix macro redefinition warning in clinic. (GH-127950) (#128102)
(cherry picked from commit b5d1e4552f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-12-19 21:29:14 +00:00
Miss Islington (bot) dddea7c232
[3.13] gh-122907: Fix Builds Without HAVE_DYNAMIC_LOADING Set (gh-122952) (#122984)
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>
2024-12-03 16:46:30 +00:00
Peter Bierma a442c87c4c
[3.13] gh-127341: Argument Clinic: fix compiler warnings for getters with docstrings (GH-127310) (#127431)
(cherry picked from commit 99490913a0)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-11-30 23:25:51 +01:00
Miss Islington (bot) c54b9ae199
[3.13] summarize: Fix typo in stats (GH-127450) (#127454)
Co-authored-by: alm <alonme@users.noreply.github.com>
2024-11-30 16:32:13 +00:00
Miss Islington (bot) 4cba0e66c2
[3.13] gh-127303: Add docs for token.EXACT_TOKEN_TYPES (GH-127304) (#127390)
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>
2024-11-30 08:13:13 +00:00
Victor Stinner 9187ac3f2d
[3.13] gh-126316: Make grp.getgrall() thread-safe: add a mutex (#127055) (#127104)
* 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).
2024-11-26 12:01:50 +01:00
Miss Islington (bot) 3227680d2d
gh-118973: Add _tkinter to freethreaded MSI (GH-126768)
(cherry picked from commit 9332a6f825)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-11-15 13:10:07 +00:00
Miss Islington (bot) bf40fdbff1
[3.13] gh-126807: pygettext: Do not attempt to extract messages from function definitions. (GH-126808) (GH-126846)
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>
2024-11-14 22:43:33 +00:00
Miss Islington (bot) 1d6ba84ecb
[3.13] gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792) (GH-126796)
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>
2024-11-13 18:56:17 +00:00
Miss Islington (bot) 6cefffcdee
[3.13] gh-126525: Fix `makeunicodedata.py` output on macOS and Windows (GH-126526) (#126725)
gh-126525: Fix `makeunicodedata.py` output on macOS and Windows (GH-126526)
(cherry picked from commit f223efb2a2)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-11-12 10:48:55 +00:00
Miss Islington (bot) b1a406d923
gh-126497: Add missing venv redirectors to freethreaded installer (GH-126556)
(cherry picked from commit fd5580cd15)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-11-08 16:33:54 +00:00
Brett Cannon 9ecaee6a55
[3.13] GH-123877: make `wasm32-wasip1` the target triple for WASI (#126561) 2024-11-07 16:16:12 -08:00
Erlend E. Aasland 9dd3addc0c
[3.13] gh-89640: harden float word ordering (#125571 and #126387) (#126429)
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)
2024-11-05 23:18:55 +01:00
Miss Islington (bot) d24ea899e8
[3.13] gh-124612: Use ghcr.io/python/autoconf instead of public image (GH-124657) (#126183)
(cherry picked from commit b502573f7f)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-10-30 14:19:15 +00:00
Miss Islington (bot) 014d0ee341
[3.13] gh-125741: Update `build.yml` for the new check_autoconf_regen job (GH-125772) (#125779)
(cherry picked from commit f36d37bbaf)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-21 11:18:44 +00:00
Kirill Podoprigora 3fda8a8246
[3.13] CI: Bump Python to 3.13 and mypy to 1.12 in mypy workflow (GH-… (#125596)
[3.13] CI: Bump Python to 3.13 and mypy to 1.12 in mypy workflow (GH-125592)

(cherry picked from commit d83fcf8371)
2024-10-16 15:31:00 +00:00
Miss Islington (bot) cc1892d3cf
[3.13] GH-121634: have `wasi.py` accept the host target triple as an argument (GH-123030) (GH-123042)
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>
2024-10-10 17:44:31 +00:00
Victor Stinner d432fa43b9
[3.13] Fix typos (#123775) (#123866)
Fix typos (#123775)

(cherry picked from commit 9017b95ff2)

Co-authored-by: algonell <algonell@gmail.com>
2024-10-07 23:44:31 +02:00
Miss Islington (bot) 3fd3b8a678
[3.13] gh-123915: Ensure that Windows AMD64 and ARM64 release builds use different directories (GH-123918) (#123921)
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>
2024-09-29 18:25:09 -07:00
Miss Islington (bot) 612e469624
[3.13] gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893) (#123896)
gh-123892: Add "_wmi" to sys.stdlib_module_names (GH-123893)
(cherry picked from commit fb1b51a58d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-09-29 18:24:55 -07:00
Miss Islington (bot) 7f101dcfeb
[3.13] gh-124254: Detect freethreaded MSI component when doing an upgrade on Windows (GH-124279) (#124347)
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>
2024-09-29 18:06:11 -07:00
Miss Islington (bot) de8dc92db7
[3.13] gh-123880: Allow recursive import of single-phase-init modules (GH-123950) (#124273)
gh-123880: Allow recursive import of single-phase-init modules (GH-123950)

(cherry picked from commit aee219f455)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
2024-09-23 12:56:00 -07:00
Miss Islington (bot) ad944b5e1f
[3.13] gh-123700: Update OpenSSL versions in multissltests and CI (GH-123702)
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>
2024-09-04 16:31:01 -05:00
Miss Islington (bot) e3b4564f6c
[3.13] gh-123418: Update CI to use fresh OpenSSL releases (GH-123696)
Also adds openssl/openssl GitHub URL template for newer OpenSSL downloads
(cherry picked from commit 56b00f4705)

Co-authored-by: Zachary Ware <zach@python.org>
2024-09-04 14:33:56 -05:00
Miss Islington (bot) f8124237e7
[3.13] gh-123458: Skip SBOM generation if no git repository is detected (GH-123507) (#123616)
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>
2024-09-03 01:15:48 +02:00
Hugo van Kemenade 7b453ad74e
[3.13] build(deps): bump hypothesis from 6.108.10 to 6.111.2 in /Tools (GH-123567) (#123591)
(cherry picked from commit 88210c295d)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 13:20:09 +02:00
Serhiy Storchaka 8b6dd92db7
[3.13] gh-122688: Fix support of var-positional parameter in Argument Clinic (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 8393608dd9)
2024-09-02 13:03:04 +02:00
Miss Islington (bot) 5148e03f0f
[3.13] GH-121723: Skip test_config_queue_handler_multiprocessing_context in emulated JIT CI (GH-122991)
(cherry picked from commit 7b8328b6b3)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-08-22 13:16:52 -07:00
Miss Islington (bot) 27a5292774
[3.13] GH-118943: Handle races when moving jit_stencils.h (GH-122709)
(cherry picked from commit 44659d3927)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-08-08 13:37:49 -07:00
Miss Islington (bot) 35bf9c62b1
[3.13] Fix syntax in generate_re_casefix.py (GH-122699) (#122721)
This was broken in gh-97963.
(cherry picked from commit b72c748d7f)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-08-06 06:46:14 +00:00
Miss Islington (bot) 8e96d85386
[3.13] gh-117657: Avoid race in `PAUSE_ADAPTIVE_COUNTER` in free-threaded 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 2b163aa9e7)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-30 18:18:25 +00:00
Miss Islington (bot) e122d2adfa
[3.13] gh-122044: Don't error during gitignore filtering with no files (GH-122045) (#122355)
Co-authored-by: Seth Michael Larson <seth@python.org>
2024-07-27 14:34:08 +00:00
Miss Islington (bot) 9d5dde5006
[3.13] gh-122201: Lock mutex when setting handling_thread to NULL (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 c557ae97d6)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-26 17:30:08 +00:00
Mark Shannon 9162da254a
[3.13] GH-122155: Fix cases generator to correctly compute 'peek' offset for error handling (GH-122158) (GH-122174) 2024-07-26 10:51:42 +01:00
Miss Islington (bot) 83bfc5bd8b
[3.13] gh-122270: Fix typos in the Py_DEBUG macro name (GH-122271) (GH-122275)
(cherry picked from commit 6c09b8de5c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-25 11:29:22 +00:00
Adam Turner c12f81ed82
[3.13] GH-121970: Rewrite the C-API annotations extension (#121985) (#122027)
GH-121970: Rewrite the C-API annotations extension (#121985)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit 22c9d9c1fc)
2024-07-19 13:03:52 +00:00
Miss Islington (bot) a12c105908
[3.13] Add note about PYTHON_JIT environment variable to JIT README (GH-121942)
(cherry picked from commit f113c1a2a9)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-07-17 22:18:39 +00:00
Miss Islington (bot) 2e34591f1b
[3.13] GH-120371: Add WASI SDK 22 support (GH-121870) (GH-121873)
GH-120371: Add WASI SDK 22 support (GH-121870)

Required disabling stub functions now provided by wasi-libc.
(cherry picked from commit f589f263bc)

Co-authored-by: Brett Cannon <brett@python.org>
2024-07-16 14:49:55 -07:00
Miss Islington (bot) 85e9018a01
[3.13] gh-117657: Remove TSAN suppressions for _abc.c (GH-121508) (#121598)
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>
2024-07-10 21:34:14 +00:00
Miss Islington (bot) 927f882d76
[3.13] gh-117657: Fix TSan race in _PyDict_CheckConsistency (GH-121551) (#121590)
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>
2024-07-10 18:28:44 +00:00
Miss Islington (bot) 3824dc9fa3
[3.13] GH-121521: Detect when wasmtime is not installed in `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 f62161837e)

Co-authored-by: Brett Cannon <brett@python.org>
2024-07-09 22:31:39 +00:00
Miss Islington (bot) f0d16f7e82
[3.13] gh-117657: Fix TSAN races in setobject.c (GH-121511) (#121541)
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>
2024-07-09 16:36:36 +00:00
Miss Islington (bot) 06fd745dd9
[3.13] gh-117657: Fix data races reported by TSAN in some set methods (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 294e724964)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-07-01 19:40:28 +00:00
Miss Islington (bot) 7db14f1eba
[3.13] Ignore some failing tests in emulated JIT CI (GH-120977)
(cherry picked from commit 07daaf1ce1)
Co-authored-by: Diego Russo <diego.russo@arm.com>
2024-06-26 06:56:15 -07:00
Petr Viktorin 9769b7ae06
[3.13] gh-113993: Allow interned strings to be mortal, and fix related 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>
2024-06-24 20:24:19 +02:00