classification
Title: python -O does not find *.pyo files
Type: behavior Stage:
Components: Interpreter Core Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: benjamin.peterson, brett.cannon, georg.brandl, haypo, marco.buttu, ncoghlan, python-dev
Priority: release blocker Keywords: 3.3regression

Created on 2012-09-25 14:02 by marco.buttu, last changed 2012-09-29 07:27 by python-dev. This issue is now closed.

Messages (8)
msg171276 - (view) Author: Marco Buttu (marco.buttu) Date: 2012-09-25 14:02
$ echo "print(__file__)" > foo.py
$ python3.3 -O -m foo
/home/marco/temp/foo.py
$ ls
foo.py  __pycache__
$ rm foo.py
$ mv __pycache__/foo.cpython-33.pyo foo.pyo
$ rm __pycache__ -r
$ ls
foo.pyo
# The following works in Python3.2, but not in Python 3.3.0rc3
$ python3.3 -O -m foo
/usr/local/bin/python3.3: No module named foo
msg171287 - (view) Author: Roundup Robot (python-dev) Date: 2012-09-25 15:23
New changeset 4de5e4ec3cff by Benjamin Peterson in branch 'default':
don't depend on __debug__ because it's baked in at freeze time (issue #16046)
http://hg.python.org/cpython/rev/4de5e4ec3cff
msg171288 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2012-09-25 15:23
This "tested" in the sense if you run test_import with -O, it fails. We ought to have a buildbot running with -O.
msg171289 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2012-09-25 15:23
Georg, do you want to take this for 3.3, final?
msg171290 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-09-25 15:25
Looks serious enough, yes.
msg171291 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2012-09-25 15:40
Transplanted to ff50579241cd.
msg171372 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2012-09-27 08:48
It would be nice to have a test.
msg171553 - (view) Author: Roundup Robot (python-dev) Date: 2012-09-29 07:27
New changeset ff50579241cd by Benjamin Peterson in branch 'default':
don't depend on __debug__ because it's baked in at freeze time (issue #16046)
http://hg.python.org/cpython/rev/ff50579241cd
History
Date User Action Args
2012-09-29 07:27:37python-devsetmessages: + msg171553
2012-09-27 08:48:46hayposetnosy: + haypo
messages: + msg171372
2012-09-25 15:40:20georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg171291
2012-09-25 15:25:21georg.brandlsetmessages: + msg171290
2012-09-25 15:23:59benjamin.petersonsetpriority: normal -> release blocker

nosy: + georg.brandl
messages: + msg171289

assignee: georg.brandl
2012-09-25 15:23:30benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg171288
2012-09-25 15:23:16python-devsetnosy: + python-dev
messages: + msg171287
2012-09-25 14:08:52pitrousetkeywords: + 3.3regression
nosy: + brett.cannon, ncoghlan
2012-09-25 14:04:21marco.buttusettype: behavior
2012-09-25 14:02:05marco.buttucreate