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

Skip to content

Commit 2436f9b

Browse files
minrkCarreau
authored andcommitted
undeprecate terminal.interactiveshell
move terminal.ptshell to terminal.interactiveshell, since it is the new implementation of the class. The deprecation was there while the readline implementation remained, but there is no need for it now that there is just one implementation of TerminalInteractiveShell.
1 parent 699a38a commit 2436f9b

5 files changed

Lines changed: 571 additions & 593 deletions

File tree

IPython/core/interactiveshell.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,22 +365,22 @@ def _exiter_default(self):
365365
# deprecated prompt traits:
366366

367367
prompt_in1 = Unicode('In [\\#]: ',
368-
help="Deprecated since IPython 4.0 and ignored since 5.0, set IPython.terminal.ptshell.TerminalInteractiveShell.prompts object directly."
368+
help="Deprecated since IPython 4.0 and ignored since 5.0, set TerminalInteractiveShell.prompts object directly."
369369
).tag(config=True)
370370
prompt_in2 = Unicode(' .\\D.: ',
371-
help="Deprecated since IPython 4.0 and ignored since 5.0, set IPython.terminal.ptshell.TerminalInteractiveShell.prompts object directly."
371+
help="Deprecated since IPython 4.0 and ignored since 5.0, set TerminalInteractiveShell.prompts object directly."
372372
).tag(config=True)
373373
prompt_out = Unicode('Out[\\#]: ',
374-
help="Deprecated since IPython 4.0 and ignored since 5.0, set IPython.terminal.ptshell.TerminalInteractiveShell.prompts object directly."
374+
help="Deprecated since IPython 4.0 and ignored since 5.0, set TerminalInteractiveShell.prompts object directly."
375375
).tag(config=True)
376376
prompts_pad_left = Bool(True,
377-
help="Deprecated since IPython 4.0 and ignored since 5.0, set IPython.terminal.ptshell.TerminalInteractiveShell.prompts object directly."
377+
help="Deprecated since IPython 4.0 and ignored since 5.0, set TerminalInteractiveShell.prompts object directly."
378378
).tag(config=True)
379379

380380
@observe('prompt_in1', 'prompt_in2', 'prompt_out', 'prompt_pad_left')
381381
def _prompt_trait_changed(self, change):
382382
name = change['name']
383-
warn("InteractiveShell.{name} is deprecated since IPython 4.0 and ignored since 5.0, set IPython.terminal.ptshell.TerminalInteractiveShell.prompts object directly.".format(
383+
warn("InteractiveShell.{name} is deprecated since IPython 4.0 and ignored since 5.0, set TerminalInteractiveShell.prompts object directly.".format(
384384
name=name)
385385
)
386386
# protect against weird cases where self.config may not exist:

IPython/terminal/embed.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313

1414
from IPython.core import ultratb, compilerop
1515
from IPython.core.magic import Magics, magics_class, line_magic
16-
from IPython.core.interactiveshell import DummyMod
17-
from IPython.core.interactiveshell import InteractiveShell
18-
from IPython.terminal.ptshell import TerminalInteractiveShell
16+
from IPython.core.interactiveshell import DummyMod, InteractiveShell
17+
from IPython.terminal.interactiveshell import TerminalInteractiveShell
1918
from IPython.terminal.ipapp import load_default_config
2019

2120
from traitlets import Bool, CBool, Unicode

0 commit comments

Comments
 (0)