[yt-dev] Fwd: [IPython-dev] frontend namespace flattened (major change)

Matthew Turk matthewturk at gmail.com
Fri Jun 28 14:31:35 PDT 2013


FYI: Since we import from the notebookapp, we will have to change
eventually, but we don't now since that construction is backwards
compatible.


---------- Forwarded message ----------
From: Paul Ivanov <pi at berkeley.edu>
Date: Fri, Jun 28, 2013 at 3:30 PM
Subject: [IPython-dev] frontend namespace flattened (major change)
To: IPython developers list <ipython-dev at scipy.org>


Hey everyone,

we've just landed PR #3450:
https://github.com/ipython/ipython/pull/3450

To quote Fernando:

> The basic idea is to move all the code we had in frontend and
> put it at the top, as recently discussed, and then to create
> a shim module capable of forwarding all `from
> IPython.frontend...  import...` to their new locations.

Here's the rundown of name changes:
Old name -> New name
IPython.frontend.* -> IPython.*
IPython.frontend.html.notebook -> IPython.html

With only one exception, you do not have to make any immediate
changes to your code in order for it to continue working, but
will see deprecation warnings

The one exception is described by Min in a comment on the PR
which I am inlining here:

> The shim is a tiny bit more complicated now, since it's not
> just moving IPython.frontend.* to IPython.* anymore, as
> IPython.frontend.html.notebook became just IPython.html. A
> result of the extra shim is that there is one old import that
> doesn't work:
>
>     from IPython.frontend.html import notebook
>
> but
>
>     from IPython.frontend.html.notebook[.submod] import whatever
>
> works just fine.


One issue that we ran into that you should be sure to remove the
frontend/ directory, and clean up all .pyc files that may be
lying around. This command should do the trick:

    rm -fr IPython/frontend; find -name \*.pyc -exec rm {} \;


best,
--
                   _
                  / \
                A*   \^   -
             ,./   _.`\\ / \
            / ,--.S    \/   \
           /  `"~,_     \    \
     __o           ?
   _ \<,_         /:\
--(_)/-(_)----.../ | \
--------------.......J
Paul Ivanov
http://pirsquared.org
_______________________________________________
IPython-dev mailing list
IPython-dev at scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-dev



More information about the yt-dev mailing list