cli: list all dependencies in debug output #4575
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.
log_current_versions
All of Streamlink's dependencies should be listed in the debug output. This is especially useful for figuring out issues like #4562.
Since
importlib.metadata
is only available on py38 and above, theimportlib-metadata
fallback requirement needs to be added for py37.https://github.com/python/importlib_metadata#compatibility
https://pypi.org/project/importlib-metadata/
The version restriction of
<4.3
is intentional because offlake8
, which sets the same requirement:https://github.com/PyCQA/flake8/blob/4.0.1/setup.cfg#L45
This unfortunately causes a conflict with sphinx, which requires
>=4.4
for py37-py39:https://github.com/sphinx-doc/sphinx/blob/v4.5.0/setup.py#L32
Since we don't build docs and thus don't install docs requirements on py37, we don't need to care about sphinx's dependency version conflict. But since we obviously run tests and lint code on py37, the version requirement of flake8 needs to be set to avoid introducing version conflicts when installing streamlink first and then streamlink's dev-requirements, because pip won't downgrade in this case.
This means that the version conflict does only affect packagers of streamlink who publish the latest versions for py37. This is already unlikely, and then it can simply be patched out if needed.
It probably doesn't matter anyway and the version conflict can probably be ignored... Flake8 is running fine with the latest importlib-metadata version. So should I remove the version restriction again?