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, r.david.murray, scoder
Date 2012-08-07.19:17:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344367051.22.0.905953484416.issue15576@psf.upfronthosting.co.za>
In-reply-to
Content
So this was on purpose. At some point over the past five years I was working on importlib I think I was told I shouldn't support it (or something) as I explicitly remember making the decision to not support __init__.so on purpose. Plus the package specification never suggested anything but __init__.py to be used to begin with, so it isn't a bug as much as a design oversight (as is a large portion of import semantics unfortunately). But I take it Cython has been relying on this for years so that kind of kills treating this as part of import semantics cleanup.

Now to reverse this several things need to happen. First the whole third item in the tuples passed to PathFinder is unneeded (it existed purely to block extension module __init__ files) and thus should be removed where necessary. Second, the tests for extensions (test.test_importlib.extension.test_finder) need to be updated, but that gets messy as there is no __init__.so in the stdlib to test against to verify everything works. Tests could cheat and muck with PathFinder's file cache, but that is definitely not a blackbox test anymore. Don't know how best to deal with this short of an xx/__init__.so module being added to the stdlib.

And just for future reference, Stefan, since this is a direct import issue and not something to do with importlib's API I consider it an Interpreter Core bug.

And I'm glad we cache directory stat results now as changing this will have minuscule overhead compared to adding another stat call per package search without the cache.
History
Date User Action Args
2012-08-07 19:17:31brett.cannonsetrecipients: + brett.cannon, scoder, r.david.murray, eric.snow
2012-08-07 19:17:31brett.cannonsetmessageid: <1344367051.22.0.905953484416.issue15576@psf.upfronthosting.co.za>
2012-08-07 19:17:30brett.cannonlinkissue15576 messages
2012-08-07 19:17:29brett.cannoncreate