##// END OF EJS Templates
Use explicit relative imports...
Thomas Kluyver -
Show More
@@ -1,4 +1,4 b''
1 1 try:
2 2 from decorator import *
3 3 except ImportError:
4 from _decorator import *
4 from ._decorator import *
@@ -2,8 +2,8 b' try:'
2 2 from numpy.testing.decorators import *
3 3 from numpy.testing.noseclasses import KnownFailure
4 4 except ImportError:
5 from _decorators import *
5 from ._decorators import *
6 6 try:
7 from _numpy_testing_noseclasses import KnownFailure
7 from ._numpy_testing_noseclasses import KnownFailure
8 8 except ImportError:
9 9 pass
@@ -20,9 +20,9 b' import warnings'
20 20 #from numpy.testing.utils import \
21 21 # WarningManager, WarningMessage
22 22 # Our version:
23 from _numpy_testing_utils import WarningManager
23 from ._numpy_testing_utils import WarningManager
24 24 try:
25 from _numpy_testing_noseclasses import KnownFailureTest
25 from ._numpy_testing_noseclasses import KnownFailureTest
26 26 except:
27 27 pass
28 28
@@ -1,4 +1,4 b''
1 1 try:
2 2 from jsonpointer import *
3 3 except ImportError :
4 from _jsonpointer import *
4 from ._jsonpointer import *
@@ -1,4 +1,4 b''
1 1 try:
2 2 from jsonschema import *
3 3 except ImportError :
4 from _jsonschema import *
4 from ._jsonschema import *
@@ -2,4 +2,4 b' try:'
2 2 import pexpect
3 3 from pexpect import *
4 4 except ImportError:
5 from _pexpect import *
5 from ._pexpect import *
@@ -1,4 +1,4 b''
1 1 try:
2 2 from simplegeneric import *
3 3 except ImportError:
4 from _simplegeneric import *
4 from ._simplegeneric import *
@@ -35,7 +35,7 b' try:'
35 35 except ImportError:
36 36 paramiko = None
37 37 else:
38 from forward import forward_tunnel
38 from .forward import forward_tunnel
39 39
40 40 try:
41 41 from IPython.external import pexpect
@@ -5,7 +5,7 b' from IPython.core.displayhook import DisplayHook'
5 5 from IPython.kernel.inprocess.socket import SocketABC
6 6 from IPython.utils.jsonutil import encode_images
7 7 from IPython.utils.traitlets import Instance, Dict
8 from session import extract_header, Session
8 from .session import extract_header, Session
9 9
10 10 class ZMQDisplayHook(object):
11 11 """A simple displayhook that publishes the object's repr over a ZeroMQ
@@ -8,7 +8,7 b' import sys'
8 8
9 9 from IPython.utils.frame import extract_module_locals
10 10
11 from kernelapp import IPKernelApp
11 from .kernelapp import IPKernelApp
12 12
13 13 #-----------------------------------------------------------------------------
14 14 # Code
@@ -16,7 +16,7 b' from io import StringIO, UnsupportedOperation'
16 16
17 17 import zmq
18 18
19 from session import extract_header
19 from .session import extract_header
20 20
21 21 from IPython.utils import py3compat
22 22
@@ -35,9 +35,9 b' from IPython.utils.traitlets import ('
35 35 Type
36 36 )
37 37
38 from serialize import serialize_object, unpack_apply_message
39 from session import Session
40 from zmqshell import ZMQInteractiveShell
38 from .serialize import serialize_object, unpack_apply_message
39 from .session import Session
40 from .zmqshell import ZMQInteractiveShell
41 41
42 42
43 43 #-----------------------------------------------------------------------------
@@ -50,13 +50,13 b' from IPython.utils.importstring import import_item'
50 50 from IPython.kernel import write_connection_file
51 51
52 52 # local imports
53 from heartbeat import Heartbeat
54 from ipkernel import Kernel
55 from parentpoller import ParentPollerUnix, ParentPollerWindows
56 from session import (
53 from .heartbeat import Heartbeat
54 from .ipkernel import Kernel
55 from .parentpoller import ParentPollerUnix, ParentPollerWindows
56 from .session import (
57 57 Session, session_flags, session_aliases, default_secure,
58 58 )
59 from zmqshell import ZMQInteractiveShell
59 from .zmqshell import ZMQInteractiveShell
60 60
61 61 #-----------------------------------------------------------------------------
62 62 # Flags and Aliases
@@ -50,7 +50,7 b' from IPython.kernel.zmq.displayhook import ZMQShellDisplayHook'
50 50 from IPython.kernel.zmq.datapub import ZMQDataPublisher
51 51 from IPython.kernel.zmq.session import extract_header
52 52 from IPython.kernel.comm import CommManager
53 from session import Session
53 from .session import Session
54 54
55 55 #-----------------------------------------------------------------------------
56 56 # Functions and classes
@@ -1,7 +1,7 b''
1 1 """Utilities for converting notebooks to and from different formats."""
2 2
3 3 from .exporters import *
4 import filters
5 import preprocessors
6 import postprocessors
7 import writers
4 from . import filters
5 from . import preprocessors
6 from . import postprocessors
7 from . import writers
@@ -30,7 +30,7 b' from IPython.parallel import error'
30 30 from IPython.parallel import AsyncResult, AsyncHubResult
31 31 from IPython.parallel import LoadBalancedView, DirectView
32 32
33 from clienttest import ClusterTestCase, segfault, wait, add_engines
33 from .clienttest import ClusterTestCase, segfault, wait, add_engines
34 34
35 35 def setup():
36 36 add_engines(4, total=True)
@@ -23,11 +23,11 b' from IPython.qt.rich_text import HtmlExporter'
23 23 from IPython.qt.util import MetaQObjectHasTraits, get_font
24 24 from IPython.utils.text import columnize
25 25 from IPython.utils.traitlets import Bool, Enum, Integer, Unicode
26 from ansi_code_processor import QtAnsiCodeProcessor
27 from completion_widget import CompletionWidget
28 from completion_html import CompletionHtml
29 from completion_plain import CompletionPlain
30 from kill_ring import QtKillRing
26 from .ansi_code_processor import QtAnsiCodeProcessor
27 from .completion_widget import CompletionWidget
28 from .completion_html import CompletionHtml
29 from .completion_plain import CompletionPlain
30 from .kill_ring import QtKillRing
31 31
32 32
33 33 #-----------------------------------------------------------------------------
@@ -16,11 +16,11 b' from IPython.core.inputtransformer import classic_prompt'
16 16 from IPython.core.oinspect import call_tip
17 17 from IPython.qt.base_frontend_mixin import BaseFrontendMixin
18 18 from IPython.utils.traitlets import Bool, Instance, Unicode
19 from bracket_matcher import BracketMatcher
20 from call_tip_widget import CallTipWidget
21 from completion_lexer import CompletionLexer
22 from history_console_widget import HistoryConsoleWidget
23 from pygments_highlighter import PygmentsHighlighter
19 from .bracket_matcher import BracketMatcher
20 from .call_tip_widget import CallTipWidget
21 from .completion_lexer import CompletionLexer
22 from .history_console_widget import HistoryConsoleWidget
23 from .pygments_highlighter import PygmentsHighlighter
24 24
25 25
26 26 class FrontendHighlighter(PygmentsHighlighter):
@@ -3,7 +3,7 b' from IPython.external.qt import QtGui'
3 3
4 4 # Local imports
5 5 from IPython.utils.traitlets import Bool
6 from console_widget import ConsoleWidget
6 from .console_widget import ConsoleWidget
7 7
8 8
9 9 class HistoryConsoleWidget(ConsoleWidget):
@@ -22,8 +22,8 b' from IPython.external.qt import QtCore, QtGui'
22 22 from IPython.core.inputsplitter import IPythonInputSplitter
23 23 from IPython.core.inputtransformer import ipy_prompt
24 24 from IPython.utils.traitlets import Bool, Unicode
25 from frontend_widget import FrontendWidget
26 import styles
25 from .frontend_widget import FrontendWidget
26 from . import styles
27 27
28 28 #-----------------------------------------------------------------------------
29 29 # Constants
@@ -17,7 +17,7 b' from IPython.external.qt import QtCore, QtGui'
17 17 # Local imports
18 18 from IPython.utils.traitlets import Bool
19 19 from IPython.qt.svg import save_svg, svg_to_clipboard, svg_to_image
20 from ipython_widget import IPythonWidget
20 from .ipython_widget import IPythonWidget
21 21
22 22
23 23 class RichIPythonWidget(IPythonWidget):
@@ -6,7 +6,7 b' from IPython.external.qt import QtCore'
6 6
7 7 # IPython imports.
8 8 from IPython.utils.traitlets import HasTraits, Type
9 from util import MetaQObjectHasTraits, SuperQObject
9 from .util import MetaQObjectHasTraits, SuperQObject
10 10
11 11
12 12 class ChannelQObject(SuperQObject):
@@ -21,7 +21,7 b' def test(all=False):'
21 21
22 22 # Do the import internally, so that this function doesn't increase total
23 23 # import time
24 from iptest import run_iptestall
24 from .iptest import run_iptestall
25 25 run_iptestall(inc_slow=all)
26 26
27 27 # So nose doesn't try to run this as a test itself and we end up with an
@@ -55,7 +55,7 b' import unittest'
55 55 from IPython.external.decorator import decorator
56 56
57 57 # Expose the unittest-driven decorators
58 from ipunittest import ipdoctest, ipdocstring
58 from .ipunittest import ipdoctest, ipdocstring
59 59
60 60 # Grab the numpy-specific decorators which we keep in a file that we
61 61 # occasionally update from upstream: decorators.py is a copy of
@@ -6,8 +6,8 b' from nose.core import main'
6 6 from nose.plugins.builtin import plugins
7 7 from nose.plugins.doctests import Doctest
8 8
9 import ipdoctest
10 from ipdoctest import IPDocTestRunner
9 from . import ipdoctest
10 from .ipdoctest import IPDocTestRunner
11 11
12 12 if __name__ == '__main__':
13 13 print 'WARNING: this code is incomplete!'
@@ -25,9 +25,9 b' try:'
25 25 except ImportError:
26 26 import pickle
27 27
28 import codeutil # This registers a hook when it's imported
29 import py3compat
30 from importstring import import_item
28 from . import codeutil # This registers a hook when it's imported
29 from . import py3compat
30 from .importstring import import_item
31 31
32 32 from IPython.config import Application
33 33
@@ -4,6 +4,6 b''
4 4 import sys
5 5
6 6 if sys.version_info[0] >= 3:
7 from _tokenize_py3 import *
7 from ._tokenize_py3 import *
8 8 else:
9 from _tokenize_py2 import *
9 from ._tokenize_py2 import *
General Comments 0
You need to be logged in to leave comments. Login now