[New-bugs-announce] [issue20490] Show clear error message on circular import

Ram Rachum report at bugs.python.org
Sun Feb 2 20:04:48 CET 2014

New submission from Ram Rachum:

If there's a circular import in my program, I don't want to see an error message, "Cannot import name 'foo'" and then say in my mind, "ah, I'm an experienced Python developer, I know that when Python says that it often means that there's a circular import problem." I want the error message to **say there's a circular import problem**, so (a) I won't have to remember this piece of trivia and (b) less experienced developers won't have to bang their heads on their desks trying to figure out why the import isn't working. 

Bonus points if the error message actually shows which module is trying to import a module that imports itself, so we'll know where to fix.

components: Interpreter Core
messages: 210006
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Show clear error message on circular import
type: enhancement
versions: Python 3.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list