When I import a package I get the following deprecation message. I can't find any documentation about it. I know I can suppress the warnings but I would like to know what's happening.
import pandas as pd
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ipykernel/ipkernel.py:287: DeprecationWarning: `should_run_async` will not call `transform_cell` automatically in the future. Please pass the result to `transformed_cell` argument and any exception that happen during thetransform in `preprocessing_exc_tuple` in IPython 7.17 and above.
and should_run_async(code)
Installation: Python 3.8.5, jupyter-client 6.1.6, jupyter-core 4.6.3, jupyterlab 2.2.4, jupyterlab-server 1.2.0 on Mac OS
removing is danger because user may used that and if a developer want to remove a thing first have to notify others to don't use this feature or things and after this he can remove. and DeprecationWarning is this notification.
Deprecation warnings are a common thing in our industry. They are warnings that notify us that a specific feature (e.g. a method) will be removed soon (usually in the next minor or major version) and should be replaced with something else.
To warn about deprecation, you need to set Python's builtin DeprecationWarning as category. To let the warning refer to the caller, so you know exactly where you use deprecated code, you have to set stacklevel=2 .
This fixes an issue happens in jupyter notebook. MAVENSDC/PyTplot#122 Fix ipython version to avoid warnings. There were some weird warnings coming from an internal `ipython`/`ipykernel` API, causing `pytest-nbval` to fail its tests. So, downgrading `ipython` to 7.10 until that is fixed.
We’ll occasionally send you account related emails. Already on GitHub? Sign in to your account This fixes an issue happens in jupyter notebook. The jupyter notebook crashes when the get_y_range is called in tplot_utilitis.py The root cause of this issue seems to be a bug in ipykernel.
Installation: Python 3.8.5, jupyter-client 6.1.6, jupyter-core 4.6.3, jupyterlab 2.2.4, jupyterlab-server 1.2.0 on Mac OS Show activity on this post. Upgrading ipykernel 5.3.4 seems to have fixed it for me. Make sure to restart your Juptyer server afterwards.
Upgrading ipykernel
5.3.4 seems to have fixed it for me.
pip install --upgrade ipykernel
Make sure to restart your Juptyer server afterwards.
I came up with this by inserting a breakpoint()
at /ipkernel.py:287
and using w
to see what was making the call. If this fix doesn't work for you, worth checking what's making the call in your case.
Same here with ipykernel==5.3.4 and ipython==7.19.0. Downgrading to ipython 7.10.0 fixed the problem.
pip install ipython==7.10.0
Optionally for suppressing DeprecationWarnings:
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
Same here with python==3.9.2, ipykernel==5.5.0 and ipython==7.21.0 in a conda environment defaulting to conda-forge repositories. Upgrading ipykernel to the latest 5.5.3 doesn't solve anything.
It is currently linked to this ipykernel issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With