Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4571a5f

Browse files
fperezminrk
authored andcommitted
Fix all remaining imports that used IPython.frontend.
1 parent f649421 commit 4571a5f

14 files changed

Lines changed: 21 additions & 22 deletions

File tree

IPython/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
# The full license is in the file COPYING.txt, distributed with this software.
1010
#-----------------------------------------------------------------------------
1111

12-
from IPython.frontend.terminal.ipapp import launch_new_instance
12+
from IPython.terminal.ipapp import launch_new_instance
1313

1414
launch_new_instance()

IPython/consoleapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
This is not a complete console app, as subprocess will not be able to receive
44
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
66
77
Authors:
88

IPython/core/profileapp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,10 @@ def parse_command_line(self, argv):
238238
def init_config_files(self):
239239
super(ProfileCreate, self).init_config_files()
240240
# 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
242242
apps = [TerminalIPythonApp]
243243
try:
244-
from IPython.frontend.qt.console.qtconsoleapp import IPythonQtConsoleApp
244+
from IPython.qt.console.qtconsoleapp import IPythonQtConsoleApp
245245
except Exception:
246246
# this should be ImportError, but under weird circumstances
247247
# this might be an AttributeError, or possibly others
@@ -250,7 +250,7 @@ def init_config_files(self):
250250
else:
251251
apps.append(IPythonQtConsoleApp)
252252
try:
253-
from IPython.frontend.html.notebook.notebookapp import NotebookApp
253+
from IPython.html.notebook.notebookapp import NotebookApp
254254
except ImportError:
255255
pass
256256
except Exception:

IPython/frontend.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
Shim to maintain backwards compatibility with old frontend imports.
33
44
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.
89
"""
910

1011
#-----------------------------------------------------------------------------
@@ -28,7 +29,6 @@
2829
warn("The top-level `frontend` package has been deprecated. "
2930
"All its subpackages have been moved to the top `IPython` level.")
3031

31-
1/0
3232
#-----------------------------------------------------------------------------
3333
# Class declarations
3434
#-----------------------------------------------------------------------------

IPython/html/notebook/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@ wide install.
5454

5555
First, cd into js directory :
5656
```bash
57-
cd IPython/frontend/html/notebook/static/js/
57+
cd IPython/html/notebook/static/js/
5858
# install yuidoc
5959
npm install yuidocjs
6060
```
6161

6262

6363
### Run YUIdoc server
6464

65-
From IPython/frontend/html/notebook/static/js/
65+
From IPython/html/notebook/static/js/
6666
```bash
6767
# run yuidoc for install dir
6868
./node_modules/yuidocjs/lib/cli.js --server .
6969
```
7070

7171
Follow the instruction and the documentation should be available on localhost:3000
7272

73-
Omitting `--server` will build a static version in the `out` folder by default.
73+
Omitting `--server` will build a static version in the `out` folder by default.

IPython/kernel/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def connect_qtconsole(connection_file=None, argv=None, profile=None):
300300
cf = find_connection_file(connection_file, profile=profile)
301301

302302
cmd = ';'.join([
303-
"from IPython.frontend.qt.console import qtconsoleapp",
303+
"from IPython.qt.console import qtconsoleapp",
304304
"qtconsoleapp.main()"
305305
])
306306

IPython/qt/console/tests/test_ansi_code_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import unittest
33

44
# Local imports
5-
from IPython.frontend.qt.console.ansi_code_processor import AnsiCodeProcessor
5+
from IPython.qt.console.ansi_code_processor import AnsiCodeProcessor
66

77

88
class TestAnsiCodeProcessor(unittest.TestCase):

IPython/qt/console/tests/test_completion_lexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from pygments.lexers import CLexer, CppLexer, PythonLexer
66

77
# Local imports
8-
from IPython.frontend.qt.console.completion_lexer import CompletionLexer
8+
from IPython.qt.console.completion_lexer import CompletionLexer
99

1010

1111
class TestCompletionLexer(unittest.TestCase):

IPython/qt/console/tests/test_console_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from IPython.external.qt import QtCore, QtGui
66

77
# Local imports
8-
from IPython.frontend.qt.console.console_widget import ConsoleWidget
8+
from IPython.qt.console.console_widget import ConsoleWidget
99

1010

1111
class TestConsoleWidget(unittest.TestCase):

IPython/qt/console/tests/test_kill_ring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from IPython.external.qt import QtCore, QtGui
66

77
# Local imports
8-
from IPython.frontend.qt.console.kill_ring import KillRing, QtKillRing
8+
from IPython.qt.console.kill_ring import KillRing, QtKillRing
99

1010

1111
class TestKillRing(unittest.TestCase):

0 commit comments

Comments
 (0)