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

Source introspection needs to be smarter in python 3.2 #797

Closed
fperez opened this issue Sep 16, 2011 · 2 comments
Closed

Source introspection needs to be smarter in python 3.2 #797

fperez opened this issue Sep 16, 2011 · 2 comments
Labels
Milestone

Comments

@fperez
Copy link
Member

fperez commented Sep 16, 2011

Because of this:

http://docs.python.org/py3k/whatsnew/3.2.html#pep-3147-pyc-repository-directories

the x?? will likely not work correctly in python3.2. The suggested fix there is to use the new imp module, so we probably need to update our introspection machinery to use those utilities in python3.2.

@takluyver
Copy link
Member

As far as I can see, this is working fine - our oinspect machinery calls functions in the standard inspect module, which does the right thing. Even code that uses __file__ should be fine, as Python 3 sets that to the source file, not the cached file (ref). The only exception I can see would be if our code uses __file__ and assumes it will always get a .pyc file.

I'm closing this, but feel free to reopen it if you can find any problems.

@fperez
Copy link
Member Author

fperez commented Feb 21, 2012

No prob, thanks for looking into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants