Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix tests by adding pip constraint for importlib-metadata. #370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

theipster
Copy link

@theipster theipster commented Feb 12, 2023

The tests workflow currently fails on master, with a bunch of errors:

_________________________________ FLAKE8-check _________________________________
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pluggy/manager.py:93: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pluggy/manager.py:87: in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/_pytest/runner.py:170: in pytest_runtest_call
    raise e
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/_pytest/runner.py:162: in pytest_runtest_call
    item.runtest()
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pytest_flake8.py:127: in runtest
    self.statistics)
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/py/_io/capture.py:150: in call
    res = func(*args, **kwargs)
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pytest_flake8.py:203: in check_file
    app.find_plugins(config_finder)
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/flake8/main/application.py:153: in find_plugins
    self.check_plugins = plugin_manager.Checkers(local_plugins.extension)
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/flake8/plugins/manager.py:357: in __init__
    self.namespace, local_plugins=local_plugins
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/flake8/plugins/manager.py:238: in __init__
    self._load_entrypoint_plugins()
/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/flake8/plugins/manager.py:254: in _load_entrypoint_plugins
    eps = importlib_metadata.entry_points().get(self.namespace, ())
E   AttributeError: 'EntryPoints' object has no attribute 'get'

See https://stackoverflow.com/a/73932581. It seems like importlib-metadata is only required for tests, not production code.

See https://stackoverflow.com/a/73932581. It seems like
importlib-metadata is only required for tests, not production code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant