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 — bpo-20490: Improve circular import error messaging by asottile · Pull Request #15308 · python/cpython Conversation
|
|
This is largely based on the work in https://bugs.python.org/issue33237 by @serhiy-storchaka #6398 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
demo$ tail -n999 a/*.py ==> a/b.py <== from a.c import d e = 1 ==> a/c.py <== from a.b import e d = 1 ==> a/__init__.py <== before$ python3.8 -c 'import a.b' Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/x/a/b.py", line 1, in <module> from a.c import d File "/tmp/x/a/c.py", line 1, in <module> from a.b import e ImportError: cannot import name 'e' from 'a.b' (/tmp/x/a/b.py) after$ ~/workspace/cpython/python -c 'import a.b' Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/x/a/b.py", line 1, in <module> from a.c import d File "/tmp/x/a/c.py", line 1, in <module> from a.b import e ImportError: cannot import name 'e' from 'a.b' (partially initialized module -- most likely due to a circular import) (/tmp/x/a/b.py) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for working on this @asottile ! If this old idea will come true, that'd be cool. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
3d72f86 to
550209c
Compare
d56ddb9 to
e7b41f9
Compare
5d18cf9 to
efacf0f
Compare
|
(I'm rebasing to presumably fix the CI failure -- it doesn't seem related to my change, but I've been surprised before by macos 😆) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
efacf0f to
6ac3cf1
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
6ac3cf1 to
5feaa0c
Compare
|
Sorry @asottile and @zooba, I had trouble checking out the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-15791 is a backport of this pull request to the 3.8 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
This pull request introduced a reference leak: https://buildbot.python.org/all/#/builders/1/builds/710 This is being tracked in: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.