Skip to content

[pull] main from python:main - #1337

Merged
pull[bot] merged 4 commits into
tj-python:mainfrom
python:main
Aug 3, 2026
Merged

[pull] main from python:main#1337
pull[bot] merged 4 commits into
tj-python:mainfrom
python:main

Conversation

@pull

@pull pull Bot commented Aug 3, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

LindaSummer and others added 4 commits August 3, 2026 15:20
Re-apply GH-154858, which was reverted in GH-154992 because it broke the
reference leak buildbots.

``atexit.register(_clear_caches)`` runs on every import of ``typing``, and the
registered handler reaches the module dict through ``_clear_caches.__globals__``.
Any throwaway copy of ``typing`` therefore stays alive until interpreter
shutdown. Two tests create such a copy on each iteration:

- ``InternalsTests.test_collect_parameters`` imports a fresh ``typing``.
- ``CollectionsAbcTests.test_bytestring`` drops ``typing`` from ``sys.modules``
  and re-imports it.

Both now unregister the exit handler of the copy they created.
@pull pull Bot locked and limited conversation to collaborators Aug 3, 2026
@pull pull Bot added the ⤵️ pull label Aug 3, 2026
@pull
pull Bot merged commit 1617cbe into tj-python:main Aug 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants