Skip to content

Commit

Permalink
Merge pull request ipython#3450 from ipython/flatten
Browse files Browse the repository at this point in the history
Flatten IPython.frontend, moving all its components to the top-level of IPython.

This includes a shim module that allows older projects to maintain backwards compatibility while warning them loudly about the change, so they can adapt to the new API.
  • Loading branch information
fperez committed Jun 28, 2013
2 parents da5f290 + 2d8ed6b commit 3ff7039
Show file tree
Hide file tree
Showing 271 changed files with 224 additions and 21,318 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -5,7 +5,7 @@ _build
docs/man/*.gz
docs/source/api/generated
docs/gh-pages
IPython/frontend/html/notebook/static/mathjax
IPython/html/notebook/static/mathjax
*.py[co]
__pycache__
build
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "components"]
path = IPython/frontend/html/notebook/static/components
path = IPython/html/static/components
url = https://github.com/ipython/ipython-components.git
2 changes: 1 addition & 1 deletion IPython/__init__.py
Expand Up @@ -44,7 +44,7 @@
from .core.getipython import get_ipython
from .core import release
from .core.application import Application
from .frontend.terminal.embed import embed
from .terminal.embed import embed

from .core.error import TryNext
from .core.interactiveshell import InteractiveShell
Expand Down
2 changes: 1 addition & 1 deletion IPython/__main__.py
Expand Up @@ -9,6 +9,6 @@
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------

from IPython.frontend.terminal.ipapp import launch_new_instance
from IPython.terminal.ipapp import launch_new_instance

launch_new_instance()
2 changes: 1 addition & 1 deletion IPython/frontend/consoleapp.py → IPython/consoleapp.py
Expand Up @@ -2,7 +2,7 @@
This is not a complete console app, as subprocess will not be able to receive
input, there is no real readline support, among other limitations. This is a
refactoring of what used to be the IPython/frontend/qt/console/qtconsoleapp.py
refactoring of what used to be the IPython/qt/console/qtconsoleapp.py
Authors:
Expand Down
6 changes: 3 additions & 3 deletions IPython/core/profileapp.py
Expand Up @@ -238,10 +238,10 @@ def parse_command_line(self, argv):
def init_config_files(self):
super(ProfileCreate, self).init_config_files()
# use local imports, since these classes may import from here
from IPython.frontend.terminal.ipapp import TerminalIPythonApp
from IPython.terminal.ipapp import TerminalIPythonApp
apps = [TerminalIPythonApp]
try:
from IPython.frontend.qt.console.qtconsoleapp import IPythonQtConsoleApp
from IPython.qt.console.qtconsoleapp import IPythonQtConsoleApp
except Exception:
# this should be ImportError, but under weird circumstances
# this might be an AttributeError, or possibly others
Expand All @@ -250,7 +250,7 @@ def init_config_files(self):
else:
apps.append(IPythonQtConsoleApp)
try:
from IPython.frontend.html.notebook.notebookapp import NotebookApp
from IPython.html.notebookapp import NotebookApp
except ImportError:
pass
except Exception:
Expand Down
2 changes: 1 addition & 1 deletion IPython/core/tests/test_display.py
Expand Up @@ -29,7 +29,7 @@ def test_image_filename_defaults():
embed=True)
nt.assert_raises(ValueError, display.Image)
nt.assert_raises(ValueError, display.Image, data='this is not an image', format='badformat', embed=True)
imgfile = os.path.join(tpath, 'frontend/html/notebook/static/base/images/ipynblogo.png')
imgfile = os.path.join(tpath, 'html/static/base/images/ipynblogo.png')
img = display.Image(filename=imgfile)
nt.assert_equal('png', img.format)
nt.assert_is_not_none(img._repr_png_())
Expand Down

0 comments on commit 3ff7039

Please sign in to comment.