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