Show More
@@ -0,0 +1,22 b'' | |||
|
1 | """ | |
|
2 | Shim to maintain backwards compatibility with old IPython.nbformat imports. | |
|
3 | """ | |
|
4 | # Copyright (c) IPython Development Team. | |
|
5 | # Distributed under the terms of the Modified BSD License. | |
|
6 | ||
|
7 | from __future__ import print_function | |
|
8 | ||
|
9 | # Stdlib | |
|
10 | import sys | |
|
11 | import types | |
|
12 | from warnings import warn | |
|
13 | ||
|
14 | warn("The `IPython.nbformat` package has been deprecated. " | |
|
15 | "You should import from jupyter_nbformat instead.") | |
|
16 | ||
|
17 | from IPython.utils.shimmodule import ShimModule | |
|
18 | ||
|
19 | # Unconditionally insert the shim into sys.modules so that further import calls | |
|
20 | # trigger the custom attribute access above | |
|
21 | ||
|
22 | sys.modules['IPython.nbformat'] = ShimModule('nbformat', mirror='jupyter_nbformat') |
|
1 | NO CONTENT: file renamed from IPython/nbformat/__init__.py to jupyter_nbformat/__init__.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/converter.py to jupyter_nbformat/converter.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/current.py to jupyter_nbformat/current.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/notebooknode.py to jupyter_nbformat/notebooknode.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/reader.py to jupyter_nbformat/reader.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/sign.py to jupyter_nbformat/sign.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/__init__.py to jupyter_nbformat/tests/__init__.py |
@@ -30,13 +30,4 b' class TestsBase(unittest.TestCase):' | |||
|
30 | 30 | |
|
31 | 31 | |
|
32 | 32 | def _get_files_path(self): |
|
33 | ||
|
34 | #Get the relative path to this module in the IPython directory. | |
|
35 | names = self.__module__.split(u'.')[1:-1] | |
|
36 | ||
|
37 | #Build a path using the IPython directory and the relative path we just | |
|
38 | #found. | |
|
39 | path = IPython.__path__[0] | |
|
40 | for name in names: | |
|
41 | path = os.path.join(path, name) | |
|
42 | return path | |
|
33 | return os.path.dirname(__file__) |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/invalid.ipynb to jupyter_nbformat/tests/invalid.ipynb |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/test2.ipynb to jupyter_nbformat/tests/test2.ipynb |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/test3.ipynb to jupyter_nbformat/tests/test3.ipynb |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/test4.ipynb to jupyter_nbformat/tests/test4.ipynb |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/test4plus.ipynb to jupyter_nbformat/tests/test4plus.ipynb |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/test_api.py to jupyter_nbformat/tests/test_api.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/test_convert.py to jupyter_nbformat/tests/test_convert.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/test_reader.py to jupyter_nbformat/tests/test_reader.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/test_sign.py to jupyter_nbformat/tests/test_sign.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/tests/test_validator.py to jupyter_nbformat/tests/test_validator.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v1/__init__.py to jupyter_nbformat/v1/__init__.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v1/convert.py to jupyter_nbformat/v1/convert.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v1/nbbase.py to jupyter_nbformat/v1/nbbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v1/nbjson.py to jupyter_nbformat/v1/nbjson.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v1/rwbase.py to jupyter_nbformat/v1/rwbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v1/tests/__init__.py to jupyter_nbformat/v1/tests/__init__.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v1/tests/nbexamples.py to jupyter_nbformat/v1/tests/nbexamples.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v1/tests/test_json.py to jupyter_nbformat/v1/tests/test_json.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v1/tests/test_nbbase.py to jupyter_nbformat/v1/tests/test_nbbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/__init__.py to jupyter_nbformat/v2/__init__.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/convert.py to jupyter_nbformat/v2/convert.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/nbbase.py to jupyter_nbformat/v2/nbbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/nbjson.py to jupyter_nbformat/v2/nbjson.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/nbpy.py to jupyter_nbformat/v2/nbpy.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/nbxml.py to jupyter_nbformat/v2/nbxml.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/rwbase.py to jupyter_nbformat/v2/rwbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/tests/__init__.py to jupyter_nbformat/v2/tests/__init__.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/tests/nbexamples.py to jupyter_nbformat/v2/tests/nbexamples.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/tests/test_json.py to jupyter_nbformat/v2/tests/test_json.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/tests/test_nbbase.py to jupyter_nbformat/v2/tests/test_nbbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v2/tests/test_nbpy.py to jupyter_nbformat/v2/tests/test_nbpy.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/__init__.py to jupyter_nbformat/v3/__init__.py |
@@ -8,7 +8,7 b' from .nbbase import (' | |||
|
8 | 8 | nbformat, nbformat_minor |
|
9 | 9 | ) |
|
10 | 10 | |
|
11 |
from |
|
|
11 | from jupyter_nbformat import v2 | |
|
12 | 12 | |
|
13 | 13 | def _unbytes(obj): |
|
14 | 14 | """There should be no bytes objects in a notebook |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/nbbase.py to jupyter_nbformat/v3/nbbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/nbformat.v3.schema.json to jupyter_nbformat/v3/nbformat.v3.schema.json |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/nbjson.py to jupyter_nbformat/v3/nbjson.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/nbpy.py to jupyter_nbformat/v3/nbpy.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/rwbase.py to jupyter_nbformat/v3/rwbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/tests/__init__.py to jupyter_nbformat/v3/tests/__init__.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/tests/formattest.py to jupyter_nbformat/v3/tests/formattest.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/tests/nbexamples.py to jupyter_nbformat/v3/tests/nbexamples.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/tests/test_json.py to jupyter_nbformat/v3/tests/test_json.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/tests/test_misc.py to jupyter_nbformat/v3/tests/test_misc.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/tests/test_nbbase.py to jupyter_nbformat/v3/tests/test_nbbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v3/tests/test_nbpy.py to jupyter_nbformat/v3/tests/test_nbpy.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/__init__.py to jupyter_nbformat/v4/__init__.py |
@@ -11,7 +11,7 b' from .nbbase import (' | |||
|
11 | 11 | NotebookNode, |
|
12 | 12 | ) |
|
13 | 13 | |
|
14 |
from |
|
|
14 | from jupyter_nbformat import v3 | |
|
15 | 15 | from IPython.utils.log import get_logger |
|
16 | 16 | |
|
17 | 17 | def _warn_if_invalid(nb, version): |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/nbbase.py to jupyter_nbformat/v4/nbbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/nbformat.v4.schema.json to jupyter_nbformat/v4/nbformat.v4.schema.json |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/nbjson.py to jupyter_nbformat/v4/nbjson.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/rwbase.py to jupyter_nbformat/v4/rwbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/tests/__init__.py to jupyter_nbformat/v4/tests/__init__.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/tests/formattest.py to jupyter_nbformat/v4/tests/formattest.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/tests/nbexamples.py to jupyter_nbformat/v4/tests/nbexamples.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/tests/test_convert.py to jupyter_nbformat/v4/tests/test_convert.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/tests/test_json.py to jupyter_nbformat/v4/tests/test_json.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/tests/test_nbbase.py to jupyter_nbformat/v4/tests/test_nbbase.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/v4/tests/test_validate.py to jupyter_nbformat/v4/tests/test_validate.py |
|
1 | NO CONTENT: file renamed from IPython/nbformat/validator.py to jupyter_nbformat/validator.py |
@@ -196,11 +196,11 b' def find_package_data():' | |||
|
196 | 196 | 'preprocessors/tests/files/*.*', |
|
197 | 197 | ], |
|
198 | 198 | 'IPython.nbconvert.filters' : ['marked.js'], |
|
199 | 'IPython.nbformat' : [ | |
|
200 | 'tests/*.ipynb', | |
|
201 | 'v3/nbformat.v3.schema.json', | |
|
202 | 'v4/nbformat.v4.schema.json', | |
|
203 | ], | |
|
199 | # 'IPython.nbformat' : [ | |
|
200 | # 'tests/*.ipynb', | |
|
201 | # 'v3/nbformat.v3.schema.json', | |
|
202 | # 'v4/nbformat.v4.schema.json', | |
|
203 | # ], | |
|
204 | 204 | 'IPython.kernel': ['resources/*.*'], |
|
205 | 205 | } |
|
206 | 206 |
General Comments 0
You need to be logged in to leave comments.
Login now