Skip to content

pytest fails as importlib from 3.8 fails #90

Description

@jaraco

In GitLab by @jokerjokerer on Sep 11, 2019, 20:39

with master 3.8 branch:

python3.8 Wed 11 Sep 21:49:20 2019
Python 3.8.0b4+ (heads/3.8:8af4e0c, Sep 11 2019, 21:25:40)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "/Users/bgabor8/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 2060, in <module>
main()
File "/Users/bgabor8/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 2054, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/Users/bgabor8/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1405, in run
return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
File "/Users/bgabor8/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1412, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Users/bgabor8/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/bgabor8/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/192.6262.63/PyCharm.app/Contents/helpers/pycharm/_jb_pytest_runner.py", line 37, in <module>
config_result = real_prepare_config(args, plugins_to_load)
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py", line 208, in _prepareconfig
return pluginmanager.hook.pytest_cmdline_parse(
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py", line 92, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py", line 83, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/pluggy/callers.py", line 203, in _multicall
gen.send(outcome)
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/_pytest/helpconfig.py", line 89, in pytest_cmdline_parse
config = outcome.get_result()
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py", line 720, in pytest_cmdline_parse
self.parse(args)
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py", line 928, in parse
self._preparse(args, addopts=addopts)
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py", line 869, in _preparse
self._consider_importhook(args)
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py", line 817, in _consider_importhook
self._mark_plugins_for_rewrite(hook)
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py", line 839, in _mark_plugins_for_rewrite
for name in _iter_rewritable_modules(package_files):
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py", line 615, in _iter_rewritable_modules
for fn in package_files:
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py", line 832, in <genexpr>
package_files = (
File "/Users/bgabor8/git/github/sphinx-autodoc-typehints/.tox/py38/lib/python3.8/importlib/metadata/__init__.py", line 175, in <genexpr>
resolver()
File "<frozen importlib._bootstrap_external>", line 1383, in find_distributions
AttributeError: type object 'DistributionFinder' has no attribute 'Context'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions