jupyter / jupyter-sphinx

Sphinx extension for rendering of Jupyter interactive widgets.
https://jupyter-sphinx.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
186 stars 65 forks source link

0.5.0: pytest fails in `tests/test_execute.py` with DeprecationWarning #246

Open kloczek opened 8 months ago

kloczek commented 8 months ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

Here is pytest output: ```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-sphinx-0.5.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-sphinx-0.5.0-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0 rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter-sphinx-0.5.0 configfile: pyproject.toml testpaths: tests/ collected 0 items / 1 error ==================================== ERRORS ==================================== ____________________ ERROR collecting tests/test_execute.py ____________________ /usr/lib/python3.8/site-packages/_pytest/runner.py:341: in from_call result: Optional[TResult] = func() /usr/lib/python3.8/site-packages/_pytest/runner.py:372: in call = CallInfo.from_call(lambda: list(collector.collect()), "collect") /usr/lib/python3.8/site-packages/_pytest/python.py:536: in collect self._inject_setup_module_fixture() /usr/lib/python3.8/site-packages/_pytest/python.py:550: in _inject_setup_module_fixture self.obj, ("setUpModule", "setup_module") /usr/lib/python3.8/site-packages/_pytest/python.py:315: in obj self._obj = obj = self._getobj() /usr/lib/python3.8/site-packages/_pytest/python.py:533: in _getobj return self._importtestmodule() /usr/lib/python3.8/site-packages/_pytest/python.py:622: in _importtestmodule mod = import_path(self.path, mode=importmode, root=self.config.rootpath) /usr/lib/python3.8/site-packages/_pytest/pathlib.py:567: in import_path importlib.import_module(module_name) /usr/lib64/python3.8/importlib/__init__.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) :1014: in _gcd_import ??? :991: in _find_and_load ??? :975: in _find_and_load_unlocked ??? :671: in _load_unlocked ??? /usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:186: in exec_module exec(co, module.__dict__) tests/test_execute.py:24: in from jupyter_sphinx.ast import ( ../../BUILDROOT/python-jupyter-sphinx-0.5.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jupyter_sphinx/__init__.py:6: in import ipywidgets /usr/lib/python3.8/site-packages/ipywidgets/__init__.py:25: in from .widgets import * /usr/lib/python3.8/site-packages/ipywidgets/widgets/__init__.py:4: in from .widget import Widget, CallbackDispatcher, register, widget_serialization /usr/lib/python3.8/site-packages/ipywidgets/widgets/widget.py:13: in from ipykernel.comm import Comm /usr/lib/python3.8/site-packages/ipykernel/__init__.py:7: in from .connect import * /usr/lib/python3.8/site-packages/ipykernel/connect.py:12: in import jupyter_client /usr/lib/python3.8/site-packages/jupyter_client/__init__.py:3: in from .asynchronous import AsyncKernelClient /usr/lib/python3.8/site-packages/jupyter_client/asynchronous/__init__.py:1: in from .client import AsyncKernelClient # noqa /usr/lib/python3.8/site-packages/jupyter_client/asynchronous/client.py:12: in from ..client import KernelClient, reqrep /usr/lib/python3.8/site-packages/jupyter_client/client.py:20: in from .connect import ConnectionFileMixin /usr/lib/python3.8/site-packages/jupyter_client/connect.py:22: in from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write /usr/lib/python3.8/site-packages/jupyter_core/paths.py:210: in deprecation( /usr/lib/python3.8/site-packages/jupyter_core/utils/__init__.py:89: 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 =========================== short test summary info ============================ ERROR tests/test_execute.py - DeprecationWarning: Jupyter is migrating its paths to use standard platform... !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! =============================== 1 error in 1.01s =============================== ```
List of installed modules in build env: ```console Package Version ----------------------------- ---------- alabaster 0.7.13 asttokens 2.4.1 attrs 23.1.0 Babel 2.14.0 backcall 0.2.0 beautifulsoup4 4.12.2 bleach 6.1.0 build 1.0.3 charset-normalizer 3.3.2 comm 0.2.0 contourpy 1.0.7 cppclean 0.13 cycler 0.12.1 debugpy 1.8.0 decorator 5.1.1 defusedxml 0.7.1 distro 1.8.0 dnf 4.18.2 docutils 0.20.1 editables 0.5 exceptiongroup 1.1.3 executing 2.0.1 fastjsonschema 2.18.0 fonttools 4.47.0 gpg 1.23.2 hatchling 1.21.0 html5lib 1.1 idna 3.6 imagesize 1.4.1 importlib-metadata 7.0.1 importlib-resources 6.1.1 iniconfig 2.0.0 installer 0.7.0 ipykernel 6.28.0 ipython 8.12.0 ipywidgets 8.0.3 jedi 0.19.1 Jinja2 3.1.2 jsonschema 4.19.1 jsonschema-specifications 2023.7.1 jupyter_client 8.6.0 jupyter_core 5.6.0 jupyterlab-pygments 0.1.2 jupyterlab-widgets 3.0.8 kiwisolver 1.4.5 libdnf 0.72.0 MarkupSafe 2.1.3 matplotlib 3.6.3 matplotlib-inline 0.1.6 mistune 2.0.5 nbclient 0.9.0 nbconvert 7.13.1 nbformat 5.9.2 nest-asyncio 1.5.8 numpy 1.24.4 olefile 0.47 packaging 23.2 pandocfilters 1.5.0 parso 0.8.3 pathspec 0.12.1 pexpect 4.9.0 pickleshare 0.7.5 Pillow 10.1.0 pkgutil_resolve_name 1.3.10 platformdirs 4.1.0 pluggy 1.3.0 prompt-toolkit 3.0.43 psutil 5.9.5 ptyprocess 0.7.0 pure-eval 0.2.2 Pygments 2.17.2 pyparsing 3.1.1 pyproject_hooks 1.0.0 pytest 7.4.3 python-dateutil 2.8.2 pytz 2023.3 pyzmq 25.1.1 referencing 0.30.2 requests 2.31.0 rpds-py 0.15.2 six 1.16.0 snowballstemmer 2.2.0 soupsieve 2.5 Sphinx 7.1.2 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.5 sphinxcontrib-htmlhelp 2.0.4 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.9 stack-data 0.6.3 tinycss2 1.2.1 tomli 2.0.1 tornado 6.3.3 traitlets 5.14.0 trove-classifiers 2023.12.14 typing_extensions 4.9.0 urllib3 1.26.18 wcwidth 0.2.12 webencodings 0.5.1 wheel 0.42.0 widgetsnbextension 4.0.9 zipp 3.17.0 ```

Please let me know if you need more details or want me to perform some diagnostics.