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

Aaron Meurer asmeurer@gmail....
Fri Jun 28 15:36:48 CDT 2013


On Fri, Jun 28, 2013 at 3:30 PM, Paul Ivanov <pi@berkeley.edu> wrote:
> 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 {} \;

Oh man. I hate to see things on mailing lists that say, "run this
command," and it's rm. What's wrong with git clean -Xdf?

Aaron Meurer

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


More information about the IPython-dev mailing list