]> granicus.if.org Git - python/commit
If a module injects something into sys.modules as a side-effect of
authorBrett Cannon <brett@python.org>
Tue, 3 Apr 2012 00:33:56 +0000 (20:33 -0400)
committerBrett Cannon <brett@python.org>
Tue, 3 Apr 2012 00:33:56 +0000 (20:33 -0400)
commit927d87470a0b6f7b0ca3f3a1b39fd3bdc0ec919a
tree14751257ed51a52e66dd9dcf85eb17ffb2fc77cf
parent368b4b74050290a77f32cafa8c7fac3542bc6308
If a module injects something into sys.modules as a side-effect of
importation, then respect that injection.

Discovered thanks to Lib/xml/parsers/expat.py injecting
xml.parsers.expat.errors and etree now importing that directly as a
module.
Lib/importlib/_bootstrap.py
Lib/importlib/test/import_/test_packages.py