Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python -O does not find *.pyo files #60250

Closed
marco-buttu mannequin opened this issue Sep 25, 2012 · 8 comments
Closed

python -O does not find *.pyo files #60250

marco-buttu mannequin opened this issue Sep 25, 2012 · 8 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) release-blocker type-bug An unexpected behavior, bug, or error

Comments

@marco-buttu
Copy link
Mannequin

marco-buttu mannequin commented Sep 25, 2012

BPO 16046
Nosy @brettcannon, @birkenfeld, @ncoghlan, @vstinner, @benjaminp, @marco-buttu

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2012-09-25.15:40:20.115>
created_at = <Date 2012-09-25.14:02:05.511>
labels = ['interpreter-core', 'type-bug', 'release-blocker']
title = 'python -O does not find *.pyo files'
updated_at = <Date 2012-09-29.07:27:37.663>
user = 'https://github.com/marco-buttu'

bugs.python.org fields:

activity = <Date 2012-09-29.07:27:37.663>
actor = 'python-dev'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2012-09-25.15:40:20.115>
closer = 'georg.brandl'
components = ['Interpreter Core']
creation = <Date 2012-09-25.14:02:05.511>
creator = 'marco.buttu'
dependencies = []
files = []
hgrepos = []
issue_num = 16046
keywords = ['3.3regression']
message_count = 8.0
messages = ['171276', '171287', '171288', '171289', '171290', '171291', '171372', '171553']
nosy_count = 7.0
nosy_names = ['brett.cannon', 'georg.brandl', 'ncoghlan', 'vstinner', 'benjamin.peterson', 'python-dev', 'marco.buttu']
pr_nums = []
priority = 'release blocker'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue16046'
versions = ['Python 3.3']

@marco-buttu
Copy link
Mannequin Author

marco-buttu mannequin commented Sep 25, 2012

$ 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

@marco-buttu marco-buttu mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Sep 25, 2012
@python-dev
Copy link
Mannequin

python-dev mannequin commented Sep 25, 2012

New changeset 4de5e4ec3cff by Benjamin Peterson in branch 'default':
don't depend on __debug__ because it's baked in at freeze time (issue bpo-16046)
http://hg.python.org/cpython/rev/4de5e4ec3cff

@benjaminp
Copy link
Contributor

This "tested" in the sense if you run test_import with -O, it fails. We ought to have a buildbot running with -O.

@benjaminp
Copy link
Contributor

Georg, do you want to take this for 3.3, final?

@birkenfeld
Copy link
Member

Looks serious enough, yes.

@birkenfeld
Copy link
Member

Transplanted to ff50579241cd.

@vstinner
Copy link
Member

It would be nice to have a test.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Sep 29, 2012

New changeset ff50579241cd by Benjamin Peterson in branch 'default':
don't depend on __debug__ because it's baked in at freeze time (issue bpo-16046)
http://hg.python.org/cpython/rev/ff50579241cd

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) release-blocker type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants