homepage

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 scoder
Recipients scoder
Date 2012年08月07日.18:35:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344364550.12.0.263881849199.issue15576@psf.upfronthosting.co.za>
In-reply-to
Content
The new importlib shows a regression w.r.t. previous CPython versions. It no longer recognises an "__init__.so" file as a package. All previous CPython versions have always tested first for an extension file before testing for a .py/.pyc file. The new importlib explicitly excludes the ExtensionFileLoader from loading packages. See importlib/_bootstrap.py, line 1579 onwards:
 1579 def _get_supported_file_loaders():
 1580 """Returns a list of file-based module loaders.
 1581 
 1582 Each item is a tuple (loader, suffixes, allow_packages).
 1583 """
 1584 extensions = ExtensionFileLoader, _imp.extension_suffixes(), False # <== bug here
 1585 source = SourceFileLoader, SOURCE_SUFFIXES, True
 1586 bytecode = SourcelessFileLoader, BYTECODE_SUFFIXES, True
 1587 return [extensions, source, bytecode]
(BTW, I'm not sure what to file this bug against - "Interpreter Core" or "Library"?)
History
Date User Action Args
2012年08月07日 18:35:50scodersetrecipients: + scoder
2012年08月07日 18:35:50scodersetmessageid: <1344364550.12.0.263881849199.issue15576@psf.upfronthosting.co.za>
2012年08月07日 18:35:49scoderlinkissue15576 messages
2012年08月07日 18:35:48scodercreate

AltStyle によって変換されたページ (->オリジナル) /