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

Skip to content

Commit e549d87

Browse files
committed
jupyter_nbformat is now nbformat
1 parent 81b0446 commit e549d87

8 files changed

Lines changed: 10 additions & 10 deletions

File tree

IPython/core/interactiveshell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2689,7 +2689,7 @@ def safe_execfile_ipy(self, fname, shell_futures=False):
26892689
def get_cells():
26902690
"""generator for sequence of code blocks to run"""
26912691
if fname.endswith('.ipynb'):
2692-
from jupyter_nbformat import read
2692+
from nbformat import read
26932693
with io_open(fname) as f:
26942694
nb = read(f, as_version=4)
26952695
if not nb.cells:

IPython/core/magics/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ def notebook(self, s):
596596
"""
597597
args = magic_arguments.parse_argstring(self.notebook, s)
598598

599-
from jupyter_nbformat import write, v4
599+
from nbformat import write, v4
600600
args.filename = unquote_filename(args.filename)
601601
if args.export:
602602
cells = []

IPython/core/tests/test_magic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ def test_extension():
619619
tmpdir.cleanup()
620620

621621

622-
@dec.skip_without('jupyter_nbformat')
622+
@dec.skip_without('nbformat')
623623
def test_notebook_export_json():
624624
_ip = get_ipython()
625625
_ip.history_manager.reset() # Clear any existing history.

IPython/core/tests/test_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,10 @@ def test_ignore_sys_exit(self):
375375
with tt.AssertNotPrints('SystemExit'):
376376
_ip.magic('run -e %s' % self.fname)
377377

378-
@dec.skip_without('jupyter_nbformat') # Requires jsonschema
378+
@dec.skip_without('nbformat') # Requires jsonschema
379379
def test_run_nb(self):
380380
"""Test %run notebook.ipynb"""
381-
from jupyter_nbformat import v4, writes
381+
from nbformat import v4, writes
382382
nb = v4.new_notebook(
383383
cells=[
384384
v4.new_markdown_cell("The Ultimate Question of Everything"),

IPython/nbformat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
from warnings import warn
99

1010
warn("The `IPython.nbformat` package has been deprecated. "
11-
"You should import from jupyter_nbformat instead.")
11+
"You should import from nbformat instead.")
1212

1313
from IPython.utils.shimmodule import ShimModule
1414

1515
# Unconditionally insert the shim into sys.modules so that further import calls
1616
# trigger the custom attribute access above
1717

1818
sys.modules['IPython.nbformat'] = ShimModule(
19-
src='IPython.nbformat', mirror='jupyter_nbformat')
19+
src='IPython.nbformat', mirror='nbformat')

IPython/terminal/ipapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def _classes_default(self):
231231
nbconvert=('nbconvert.nbconvertapp.NbConvertApp',
232232
"DEPRECATED: Convert notebooks to/from other formats."
233233
),
234-
trust=('jupyter_nbformat.sign.TrustNotebookApp',
234+
trust=('nbformat.sign.TrustNotebookApp',
235235
"DEPRECATED: Sign notebooks to trust their potentially unsafe contents at load."
236236
),
237237
kernelspec=('jupyter_client.kernelspecapp.KernelSpecApp',

IPython/terminal/tests/test_help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ def test_locate_help():
2525
def test_locate_profile_help():
2626
tt.help_all_output_test("locate profile")
2727

28-
@skip_without('jupyter_nbformat') # Requires jsonschema to be installed
28+
@skip_without('nbformat') # Requires jsonschema to be installed
2929
def test_trust_help():
3030
tt.help_all_output_test("trust")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def run(self):
207207
test = ['nose>=0.10.1', 'requests', 'testpath'],
208208
terminal = [],
209209
kernel = ['ipykernel'],
210-
nbformat = ['jupyter_nbformat'],
210+
nbformat = ['nbformat'],
211211
notebook = ['jupyter_notebook'],
212212
nbconvert = ['nbconvert'],
213213
)

0 commit comments

Comments
 (0)