ImportError raised for a circular import
14 Jun
2017
14 Jun
'17
2:30 a.m.
Recently I fell into the trap of creating a circular import and yet again it took time to figure out what was wrong. I'm wondering why the python import code does not detect this error and raise an exception. I took a look at the code and got as far as figuring out that I would need to add the detection to the python 3 import code. Unless I missed something I cannot get the detection without modifying the core code as I could see no way to hook the process cleanly. Is it reasonable idea to add this detection to python? I am willing to work on a patch. Barry
2496
Age (days ago)
2502
Last active (days ago)
19 comments
12 participants
participants (12)
-
Abdur-Rahmaan Janhangeer
-
Antoine Rozo
-
Barry
-
Barry Scott
-
Chris Angelico
-
Ivan Levkivskyi
-
Mahmoud Hashemi
-
Matt
-
Nick Coghlan
-
Oleg Broytman
-
Paul Moore
-
Stephan Houben