##// END OF EJS Templates
Fix all remaining imports that used `IPython.frontend`.
Fernando Perez -
Show More
@@ -9,6 +9,6 b''
9 9 # The full license is in the file COPYING.txt, distributed with this software.
10 10 #-----------------------------------------------------------------------------
11 11
12 from IPython.frontend.terminal.ipapp import launch_new_instance
12 from IPython.terminal.ipapp import launch_new_instance
13 13
14 14 launch_new_instance()
@@ -2,7 +2,7 b''
2 2
3 3 This is not a complete console app, as subprocess will not be able to receive
4 4 input, there is no real readline support, among other limitations. This is a
5 refactoring of what used to be the IPython/frontend/qt/console/qtconsoleapp.py
5 refactoring of what used to be the IPython/qt/console/qtconsoleapp.py
6 6
7 7 Authors:
8 8
@@ -238,10 +238,10 b' class ProfileCreate(BaseIPythonApplication):'
238 238 def init_config_files(self):
239 239 super(ProfileCreate, self).init_config_files()
240 240 # use local imports, since these classes may import from here
241 from IPython.frontend.terminal.ipapp import TerminalIPythonApp
241 from IPython.terminal.ipapp import TerminalIPythonApp
242 242 apps = [TerminalIPythonApp]
243 243 try:
244 from IPython.frontend.qt.console.qtconsoleapp import IPythonQtConsoleApp
244 from IPython.qt.console.qtconsoleapp import IPythonQtConsoleApp
245 245 except Exception:
246 246 # this should be ImportError, but under weird circumstances
247 247 # this might be an AttributeError, or possibly others
@@ -250,7 +250,7 b' class ProfileCreate(BaseIPythonApplication):'
250 250 else:
251 251 apps.append(IPythonQtConsoleApp)
252 252 try:
253 from IPython.frontend.html.notebook.notebookapp import NotebookApp
253 from IPython.html.notebook.notebookapp import NotebookApp
254 254 except ImportError:
255 255 pass
256 256 except Exception:
@@ -2,9 +2,10 b''
2 2 Shim to maintain backwards compatibility with old frontend imports.
3 3
4 4 We have moved all contents of the old `frontend` subpackage into top-level
5 subpackages (`html`, `qt` and `terminal`). This will let code that was making
6 `from IPython.frontend...` calls continue working, though a warning will be
7 printed.
5 subpackages (`html`, `qt` and `terminal`).
6
7 This will let code that was making `from IPython.frontend...` calls continue
8 working, though a warning will be printed.
8 9 """
9 10
10 11 #-----------------------------------------------------------------------------
@@ -28,7 +29,6 b' from warnings import warn'
28 29 warn("The top-level `frontend` package has been deprecated. "
29 30 "All its subpackages have been moved to the top `IPython` level.")
30 31
31 1/0
32 32 #-----------------------------------------------------------------------------
33 33 # Class declarations
34 34 #-----------------------------------------------------------------------------
@@ -54,7 +54,7 b' wide install.'
54 54
55 55 First, cd into js directory :
56 56 ```bash
57 cd IPython/frontend/html/notebook/static/js/
57 cd IPython/html/notebook/static/js/
58 58 # install yuidoc
59 59 npm install yuidocjs
60 60 ```
@@ -62,7 +62,7 b' npm install yuidocjs'
62 62
63 63 ### Run YUIdoc server
64 64
65 From IPython/frontend/html/notebook/static/js/
65 From IPython/html/notebook/static/js/
66 66 ```bash
67 67 # run yuidoc for install dir
68 68 ./node_modules/yuidocjs/lib/cli.js --server .
@@ -70,4 +70,4 b' From IPython/frontend/html/notebook/static/js/'
70 70
71 71 Follow the instruction and the documentation should be available on localhost:3000
72 72
73 Omitting `--server` will build a static version in the `out` folder by default. No newline at end of file
73 Omitting `--server` will build a static version in the `out` folder by default.
@@ -300,7 +300,7 b' def connect_qtconsole(connection_file=None, argv=None, profile=None):'
300 300 cf = find_connection_file(connection_file, profile=profile)
301 301
302 302 cmd = ';'.join([
303 "from IPython.frontend.qt.console import qtconsoleapp",
303 "from IPython.qt.console import qtconsoleapp",
304 304 "qtconsoleapp.main()"
305 305 ])
306 306
@@ -2,7 +2,7 b''
2 2 import unittest
3 3
4 4 # Local imports
5 from IPython.frontend.qt.console.ansi_code_processor import AnsiCodeProcessor
5 from IPython.qt.console.ansi_code_processor import AnsiCodeProcessor
6 6
7 7
8 8 class TestAnsiCodeProcessor(unittest.TestCase):
@@ -5,7 +5,7 b' import unittest'
5 5 from pygments.lexers import CLexer, CppLexer, PythonLexer
6 6
7 7 # Local imports
8 from IPython.frontend.qt.console.completion_lexer import CompletionLexer
8 from IPython.qt.console.completion_lexer import CompletionLexer
9 9
10 10
11 11 class TestCompletionLexer(unittest.TestCase):
@@ -5,7 +5,7 b' import unittest'
5 5 from IPython.external.qt import QtCore, QtGui
6 6
7 7 # Local imports
8 from IPython.frontend.qt.console.console_widget import ConsoleWidget
8 from IPython.qt.console.console_widget import ConsoleWidget
9 9
10 10
11 11 class TestConsoleWidget(unittest.TestCase):
@@ -5,7 +5,7 b' import unittest'
5 5 from IPython.external.qt import QtCore, QtGui
6 6
7 7 # Local imports
8 from IPython.frontend.qt.console.kill_ring import KillRing, QtKillRing
8 from IPython.qt.console.kill_ring import KillRing, QtKillRing
9 9
10 10
11 11 class TestKillRing(unittest.TestCase):
@@ -11,8 +11,7 b' import unittest'
11 11 import base64
12 12
13 13 from IPython.kernel import KernelClient
14 from IPython.frontend.terminal.console.interactiveshell \
15 import ZMQTerminalInteractiveShell
14 from IPython.terminal.console.interactiveshell import ZMQTerminalInteractiveShell
16 15 from IPython.utils.tempdir import TemporaryDirectory
17 16 from IPython.testing.tools import monkeypatch
18 17 from IPython.testing.decorators import skip_without
@@ -30,7 +30,7 b' from . import tools'
30 30 from IPython.core import page
31 31 from IPython.utils import io
32 32 from IPython.utils import py3compat
33 from IPython.frontend.terminal.interactiveshell import TerminalInteractiveShell
33 from IPython.terminal.interactiveshell import TerminalInteractiveShell
34 34
35 35 #-----------------------------------------------------------------------------
36 36 # Functions
@@ -51,7 +51,7 b' def find_cmd(cmd):'
51 51
52 52 from IPython.utils.path import get_ipython_module_path
53 53 from IPython.utils.process import pycmd2argv
54 argv = pycmd2argv(get_ipython_module_path('IPython.frontend.terminal.ipapp'))
54 argv = pycmd2argv(get_ipython_module_path('IPython.terminal.ipapp'))
55 55
56 56 Parameters
57 57 ----------
@@ -404,7 +404,7 b' def test_get_ipython_package_dir():'
404 404
405 405
406 406 def test_get_ipython_module_path():
407 ipapp_path = path.get_ipython_module_path('IPython.frontend.terminal.ipapp')
407 ipapp_path = path.get_ipython_module_path('IPython.terminal.ipapp')
408 408 nt.assert_true(os.path.isfile(ipapp_path))
409 409
410 410
General Comments 0
You need to be logged in to leave comments. Login now