-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
gh-136264: Fix --relative-paths
for PEP 739's build-details.json
#138510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like CI is unhappy
Co-authored-by: Itamar Oren <[email protected]>
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 <[email protected]> Co-authored-by: Itamar Oren <[email protected]>
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 <[email protected]> Co-authored-by: Itamar Oren <[email protected]> * Update test_build_details.py * Update Lib/test/test_build_details.py --------- Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Itamar Oren <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
….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 <[email protected]>
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
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.