Tests don't work with jupyter-core 5.1
frenzymadness opened this issue · comments
Jupyter-core produces this warning:
metakernel/__init__.py:2: in <module>
from ._metakernel import (
metakernel/_metakernel.py:20: in <module>
from jupyter_core.paths import jupyter_config_path, jupyter_config_dir
/usr/lib/python3.11/site-packages/jupyter_core/paths.py:176: in <module>
deprecation(
/usr/lib/python3.11/site-packages/jupyter_core/utils/__init__.py:87: in deprecation
warnings.warn(message, DeprecationWarning, stacklevel=stacklevel + 1)
E DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
E given by the platformdirs library. To remove this warning and
E see the appropriate new directories, set the environment variable
E `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
E The use of platformdirs will be the default in `jupyter_core` v6
Which causes all tests to fail.
This was fixed in #257, I'll cut a release
Should be fixed by https://github.com/Calysto/metakernel/releases/tag/v0.29.3
It really is, thank you!
@blink1073 when I use oct2py in a pytest test, then I still get this warning listed in the test summary. Any idea?
@deimi, I just released https://github.com/blink1073/oct2py/releases/tag/v5.6.0 which should fix the issue.
@blink1073 no still the same
(.venv) deimi@deimi:~/project$ pip list
Package Version
----------------- -------
astroid 2.12.13
asttokens 2.2.1
attrs 22.1.0
autopep8 2.0.0
backcall 0.2.0
colorama 0.4.1
debugpy 1.6.4
decorator 5.1.1
dill 0.3.6
entrypoints 0.4
exceptiongroup 1.0.4
executing 1.2.0
flake8 6.0.0
hooks4git 0.4.289
iniconfig 1.1.1
ipykernel 6.17.1
ipython 8.7.0
isort 5.10.1
jedi 0.18.2
jupyter_client 7.4.8
jupyter_core 5.1.0
lazy-object-proxy 1.8.0
matplotlib-inline 0.1.6
mccabe 0.7.0
metakernel 0.29.3
nest-asyncio 1.5.6
numpy 1.23.5
oct2py 5.6.0
octave_kernel 0.35.1
packaging 21.3
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
pip 22.0.2
platformdirs 2.5.4
pluggy 1.0.0
prompt-toolkit 3.0.33
psutil 5.9.4
ptyprocess 0.7.0
pure-eval 0.2.2
pycodestyle 2.10.0
pyflakes 3.0.1
Pygments 2.13.0
pylint 2.15.8
pyparsing 3.0.9
pytest 7.2.0
python-dateutil 2.8.2
pyzmq 24.0.1
scipy 1.9.3
setuptools 59.6.0
six 1.16.0
stack-data 0.6.2
tomli 2.0.1
tomlkit 0.11.6
tornado 6.2
traitlets 5.6.0
wcwidth 0.2.5
wrapt 1.14.1
* Executing task: scripts/run_unit_tests.sh
source /home/deimi/projects/.venv/bin/activate
================================================================================ test session starts =================================================================================
platform linux -- Python 3.10.6, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/deimi/projects
collected 2 items
test/test_octave_integration.py .. [100%]
================================================================================== warnings summary ==================================================================================
.venv/lib/python3.10/site-packages/metakernel/_metakernel.py:20
/home/deimi/projects/.venv/lib/python3.10/site-packages/metakernel/_metakernel.py:20: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
given by the platformdirs library. To remove this warning and
see the appropriate new directories, set the environment variable
`JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
The use of platformdirs will be the default in `jupyter_core` v6
from jupyter_core.paths import jupyter_config_path, jupyter_config_dir
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================ 2 passed, 1 warning in 1.37s ============================================================================
* Terminal will be reused by tasks, press any key to close it.
Yes that is expected, we're not suppressing the warning altogether, just not error-ring on it.
ah ok, thx!