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

Skip to content

Commit 7195786

Browse files
committed
Remove more deprecated utilities.
Most subcommands have been in jupyter for many years, and the -e export flags has been doing nothing for a long time as well.
1 parent 2a9136d commit 7195786

3 files changed

Lines changed: 2 additions & 33 deletions

File tree

IPython/core/magics/basic.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,6 @@ def precision(self, s=''):
560560
return ptformatter.float_format
561561

562562
@magic_arguments.magic_arguments()
563-
@magic_arguments.argument(
564-
'-e', '--export', action='store_true', default=False,
565-
help=argparse.SUPPRESS
566-
)
567563
@magic_arguments.argument(
568564
'filename', type=str,
569565
help='Notebook name or filename'
@@ -574,9 +570,6 @@ def notebook(self, s):
574570
575571
This function can export the current IPython history to a notebook file.
576572
For example, to export the history to "foo.ipynb" do "%notebook foo.ipynb".
577-
578-
The -e or --export flag is deprecated in IPython 5.2, and will be
579-
removed in the future.
580573
"""
581574
args = magic_arguments.parse_argstring(self.notebook, s)
582575

IPython/core/tests/test_magic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ def test_notebook_export_json():
750750
_ip.history_manager.store_inputs(i, cmd)
751751
with TemporaryDirectory() as td:
752752
outfile = os.path.join(td, "nb.ipynb")
753-
_ip.magic("notebook -e %s" % outfile)
753+
_ip.magic("notebook %s" % outfile)
754754

755755

756756
class TestEnv(TestCase):

IPython/terminal/ipapp.py

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -208,26 +208,6 @@ def _classes_default(self):
208208
StoreMagics,
209209
]
210210

211-
deprecated_subcommands = dict(
212-
qtconsole=('qtconsole.qtconsoleapp.JupyterQtConsoleApp',
213-
"""DEPRECATED, Will be removed in IPython 6.0 : Launch the Jupyter Qt Console."""
214-
),
215-
notebook=('notebook.notebookapp.NotebookApp',
216-
"""DEPRECATED, Will be removed in IPython 6.0 : Launch the Jupyter HTML Notebook Server."""
217-
),
218-
console=('jupyter_console.app.ZMQTerminalIPythonApp',
219-
"""DEPRECATED, Will be removed in IPython 6.0 : Launch the Jupyter terminal-based Console."""
220-
),
221-
nbconvert=('nbconvert.nbconvertapp.NbConvertApp',
222-
"DEPRECATED, Will be removed in IPython 6.0 : Convert notebooks to/from other formats."
223-
),
224-
trust=('nbformat.sign.TrustNotebookApp',
225-
"DEPRECATED, Will be removed in IPython 6.0 : Sign notebooks to trust their potentially unsafe contents at load."
226-
),
227-
kernelspec=('jupyter_client.kernelspecapp.KernelSpecApp',
228-
"DEPRECATED, Will be removed in IPython 6.0 : Manage Jupyter kernel specifications."
229-
),
230-
)
231211
subcommands = dict(
232212
profile = ("IPython.core.profileapp.ProfileApp",
233213
"Create and manage IPython profiles."
@@ -242,11 +222,7 @@ def _classes_default(self):
242222
"Manage the IPython history database."
243223
),
244224
)
245-
deprecated_subcommands['install-nbextension'] = (
246-
"notebook.nbextensions.InstallNBExtensionApp",
247-
"DEPRECATED, Will be removed in IPython 6.0 : Install Jupyter notebook extension files"
248-
)
249-
subcommands.update(deprecated_subcommands)
225+
250226

251227
# *do* autocreate requested profile, but don't create the config file.
252228
auto_create=Bool(True)

0 commit comments

Comments
 (0)