bpo-43105: Importlib now resolves relative paths when creating module spec objects from file locations#25121
Conversation
|
That's all I'm getting done for now, will probably have to fix more tests. Definitely needs updated whatsnew docs, because this is a more impactful change than just having imports succeed with relative paths in sys.path, but I think it's for the best. |
|
Do you think changes to For resolving bpo-43105 in 3.8, |
|
Git is getting really messed up here, I'm going to do a reset and rebase to make sure I only have my changes in here. |
|
Assuming all the tests pass, this change doesn't affect ntpath and so can be backported. Then I can easily add the ntpath changes back separately (later, because they rely on the changes in here). |
|
The Azure Pipelines failure is the flaky asyncio test, so unless @eryksun spots something in the next hour or so, I'm going to hit merge. |
|
Thanks @zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
|
Sorry, @zooba, I could not cleanly backport this to |
|
Sorry @zooba, I had trouble checking out the |
… spec objects from file locations (pythonGH-25121)
|
GH-25237 is a backport of this pull request to the 3.9 branch. |
… spec objects from file locations (GH-25121)
… spec objects from file locations (pythonGH-25121)
… spec objects from file locations (GH-25121)
|
@zooba It is a shame there are no direct tests of Adding a new method to |
…g module spec objects from file locations (pythonGH-25121)" This reverts commit 04732ca.
…g module spec objects from file locations (pythonGH-25121)" This reverts commit 0af99b4.
…g module spec objects from file locations (pythonGH-25121)" This reverts commit eed7686.
Summary: This upstream PR (python/cpython#25121) makes all module paths (e.g. in code object `co_filename`) absolute instead of relative. That currently breaks PyPerf, so we could temporarily land this revert to accelerate 3.10 rollout without waiting for another PyPerf rollout. Reviewed By: itamaro Differential Revision: D42463507 fbshipit-source-id: 73dacb2
…g module spec objects from file locations (pythonGH-25121)" This reverts commit 04732ca.
…g module spec objects from file locations (pythonGH-25121)" This reverts commit 04732ca.
…g module spec objects from file locations (pythonGH-25121)" This reverts commit 04732ca.
…g module spec objects from file locations (pythonGH-25121)" This reverts commit 04732ca.
https://bugs.python.org/issue43105