test: fix deprecation warning about path by using suggested Pathlib#111
Closed
shuuji3 wants to merge 1 commit intosphinx-doc:mainfrom
Closed
test: fix deprecation warning about path by using suggested Pathlib#111shuuji3 wants to merge 1 commit intosphinx-doc:mainfrom
shuuji3 wants to merge 1 commit intosphinx-doc:mainfrom
Conversation
When running the tests, I saw the following deprecation warning:
```shell
> pipx run nox -s test
nox > Running session test
nox > Re-using existing virtual environment at .nox/test.
nox > python -m pip install -e .
nox > python -m pip install -r dev-requirements.txt
nox > pytest
=============================================================================== test session starts ===============================================================================
platform darwin -- Python 3.11.5, pytest-7.1.3, pluggy-1.3.0
rootdir: /Users/shuuji3/dev/sphinxext-opengraph
collected 37 items
tests/test_options.py ..........s.......................... [100%]
================================================================================ warnings summary =================================================================================
tests/conftest.py:3
/Users/shuuji3/dev/sphinxext-opengraph/tests/conftest.py:3: RemovedInSphinx90Warning: 'sphinx.testing.path' is deprecated. Use 'os.path' or 'pathlib' instead.
from sphinx.testing.path import path
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================================================================== 36 passed, 1 skipped, 1 warning in 1.67s =====================================================================
nox > Session test was successful.
```
Contributor
Author
|
OK, it seems that this change affects many places of tests run on the GitHub Actions. This needs to be investigated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I saw the following deprecation warning when running the tests on local:
This was introduced by the recent changes, so I don't think it is an urgent one.
ref. Changelog — Sphinx documentation - https://www.sphinx-doc.org/en/master/changes.html#release-7-2-0-released-aug-17-2023