Uh oh!
There was an error while loading. Please reload this page.
gh-136264: Fix --relative-paths for PEP 739's build-details.json - #138510
Conversation
* KeyError is not raised for defaultdict * Fix relative paths on different drives on Windows * Add a round-trip test
--relative-paths for PEP 739's build-details.json--relative-paths for PEP 739's build-details.jsonUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Itamar Oren <itamarost@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
….json (pythonGH-138510) * KeyError is not raised for defaultdict * Fix relative paths on different drives on Windows * Add a round-trip test (cherry picked from commit 057ee17) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Itamar Oren <itamarost@gmail.com>
GH-138638 is a backport of this pull request to the 3.14 branch. |
…s.json (GH-138510) (#138638) * gh-136264: Fix ``--relative-paths`` for PEP 739's build-details.json (GH-138510) * KeyError is not raised for defaultdict * Fix relative paths on different drives on Windows * Add a round-trip test (cherry picked from commit 057ee17) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Itamar Oren <itamarost@gmail.com> * Update test_build_details.py * Update Lib/test/test_build_details.py --------- Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Itamar Oren <itamarost@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
….json (python#138510) * KeyError is not raised for defaultdict * Fix relative paths on different drives on Windows * Add a round-trip test Co-authored-by: Itamar Oren <itamarost@gmail.com>
DinoV
commented
Sep 11, 2025
Hey @AA-Turner we may be a special snowflake here but the |
Hmm, does this pattern reproduce generally, or is it just specific to this test? If the former, I'm inclined to think it might be a bug in Cinder. Will return to consider this tonight (UK time). A |
Summary: An upstream change uses importlib.util after only importing importlib: python/cpython#138510 In normal CPython this gets mported via runpy so it pretty much always available. In our dev environment we don't import it, so this just makes sure it gets imported for test purposes. Reviewed By: yoney Differential Revision: D82228954 fbshipit-source-id: 86e1cd776d2a3819ffff9c6069613d141ab88dd1
DinoV
commented
Sep 12, 2025
I'm not sure how to trigger it on stock CPython which is why I just started the discussion rather than opening an issue. But generally "import foo" followed by using a subpackage of foo without importing it is a bit of an anti-pattern - it's relying on someone else having imported the subpackage earlier. In my (limited) experiments importlib.util was either being imported via pyrepl (normal startup path) or runpy (doing python -c "import importlib; print(dir(importlib))". I didn't dig past that and just made sure we have it imported. There may be some other embedding scenarios but maybe not too many running the test suite! |
Uh oh!
There was an error while loading. Please reload this page.