-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Make autoreload extension work on Python 3. #1289
Conversation
Some changes for Python 3 in general, and some changes for the .pyc repository directories introduced in Python 3.2 (PEP 3147) Closes ipythongh-846
try: | ||
py_filename = pyfile.source_from_cache(filename) | ||
except ValueError: | ||
continue | ||
|
||
if ext != PY_COMPILED_EXT: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this check is now superfluous, but I'd like someone else to look at it before I remove it. source_from_cache
raises ValueError unless the extension is .pyc or .pyo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing it looks clean to me.
Looks good, go ahead and merge after removing that |
Sorry, I meant the |
Ah, OK. Actually, I imagine if you are running from a read-only filesystem with only sources ( |
if ext is The only way I think it could now be called is if we somehow end up with a .pyo filename in a normal process, or a .pyc in an optimised one. And if that did happen, I don't think it would need to be skipped, anyway. |
OK, then go ahead with the removal and merge. Thanks! |
Make autoreload extension work on Python 3.
Make autoreload extension work on Python 3.
Some changes for Python 3 in general, and some changes for the .pyc repository directories introduced in Python 3.2 (PEP 3147)
Closes gh-846