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

Paul Ivanov pi@berkeley....
Fri Jun 28 15:30:08 CDT 2013


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


More information about the IPython-dev mailing list