This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年10月15日 20:28 by pitrou, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg145606 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年10月15日 20:28 | |
This is, to say the least, annoying. $ mkdir mypackage $ touch mypackage/__init__.py $ echo "from . import b" > mypackage/a.py $ echo "from . import a" > mypackage/b.py $ ./python -c "import mypackage.a" Traceback (most recent call last): File "<string>", line 1, in <module> File "mypackage/a.py", line 1, in <module> from . import b File "mypackage/b.py", line 1, in <module> from . import a ImportError: cannot import name a |
|||
| msg145613 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2011年10月16日 06:44 | |
This is the same problem that all "from x import y" circular imports have - it isn't specific to relative imports. Closing as a duplicate of issue 992389 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:22 | admin | set | github: 57396 |
| 2011年10月16日 06:44:55 | ncoghlan | set | status: open -> closed resolution: duplicate superseder: attribute error due to circular import messages: + msg145613 |
| 2011年10月15日 22:20:47 | meador.inge | set | nosy:
+ meador.inge |
| 2011年10月15日 20:58:30 | eric.snow | set | nosy:
+ eric.snow |
| 2011年10月15日 20:32:15 | flox | set | nosy:
+ flox |
| 2011年10月15日 20:30:54 | pitrou | set | nosy:
+ brett.cannon |
| 2011年10月15日 20:28:44 | pitrou | create | |