2021年4月5日星期一

How to silence warning from import IPython.nbformat: "UserWarning: nbformat.current is deprecated."

I'm working with the example code for importing an IPython (Jupyter) notebook,
Importing Notebooks. The example code still runs fine, however it generates a warning that I would like to understand and fix:

site-packages/nbformat/current.py:15: UserWarning: nbformat.current is deprecated.    - use nbformat for read/write/validate public API  - use nbformat.vX directly to composing notebooks of a particular version      warnings.warn("""nbformat.current is deprecated.  

This warning has been discussed since 2015, at least, and yet I cannot find any constructive advice about what to do about it. Is this a warning that can be addressed by fixing code, or is it a function that will disappear from IPython without a replacement?

If you follow the link to the IPython blog, they claim that there is a newer version, but their link points to a non-existent page.

This code example is widely discussed in other threads in Stack Overflow, for example

python access functions in ipython notebook

https://stackoverflow.com/questions/66955833/how-to-silence-warning-from-import-ipython-nbformat-userwarning-nbformat-curr April 05, 2021 at 11:57PM

没有评论:

发表评论