pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/ipython/ipython/commit/390d0400cfafb2270b35bc5634f19e40b2a2e249

a60c69660fa.css" /> Change absolute imports to relative imports to facilitate processes e… · ipython/ipython@390d040 · GitHub
Skip to content

Commit 390d040

Browse files
committed
Change absolute imports to relative imports to facilitate processes embedding kernel or debugger
1 parent ae961ec commit 390d040

10 files changed

Lines changed: 30 additions & 30 deletions

File tree

IPython/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88
from warnings import warn
99

10-
from IPython.utils.shimmodule import ShimModule, ShimWarning
10+
from .utils.shimmodule import ShimModule, ShimWarning
1111

1212
warn("The `IPython.config` package has been deprecated since IPython 4.0. "
1313
"You should import from traitlets.config instead.", ShimWarning)

IPython/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import pathlib
77
import shutil
88

9-
from IPython.testing import tools
9+
from .testing import tools
1010

1111

1212
def get_ipython():
13-
from IPython.terminal.interactiveshell import TerminalInteractiveShell
13+
from .terminal.interactiveshell import TerminalInteractiveShell
1414
if TerminalInteractiveShell._instance:
1515
return TerminalInteractiveShell.instance()
1616

@@ -60,7 +60,7 @@ def inject():
6060
builtins.ip = get_ipython()
6161
builtins.ip.system = types.MethodType(xsys, ip)
6262
builtins.ip.builtin_trap.activate()
63-
from IPython.core import page
63+
from .core import page
6464

6565
page.pager_page = nopage
6666
# yield

IPython/core/alias.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import sys
2626

2727
from traitlets.config.configurable import Configurable
28-
from IPython.core.error import UsageError
28+
from .error import UsageError
2929

3030
from traitlets import List, Instance
3131
from logging import error

IPython/core/completerlib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
from zipimport import zipimporter
3131

3232
# Our own imports
33-
from IPython.core.completer import expand_user, compress_user
34-
from IPython.core.error import TryNext
35-
from IPython.utils._process_common import arg_split
33+
from .completer import expand_user, compress_user
34+
from .error import TryNext
35+
from ..utils._process_common import arg_split
3636

3737
# FIXME: this should be pulled in with the right call via the component system
3838
from IPython import get_ipython

IPython/core/formatters.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
from decorator import decorator
2121

2222
from traitlets.config.configurable import Configurable
23-
from IPython.core.getipython import get_ipython
24-
from IPython.utils.sentinel import Sentinel
25-
from IPython.utils.dir2 import get_real_method
26-
from IPython.lib import pretty
23+
from .getipython import get_ipython
24+
from ..utils.sentinel import Sentinel
25+
from ..utils.dir2 import get_real_method
26+
from ..lib import pretty
2727
from traitlets import (
2828
Bool, Dict, Integer, Unicode, CUnicode, ObjectName, List,
2929
ForwardDeclaredInstance,
@@ -1015,7 +1015,7 @@ def format_display_data(obj, include=None, exclude=None):
10151015
data dict. If this is set all format types will be computed,
10161016
except for those included in this argument.
10171017
"""
1018-
from IPython.core.interactiveshell import InteractiveShell
1018+
from .interactiveshell import InteractiveShell
10191019

10201020
return InteractiveShell.instance().display_formatter.format(
10211021
obj,

IPython/core/historyapp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
import sqlite3
1010

1111
from traitlets.config.application import Application
12-
from IPython.core.application import BaseIPythonApplication
12+
from .application import BaseIPythonApplication
1313
from traitlets import Bool, Int, Dict
14-
from IPython.utils.io import ask_yes_no
14+
from ..utils.io import ask_yes_no
1515

1616
trim_hist_help = """Trim the IPython history database to the last 1000 entries.
1717

IPython/core/hooks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def load_ipython_extension(ip):
4040
import warnings
4141
import sys
4242

43-
from IPython.core.error import TryNext
43+
from .error import TryNext
4444

4545
# List here all the default hooks. For now it's just the editor functions
4646
# but over time we'll move here all the public API for user-accessible things.
@@ -83,7 +83,7 @@ def editor(self, filename, linenum=None, wait=True):
8383
raise TryNext()
8484

8585
import tempfile
86-
from IPython.utils.decorators import undoc
86+
from ..utils.decorators import undoc
8787

8888
@undoc
8989
def fix_error_editor(self,filename,linenum,column,msg):
@@ -212,7 +212,7 @@ def pre_run_code_hook(self):
212212
def clipboard_get(self):
213213
""" Get text from the clipboard.
214214
"""
215-
from IPython.lib.clipboard import (
215+
from ..lib.clipboard import (
216216
osx_clipboard_get, tkinter_clipboard_get,
217217
win32_clipboard_get
218218
)

IPython/core/magic.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
from getopt import getopt, GetoptError
1818

1919
from traitlets.config.configurable import Configurable
20-
from IPython.core import oinspect
21-
from IPython.core.error import UsageError
22-
from IPython.core.inputtransformer2 import ESC_MAGIC, ESC_MAGIC2
20+
from . import oinspect
21+
from .error import UsageError
22+
from .inputtransformer2 import ESC_MAGIC, ESC_MAGIC2
2323
from decorator import decorator
24-
from IPython.utils.ipstruct import Struct
25-
from IPython.utils.process import arg_split
26-
from IPython.utils.text import dedent
24+
from ..utils.ipstruct import Struct
25+
from ..utils.process import arg_split
26+
from ..utils.text import dedent
2727
from traitlets import Bool, Dict, Instance, observe
2828
from logging import error
2929

IPython/core/prefilter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
from keyword import iskeyword
1313
import re
1414

15-
from IPython.core.autocall import IPyAutocall
15+
from .autocall import IPyAutocall
1616
from traitlets.config.configurable import Configurable
17-
from IPython.core.inputtransformer2 import (
17+
from .inputtransformer2 import (
1818
ESC_MAGIC,
1919
ESC_QUOTE,
2020
ESC_QUOTE2,
2121
ESC_PAREN,
2222
)
23-
from IPython.core.macro import Macro
24-
from IPython.core.splitinput import LineInfo
23+
from .macro import Macro
24+
from .splitinput import LineInfo
2525

2626
from traitlets import (
2727
List, Integer, Unicode, Bool, Instance, CRegExp

IPython/core/profiledir.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import errno
1010

1111
from traitlets.config.configurable import LoggingConfigurable
12-
from IPython.paths import get_ipython_package_dir
13-
from IPython.utils.path import expand_path, ensure_dir_exists
12+
from ..paths import get_ipython_package_dir
13+
from ..utils.path import expand_path, ensure_dir_exists
1414
from traitlets import Unicode, Bool, observe
1515

1616
#-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy