[issue19531] Loading -OO bytecode files if -O was requested can lead to problems

2020-03-06 Thread Brett Cannon
Brett Cannon added the comment: .pyc files now include their optimization levels in their file names. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue19531] Loading -OO bytecode files if -O was requested can lead to problems

2014-05-22 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: -skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19531 ___ ___ Python-bugs-list

[issue19531] Loading -OO bytecode files if -O was requested can lead to problems

2013-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Some tests fail when ran with -OO and then with -O. Short example (there are more examples): $ rm -rf Lib/test/__pycache__ $ ./python -OO -m test.regrtest test_property [1/1] test_property 1 test OK. $ ./python -O -m test.regrtest test_property [1/1]

[issue19531] Loading -OO bytecode files if -O was requested can lead to problems

2013-11-09 Thread Brett Cannon
Brett Cannon added the comment: This is a known problem and has been brought up over the years. Discussions have typically revolved around expanding the .pyc format to encode what optimizations were used so if the interpreter was using different optimizations it would not use the bytecode.

[issue19531] Loading -OO bytecode files if -O was requested can lead to problems

2013-11-08 Thread Sworddragon
New submission from Sworddragon: The documentation says that -OO does remove docstrings so applications should be aware of it. But there is also a case where a valid declared docstring isn't accessible anymore if -O is given. First the testcase: test1.py: import test2 def test1():