GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [3.15] Re-entrant calls to `site.addsitedir()` can fail (affecting uv run) · Issue #149504 · python/cpython Closed Labels stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:I found a regression in Python 3.15’s This was originally observed with import site; site.addsitedir("/path/to/overlay/site-packages"); site.addsitedir("/usr/local/lib/python3.15/site-packages") But the issue can be reproduced without uv. Environment Minimal Reproducer mkdir -p /tmp/site-repro/root /tmp/site-repro/overlay printf 'import site; site.addsitedir("/tmp/site-repro/overlay")\n' > /tmp/site-repro/root/reenter.pth python3.15 -S -c 'import site; site.addsitedir("/tmp/site-repro/root"); print("done")' Expected Behavior The Actual Behavior Python repeatedly processes the same In startup contexts, such as Likely Cause In
def _exec_imports(): for filename, imports in _pending_importexecs.items(): ... for line in imports: exec(line) If one of those Real-World Trigger With uv 0.11.7: uv run --python /Users/jelle/py/cpython/python.exe --with iniconfig python -c 'import iniconfig'fails before user code runs because uv’s ephemeral overlay Plain CPython versions tested on:3.15 Operating systems tested on:macOS Linked PRsActivity
MetadataMetadataAssigneesLabelsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |