tests: ignore setuptools 67.3.0 DeprecationWarning #5167
Merged
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.
Ignore new
pkg_resources.declare_namespace
DeprecationWarning which was added in the setuptools 67.3.0 release.The DeprecationWarning was added in the setuptools 67.3.0 release:
And it gets triggered by the various
sphinxcontrib-*
namespace packages which are listed as dependencies of the sphinx package.Namespace packages are packages which contain split up package contents that get then merged upon import, so something like
foo.bar
andfoo.baz
can be packaged separately while still being available on the singlefoo
parent package.Setuptools 67.3.0 wants those namespace packages to be declared implicitly.
I have no clue why it gets raised when running
pytest
. It does that with every single test module, not just the entire test suite, even though sphinx is completely unrelated to Streamlink's tests or code base. This must mean that pytest is looking up every package installed in the user's python environment, and since docs-requirements are included in the env, the deprecationwarning gets raised when these explicit namespace packages are encountered. Sphinx doesn't even use setuptools. It uses flit.Example:
Btw, this doesn't come up in the GH test runners, because Sphinx doesn't get installed.