[issue15056] Have imp.cache_from_source() raise NotImplementedError when cache tag not available
Éric Araujo
report at bugs.python.org
Sun Jun 24 08:33:49 CEST 2012
Éric Araujo <merwok at netwok.org> added the comment:
> So sys.dont_write_bytecode is there to prevent bytecode writing but not loading.
Ah right. Providing a way to avoid reading them sounds good.
> If you set sys.implementation.cache_tag to None you stop all bytecode usage (reading and writing)
This I feel uncomfortable with. First, I would separate writing and reading; second, I think of sys.implementation as a read-only information holder, and would think it immutable (note that I haven’t read the latest version of the PEP); just like sys.flags.dont_write_bytecode does not change but sys.dont_write_bytecode can change. So even though I think sys has a lot of attributes, the cleanest thing here would be a new sys.dont_read_bytecode attribute (as was proposed in the thread), maybe also with a new command-line option (or using -BB) and environment variable.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15056>
_______________________________________
More information about the Python-bugs-list
mailing list