[Python-Dev] [compatibility-sig] making sure importlib.machinery.SourceLoader doesn't throw an exception if bytecode is not supported by a VM (original) (raw)
Brett Cannon brett at python.org
Tue Jun 12 21:01:05 CEST 2012
- Previous message: [Python-Dev] [compatibility-sig] making sure importlib.machinery.SourceLoader doesn't throw an exception if bytecode is not supported by a VM
- Next message: [Python-Dev] [compatibility-sig] making sure importlib.machinery.SourceLoader doesn't throw an exception if bytecode is not supported by a VM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Jun 12, 2012 at 2:28 PM, Eric Snow <ericsnowcurrently at gmail.com>wrote:
On Tue, Jun 12, 2012 at 10:48 AM, Brett Cannon <brett at python.org> wrote: > I should mention another option is to add sys.dontreadbytecode (I think I > have discussed this with Frank at some point).
Or check for "sys.implementation.cachetag is None"...
Perfect! Will that work for Jython (Franke) and IronPython (Jeff)?
This does mean, though, that imp.cache_from_source() and imp.source_from_cache() might need to be updated to raise a reasonable exception when sys.implementation.cache_tag is set to None as I believe right now it will raise a TypeError because None isn't a str. But what to raise instead? TypeError? EnvironmentError? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120612/86a163d2/attachment.html>
- Previous message: [Python-Dev] [compatibility-sig] making sure importlib.machinery.SourceLoader doesn't throw an exception if bytecode is not supported by a VM
- Next message: [Python-Dev] [compatibility-sig] making sure importlib.machinery.SourceLoader doesn't throw an exception if bytecode is not supported by a VM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]