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

__future__ environments #1671

Merged
merged 5 commits into from Jan 18, 2013
Merged

Conversation

takluyver
Copy link
Member

So far, this just closes the .ipy hole, so .py and .ipy files have the same behaviour with respect to future, both for %run and as startup files.

There was some discussion on the mailing list about whether %run should share the shell's __future__, or only %run -i. Either way, this will need a bit more thought, because it interacts with the other options that can be passed to %run, especially for profiling and debugging.

%rerun and macros will share the shell's futures - I think this is expected.

@minrk
Copy link
Member

minrk commented May 2, 2012

I think this behavior does match my expectations, thanks!

@minrk
Copy link
Member

minrk commented Jun 1, 2012

Can you rebase? One of the big merges touched the run_cell signature as well.

@takluyver
Copy link
Member Author

Will do, although it ma

@takluyver takluyver closed this Jun 2, 2012
@takluyver takluyver reopened this Jan 14, 2013
@takluyver
Copy link
Member Author

I'm not sure why I closed this one - looks like I hit the wrong button somewhere. Reopened and rebased.

@takluyver
Copy link
Member Author

The Travis failure appears to be a problem with Travis, not the code.

@takluyver
Copy link
Member Author

Test results for commit 0de3a99 merged into master (cdc7e66)
Platform: linux2

  • python2.7: Failed, log at https://gist.github.com/4530575 (libraries not available: azure oct2py pymongo)
  • python3.2: OK (libraries not available: azure oct2py pymongo wx wx.aui)

Not available for testing: python2.6

@takluyver
Copy link
Member Author

That failure is some problem with PySide/PyQt, unrelated to this.

@minrk
Copy link
Member

minrk commented Jan 15, 2013

This looks good to me. Want to add a test?

@takluyver
Copy link
Member Author

I added a test, and it turned up a minor issue, which required a couple more API changes. I guess it shows how important it is to test everything.

I also noticed a coincidental failure (caused by a file in the working directory where I run the test) was trying to use a now-nonexistant nose.tools.fail() function, so I changed that.

@@ -90,7 +90,7 @@ def __init__(self):
# Now, we must monkeypatch the linecache directly so that parts of the
# stdlib that call it outside our control go through our codepath
# (otherwise we'd lose our tracebacks).
linecache.checkcache = self.check_cache
linecache.checkcache = check_linecache_ipython
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made this a standalone function, so that linecache isn't holding a reference to the last CachingCompiler() we created. It didn't need to be a method in the first place.

@minrk
Copy link
Member

minrk commented Jan 18, 2013

This looks good to me. Anything ore you want to add / confirm?

@takluyver
Copy link
Member Author

Nope, that's great. Merging now.

takluyver added a commit that referenced this pull request Jan 18, 2013
@takluyver takluyver merged commit 0aacf47 into ipython:master Jan 18, 2013
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants