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

7 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-07-01 06:54 +0000

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

2""" 

3 

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)