Skip to content

DOC: update ipython sphinxext for IPython 4.0 #10868

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion doc/sphinxext/ipython_sphinxext/ipython_directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@
from sphinx.util.compat import Directive

# Our own
from IPython import Config, InteractiveShell
try:
from traitlets.config import Config
except ImportError:
Copy link
Contributor

Choose a reason for hiding this comment

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

the fact that you have to change this is very odd. is this in their release notes? (or are we just using reallly old syntax)

Copy link
Contributor

Choose a reason for hiding this comment

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

They split traitlets into a new repo.

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 don't know. Possibly they forgot to put a shim for Config (but this code is normally included in ipython itself, so then it doesn't matter. But is seems that Config is rather public object)

Copy link
Contributor

Choose a reason for hiding this comment

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

yeh that seems rather extreme to not to shim. I know we get blamed for any teeny tiny little change :)

Copy link
Member Author

Choose a reason for hiding this comment

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

They put a warning on the module (https://github.com/ipython/ipython/blob/master/IPython/config.py), but not on the object in the top-level namespace apparantly.

@takluyver is this an oversight of IPython or on purpose?

Copy link
Contributor

Choose a reason for hiding this comment

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

Config is gone entirely from the top-level namespace on IPython 4.0
EDIT: which it the point of the PR (duh). Anyway +1 on the change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Apologies for the delayed response. I think it's an oversight that we forgot to shim for the top level module, but now that it's out there without the shim, we're probably not going to go back and add new shims, so this fix should be correct anyway.

from IPython import Config
from IPython import InteractiveShell
from IPython.core.profiledir import ProfileDir
from IPython.utils import io
from IPython.utils.py3compat import PY3
Expand Down