Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

warning: JupyterNbCollector.from_parent(parent, fspath=path) is depreated #81

Open
yellowbean opened this issue Apr 13, 2024 · 1 comment

Comments

@yellowbean
Copy link

yellowbean commented Apr 13, 2024

Version:

Name: pytest_notebook
Version: 0.10.0
Summary: A pytest plugin for testing Jupyter Notebooks.

Message

============================================== warnings summary ==============================================
../../../../opt/homebrew/lib/python3.11/site-packages/pytest_notebook/plugin.py:273
../../../../opt/homebrew/lib/python3.11/site-packages/pytest_notebook/plugin.py:273
/opt/homebrew/lib/python3.11/site-packages/pytest_notebook/plugin.py:273: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to JupyterNbCollector is deprecated. Please use the (path: pathlib.Path) argument instead.
See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
return JupyterNbCollector.from_parent(parent, fspath=path)

absbox/tests/test_regression.py::test_resp
/opt/homebrew/lib/python3.11/site-packages/urllib3/connectionpool.py:1056: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Propose

Do you think we can use the path of JupyterNbCollector instead of fspath ?

@ibressler
Copy link

I confirm, getting this here as well with pytest. Line 273 in plugin.py should be changed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants