Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/nbformat/v2/nbxml.py: 62%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

8 statements  

1"""REMOVED: Read and write notebook files as XML.""" 

2 

3from __future__ import annotations 

4 

5REMOVED_MSG = """\ 

6Reading notebooks as XML has been removed to harden security and avoid 

7possible denial-of-service attacks. 

8 

9The XML notebook format was deprecated before the Jupyter (previously IPython) 

10Notebook was ever released. We are not aware of anyone using it, so we have 

11removed it. 

12 

13If you were using this code, and you need to continue using it, feel free to 

14fork an earlier version of the nbformat package and maintain it yourself. 

15The issue which prompted this removal is: 

16 

17https://github.com/jupyter/nbformat/issues/132 

18""" 

19 

20 

21def reads(s, **kwargs): 

22 """REMOVED""" 

23 raise Exception(REMOVED_MSG) 

24 

25 

26def read(fp, **kwargs): 

27 """REMOVED""" 

28 raise Exception(REMOVED_MSG) 

29 

30 

31def to_notebook(root, **kwargs): 

32 """REMOVED""" 

33 raise Exception(REMOVED_MSG)