Ticket #426 (assigned defect)
Replace __import__ with import_module
|Reported by:||george.sakkis@…||Owned by:||andrew|
The fromlist parameter of __import__ is poorly documented and implemented; specifically when importing a package and fromlist contains an empty string, the package is imported twice with a bogus __name__ the second time (see http://bugs.python.org/issue2090). This resulted to an obscure bug during an initial migration I ran.
Attached is a patch that replaces all __import__ calls with django.utils.importlib.import_module (also to be included in Python 2.7).