Skip to content

[3.15] Restore deferred backports for 3.15.1, including GH-158874 - #158882

Open
pablogsal wants to merge 15 commits into
python:3.15from
pablogsal:restore-backports-3.15.1-20261005
Open

pablogsal wants to merge 15 commits into
python:3.15from
pablogsal:restore-backports-3.15.1-20261005

Conversation

@pablogsal

Copy link
Copy Markdown
Member

No description provided.

miss-islington and others added 14 commits October 5, 2026 20:57
…walks iterative and bounded (pythonGH-153365) (python#158813)

pythongh-153364: Make frame, coroutine, and task-waiter chain walks iterative and bounded (pythonGH-153365)

* let me declare single limit

* use our new limit in process_frame_chain()

* add it in parse_async_frame_chain()

* parse_coro_chain()

* NEWS

* async in the message?

* test

* no race

* process_task_awaited_by

* process_task_awaited_by limit test

* NEWS

* MAX_TASK_WAITER_CHAIN_DEPTH

* TASK_WAITER_CHAIN_DEPTH in test

* TASK_WAITER_CHAIN_DEPTH 256

* prevent the drift with the comment

* better naming, better style

* MAX_TASK_WAITER_CHAIN_DEPTH comment

* task-waiter iterative bfs walk

* iterative coro-walk

* nicer news

* 1 << 14

* comment

* unused read_Py_ssize_t

* fix tombstones

* simplify

* correct msg

* better test

* news for tombstones

* left-over from when testing buggy version

* redundant new line
(cherry picked from commit e0861c6)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
(cherry picked from commit 9e401cf)
…reads (pythonGH-155828) (python#158829)

* update_seq

* no need for XCHGL, MOVL is enough?

* pythongh-155811: Retry an inconsistent GC snapshot once

---------
(cherry picked from commit 5fecd44)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 0281240)
…y file when hitting `OverflowError` (pythonGH-152892) (python#158830)

pythongh-151292: `_remote_debugging`: Do not corrupt the binary file when hitting `OverflowError` (pythonGH-152892)

* the kolektor

* test

* better test

* news

* =Q, move const to the base, not self.running

* pythongh-151292: Track binary writer finalization state

---------
(cherry picked from commit f839c06)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
(cherry picked from commit 8a7c23f)
…x() (pythonGH-158584) (python#158691)

pythongh-158583: Fix uninitialized memory read in bytes.fromhex() (pythonGH-158584)
(cherry picked from commit 9d22a53)

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 4f7af46)
…the sample (pythonGH-154195) (python#158831)

* pythongh-154194: Degrade frames in Tachyon instead of failing the sample (python#154195)

* degrade gracefully

* news

* better NEWS wording

* do not raise on MAX_REMOTE_STR_READ

* bye MAX_REMOTE_STR_READ

* fix -m asyncio ps|pstree

* test truncation and linetable sentinel

* simpler

* simpler

* redundant now

* respect python#157790 in the news

---------

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
(cherry picked from commit 7d25916)

* Preserve the stable ABI when creating fallback frame names

---------

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
(cherry picked from commit c27f494)
Run a job that the test suite with MSan to the CI (python#158625)

* Run the test suite with MSan in CI

* Additional fixes

* Add `_Py_MSAN_UNPOISON_STRING`

* Apply Victor's suggestions

* Apply Victor's suggestions

---------

(cherry picked from commit b93fb19)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Victor Stinner <victor.stinner@gmail.com>
(cherry picked from commit 1bc78de)
…s UTF-8 (pythonGH-156811) (python#156814)

pythongh-156810: Write the profiler's collapsed-stack export as UTF-8 (pythonGH-156811)
(cherry picked from commit c3706f4)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
(cherry picked from commit fce28da)
…ocking sampling (pythonGH-158802) (python#158845)

pythongh-158552: Wait for Windows threads to suspend before blocking sampling (pythonGH-158802)

* pythongh-158552: Wait for Windows threads to suspend before blocking sampling

* Use a named Windows thread enumeration status constant
(cherry picked from commit 1643525)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
(cherry picked from commit 31288da)
…g binary reader (pythonGH-152722) (python#158850)

Backport of pythonGH-152722.

Co-authored-by: tonghuaroot <tonghuaroot@gmail.com>
(cherry picked from commit ebaca2a)
…y recursive programs (pythonGH-156546) (python#158851)

Backport of pythonGH-156546.

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
(cherry picked from commit 0ac7217)
…th (pythonGH-158548) (python#158844)

pythongh-158540: Add the profiled script's directory to sys.path (pythonGH-158548)

* pythongh-158540: Add the profiled script's directory to sys.path

When a script is profiled with ``python -m profiling.sampling run
script.py`` from another directory, the script cannot import modules
placed next to it, because ``_sync_coordinator._execute_script()``
executes it with the working directory (added by
``_setup_environment()`` for the module case) as ``sys.path[0]``
instead of the script's own directory.

Make the script's directory importable in ``_execute_script()``,
matching the behavior of ``python script.py``.

Add a regression test that runs the coordinator on a script importing
a sibling module.

* Update _sync_coordinator.py Comment simplified

* pythongh-158540: Resolve symlinks when adding the script directory to sys.path

``python script.py`` resolves symlinks when computing ``sys.path[0]``, so
a script reached through a symlink (``link.py -> sub/where.py``) imports
modules from the real script's directory.  Apply ``os.path.realpath()``
before taking the directory name, and make sure the result is placed at
the front of ``sys.path`` even if it was already listed.

Add a regression test for a symlinked script.

---------
(cherry picked from commit 3f02aab)

Co-authored-by: he_tao <53343436+hetaozdh@users.noreply.github.com>
Co-authored-by: Eduardo Villalpando Mello <eduardo.villalpando.mello@gmail.com>
(cherry picked from commit f52d831)
…exporter (pythonGH-153839) (python#158853)

Backport of pythonGH-153839.

Co-authored-by: tonghuaroot <tonghuaroot@gmail.com>
(cherry picked from commit 48998df)
…tors/coroutines (pythonGH-158581) (python#158852)

* [3.15] pythongh-158539: Fix exception mode missing handlers in generators/coroutines (pythonGH-158581)

Backport of pythonGH-158581.

Co-authored-by: LucasZhou <donghao.zhou@outlook.com>

* [3.15] pythongh-158539: Use portable static assertion messages

* [3.15] pythongh-158539: Keep layout assertions with debug-offset validation

* [3.15] pythongh-158539: Use the platform guard for in-process inspection tests

---------

Co-authored-by: LucasZhou <donghao.zhou@outlook.com>
(cherry picked from commit d625ecb)
…e recurses (pythonGH-158526) (python#158870)

Co-authored-by: Timofei Ivankov <128279579+deadlovelll@users.noreply.github.com>
(cherry picked from commit a904b39)
… C stacks and macOS runtime lookup (python#158874)

(cherry picked from commit 114de19)

Include the C-stack test helper from main, introduced by
ce5ae29, which the regression test
requires but 3.15 does not yet provide.
@pablogsal
pablogsal force-pushed the restore-backports-3.15.1-20261005 branch from 8218b62 to 82b7d1f Compare October 5, 2026 20:00
@read-the-docs-community

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants