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, eric.snow, ncoghlan, tkhyn
Date 2017-05-23.19:48:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495568898.12.0.339204179174.issue30436@psf.upfronthosting.co.za>
In-reply-to
Content
The key thing to think about is do you think find_spec("parent.module") is working with a single thing called "parent.module" or is it working with two separate things of "parent" and "module" which happens to be contained on "parent"? If you take the former view then you get the current semantics, but if you view it as the latter then you get the semantics you're suggesting, tkhyn.

My inclination is for the former semantics (i.e. think of it as a really long name for a specific module where it turns out the name is broken). If you look at it as find_spec(".submodule", package="parent") this also visually supports the idea that parent modules shouldn't trigger a None return. Finally, this would break any code that expects the current semantics.

So thanks for the bug report, but I'm going to close this as "not a bug".
History
Date User Action Args
2017-05-23 19:48:18brett.cannonsetrecipients: + brett.cannon, ncoghlan, eric.snow, tkhyn
2017-05-23 19:48:18brett.cannonsetmessageid: <1495568898.12.0.339204179174.issue30436@psf.upfronthosting.co.za>
2017-05-23 19:48:18brett.cannonlinkissue30436 messages
2017-05-23 19:48:18brett.cannoncreate