This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon
Date 2013-12-12.15:51:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386863488.66.0.95075387915.issue19963@psf.upfronthosting.co.za>
In-reply-to
Content
The docs for importlib.import_module() say that you need to import parent packages first, but this is actually no longer the case (thankfully):

Python 3.4.0b1 (default:a3bdbe220f8a, Dec 10 2013, 11:07:04) 
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> 'test' in sys.modules
False
>>> import importlib
>>> importlib.import_module('test.test_importlib.source')
<module 'test.test_importlib.source' from '/usr/local/google/home/bcannon/Repos/cpython/default/Lib/test/test_importlib/source/__init__.py'>


Also need to check if this is false in Python 3.3 (or wherever the change occurred) to update the docs there and to add a versionchanged flag.
History
Date User Action Args
2013-12-12 15:51:28brett.cannonsetrecipients: + brett.cannon
2013-12-12 15:51:28brett.cannonsetmessageid: <1386863488.66.0.95075387915.issue19963@psf.upfronthosting.co.za>
2013-12-12 15:51:28brett.cannonlinkissue19963 messages
2013-12-12 15:51:28brett.cannoncreate