Show More
@@ -126,7 +126,7 b' import warnings' | |||||
126 |
|
126 | |||
127 | from contextlib import contextmanager |
|
127 | from contextlib import contextmanager | |
128 | from importlib import import_module |
|
128 | from importlib import import_module | |
129 |
from typing import Iterator, List, Tuple, Iterable |
|
129 | from typing import Iterator, List, Tuple, Iterable | |
130 | from types import SimpleNamespace |
|
130 | from types import SimpleNamespace | |
131 |
|
131 | |||
132 | from traitlets.config.configurable import Configurable |
|
132 | from traitlets.config.configurable import Configurable |
@@ -19,7 +19,7 b' spec.' | |||||
19 | import sys |
|
19 | import sys | |
20 |
|
20 | |||
21 | from traitlets.config.configurable import Configurable |
|
21 | from traitlets.config.configurable import Configurable | |
22 |
from traitlets import List |
|
22 | from traitlets import List | |
23 |
|
23 | |||
24 | # This used to be defined here - it is imported for backwards compatibility |
|
24 | # This used to be defined here - it is imported for backwards compatibility | |
25 | from .display import publish_display_data |
|
25 | from .display import publish_display_data |
@@ -13,7 +13,6 b'' | |||||
13 |
|
13 | |||
14 | import abc |
|
14 | import abc | |
15 | import ast |
|
15 | import ast | |
16 | import asyncio |
|
|||
17 | import atexit |
|
16 | import atexit | |
18 | import builtins as builtin_mod |
|
17 | import builtins as builtin_mod | |
19 | import functools |
|
18 | import functools | |
@@ -87,6 +86,7 b' from ast import AST' | |||||
87 |
|
86 | |||
88 | # NoOpContext is deprecated, but ipykernel imports it from here. |
|
87 | # NoOpContext is deprecated, but ipykernel imports it from here. | |
89 | # See https://github.com/ipython/ipykernel/issues/157 |
|
88 | # See https://github.com/ipython/ipykernel/issues/157 | |
|
89 | # (2016, let's try to remove than in IPython 8.0) | |||
90 | from IPython.utils.contexts import NoOpContext |
|
90 | from IPython.utils.contexts import NoOpContext | |
91 |
|
91 | |||
92 | try: |
|
92 | try: |
@@ -5,7 +5,6 b' import argparse' | |||||
5 | from logging import error |
|
5 | from logging import error | |
6 | import io |
|
6 | import io | |
7 | from pprint import pformat |
|
7 | from pprint import pformat | |
8 | import textwrap |
|
|||
9 | import sys |
|
8 | import sys | |
10 | from warnings import warn |
|
9 | from warnings import warn | |
11 |
|
10 |
@@ -12,7 +12,6 b' import os' | |||||
12 | import re |
|
12 | import re | |
13 | import shlex |
|
13 | import shlex | |
14 | import sys |
|
14 | import sys | |
15 | from subprocess import Popen, PIPE |
|
|||
16 |
|
15 | |||
17 | from IPython.core.magic import Magics, magics_class, line_magic |
|
16 | from IPython.core.magic import Magics, magics_class, line_magic | |
18 |
|
17 | |||
@@ -101,4 +100,4 b' class PackagingMagics(Magics):' | |||||
101 | extra_args.extend(["--prefix", sys.prefix]) |
|
100 | extra_args.extend(["--prefix", sys.prefix]) | |
102 |
|
101 | |||
103 | self.shell.system(' '.join([conda, command] + extra_args + args)) |
|
102 | self.shell.system(' '.join([conda, command] + extra_args + args)) | |
104 | print("\nNote: you may need to restart the kernel to use updated packages.") No newline at end of file |
|
103 | print("\nNote: you may need to restart the kernel to use updated packages.") |
@@ -16,7 +16,6 b' test_run.py calls it.' | |||||
16 | #----------------------------------------------------------------------------- |
|
16 | #----------------------------------------------------------------------------- | |
17 | # Module imports |
|
17 | # Module imports | |
18 | #----------------------------------------------------------------------------- |
|
18 | #----------------------------------------------------------------------------- | |
19 | import sys |
|
|||
20 |
|
19 | |||
21 | from IPython import get_ipython |
|
20 | from IPython import get_ipython | |
22 |
|
21 |
@@ -3,7 +3,6 b' Test for async helpers.' | |||||
3 |
|
3 | |||
4 | Should only trigger on python 3.5+ or will have syntax errors. |
|
4 | Should only trigger on python 3.5+ or will have syntax errors. | |
5 | """ |
|
5 | """ | |
6 | import sys |
|
|||
7 | from itertools import chain, repeat |
|
6 | from itertools import chain, repeat | |
8 | import nose.tools as nt |
|
7 | import nose.tools as nt | |
9 | from textwrap import dedent, indent |
|
8 | from textwrap import dedent, indent |
@@ -14,7 +14,7 b' from IPython.core.getipython import get_ipython' | |||||
14 | from IPython.utils.io import capture_output |
|
14 | from IPython.utils.io import capture_output | |
15 | from IPython.utils.tempdir import NamedFileInTemporaryDirectory |
|
15 | from IPython.utils.tempdir import NamedFileInTemporaryDirectory | |
16 | from IPython import paths as ipath |
|
16 | from IPython import paths as ipath | |
17 |
from IPython.testing.tools import |
|
17 | from IPython.testing.tools import AssertNotPrints | |
18 |
|
18 | |||
19 | import IPython.testing.decorators as dec |
|
19 | import IPython.testing.decorators as dec | |
20 |
|
20 |
@@ -1,4 +1,3 b'' | |||||
1 | from backcall import callback_prototype |
|
|||
2 |
|
|
1 | import unittest | |
3 | from unittest.mock import Mock |
|
2 | from unittest.mock import Mock | |
4 | import nose.tools as nt |
|
3 | import nose.tools as nt |
@@ -10,7 +10,6 b' import nose.tools as nt' | |||||
10 | # our own packages |
|
10 | # our own packages | |
11 | from IPython.core import autocall |
|
11 | from IPython.core import autocall | |
12 | from IPython.testing import tools as tt |
|
12 | from IPython.testing import tools as tt | |
13 | from IPython.utils import py3compat |
|
|||
14 |
|
13 | |||
15 | #----------------------------------------------------------------------------- |
|
14 | #----------------------------------------------------------------------------- | |
16 | # Globals |
|
15 | # Globals |
@@ -26,8 +26,6 b' import IPython.testing.tools as tt' | |||||
26 |
|
26 | |||
27 | from unittest import TestCase |
|
27 | from unittest import TestCase | |
28 |
|
28 | |||
29 | from IPython.testing.decorators import skipif |
|
|||
30 |
|
||||
31 | from IPython.extensions.autoreload import AutoreloadMagics |
|
29 | from IPython.extensions.autoreload import AutoreloadMagics | |
32 | from IPython.core.events import EventManager, pre_run_cell |
|
30 | from IPython.core.events import EventManager, pre_run_cell | |
33 |
|
31 | |||
@@ -141,7 +139,6 b' def pickle_get_current_class(obj):' | |||||
141 | class TestAutoreload(Fixture): |
|
139 | class TestAutoreload(Fixture): | |
142 |
|
140 | |||
143 | def test_reload_enums(self): |
|
141 | def test_reload_enums(self): | |
144 | import enum |
|
|||
145 | mod_name, mod_fn = self.new_module(textwrap.dedent(""" |
|
142 | mod_name, mod_fn = self.new_module(textwrap.dedent(""" | |
146 | from enum import Enum |
|
143 | from enum import Enum | |
147 | class MyEnum(Enum): |
|
144 | class MyEnum(Enum): |
@@ -1,4 +1,4 b'' | |||||
1 | from warnings import warn |
|
1 | from warnings import warn | |
2 |
|
2 | |||
3 | warn("IPython.utils.daemonize has moved to ipyparallel.apps.daemonize", stacklevel=2) |
|
3 | warn("IPython.utils.daemonize has moved to ipyparallel.apps.daemonize since IPython 4.0", DeprecationWarning, stacklevel=2) | |
4 | from ipyparallel.apps.daemonize import daemonize |
|
4 | from ipyparallel.apps.daemonize import daemonize |
@@ -15,7 +15,6 b' Utilities for working with stack frames.' | |||||
15 | #----------------------------------------------------------------------------- |
|
15 | #----------------------------------------------------------------------------- | |
16 |
|
16 | |||
17 | import sys |
|
17 | import sys | |
18 | from IPython.utils import py3compat |
|
|||
19 |
|
18 | |||
20 | #----------------------------------------------------------------------------- |
|
19 | #----------------------------------------------------------------------------- | |
21 | # Code |
|
20 | # Code |
@@ -5,9 +5,6 b'' | |||||
5 | # Distributed under the terms of the Modified BSD License. |
|
5 | # Distributed under the terms of the Modified BSD License. | |
6 |
|
6 | |||
7 |
|
7 | |||
8 | import io as stdlib_io |
|
|||
9 | import os.path |
|
|||
10 | import stat |
|
|||
11 | import sys |
|
8 | import sys | |
12 | from io import StringIO |
|
9 | from io import StringIO | |
13 |
|
10 | |||
@@ -16,9 +13,7 b' import unittest' | |||||
16 |
|
13 | |||
17 | import nose.tools as nt |
|
14 | import nose.tools as nt | |
18 |
|
15 | |||
19 | from IPython.testing.decorators import skipif, skip_win32 |
|
|||
20 | from IPython.utils.io import IOStream, Tee, capture_output |
|
16 | from IPython.utils.io import IOStream, Tee, capture_output | |
21 | from IPython.utils.tempdir import TemporaryDirectory |
|
|||
22 |
|
17 | |||
23 |
|
18 | |||
24 | def test_tee_simple(): |
|
19 | def test_tee_simple(): |
@@ -21,9 +21,9 b' import IPython' | |||||
21 | from IPython import paths |
|
21 | from IPython import paths | |
22 | from IPython.testing import decorators as dec |
|
22 | from IPython.testing import decorators as dec | |
23 | from IPython.testing.decorators import (skip_if_not_win32, skip_win32, |
|
23 | from IPython.testing.decorators import (skip_if_not_win32, skip_win32, | |
24 |
onlyif_unicode_paths, |
|
24 | onlyif_unicode_paths, | |
25 | skip_win32_py38,) |
|
25 | skip_win32_py38,) | |
26 |
from IPython.testing.tools import make_tempfile |
|
26 | from IPython.testing.tools import make_tempfile | |
27 | from IPython.utils import path |
|
27 | from IPython.utils import path | |
28 | from IPython.utils.tempdir import TemporaryDirectory |
|
28 | from IPython.utils.tempdir import TemporaryDirectory | |
29 |
|
29 |
General Comments 0
You need to be logged in to leave comments.
Login now