Closed elacuesta closed 9 months ago
It's not present in my 3.9.13 either. Unfortunately the list of available fields doesn't seem to be documented, the Python API docs defer to various metadata docs which don't talk about Python versions.
One option for the fix is depending on importlib-metadata
on Python < 3.10.
tox -e py39 -- tests -k test_get_docker_client
Works for me with 3.9.6. And I am sure deps.name
is called, coverage data confirms so and raising a ValueError
right before makes that the outcome of the test.
But I can reproduce your steps in the REPL, which has me really confused.
Is it possible that tox installs importlib-metadata
?
If I try to import importlib_metadata
right before the dep.name
line:
FAILED tests/image/test_utils.py::ReleaseUtilsTest::test_get_docker_client - ModuleNotFoundError: No module named 'importlib_metadata'
I can reproduce the error in a venv calling get_docker_client, though, so tox is definitely doing something different.
One option for the fix is depending on
importlib-metadata
on Python < 3.10.
I think this is the way to go. But I am concerned about not having a test for this and accidentally removing it in the future.
I wonder if we should have a special test out of tox that runs on CI.
After #434 the following error appears when doing
shub image deploy
for some Python versions:Apparently the
name
attribute is new in Python 3.10, or maybe in a 3.9 version newer than 3.9.6 since that's the one I tested with: