On Sun, Jun 18, 2017 at 07:21:21PM +0100, Barry Scott
I was going to simply keep track of the names of the modules that are being imported and raise an exception if an import attempted to import a module that had not completed being imported.
Please don't do that. In SQLObject module dbconnection imports connection modules to run registration code in their __init__; connection modules import name DBAPI from dbconnection. To avoid problems with circular import dbconnection imports connection modules at the very end. I'm afraid you plan if implemented would prevent me from doing that. See the code. dbconnection.py: https://github.com/sqlobject/sqlobject/blob/master/sqlobject/dbconnection.py... Connection modules (just a few examples): https://github.com/sqlobject/sqlobject/blob/master/sqlobject/mysql/mysqlconn... https://github.com/sqlobject/sqlobject/blob/master/sqlobject/postgres/pgconn... Oleg. -- Oleg Broytman http://phdru.name/ phd@phdru.name Programmers don't die, they just GOSUB without RETURN.