Skip to content

pytypes (1.0b5) Interferes with pytest 6.1.1 #7902

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

Closed
harahu opened this issue Oct 16, 2020 · 1 comment
Closed

pytypes (1.0b5) Interferes with pytest 6.1.1 #7902

harahu opened this issue Oct 16, 2020 · 1 comment

Comments

@harahu
Copy link

harahu commented Oct 16, 2020

I have a project where installing pytypes as a dependency seems to brick pytest. This is the new behaviour when trying to run my test suite.

Traceback (most recent call last):
  File "/home/<user>/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/<user>/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/<project path>/.venv/lib/python3.7/site-packages/pytest/__main__.py", line 5, in <module>
    raise SystemExit(pytest.console_main())
  File "/home/<project path>/.venv/lib/python3.7/site-packages/_pytest/config/__init__.py", line 187, in console_main
    code = main()
  File "/home/<project path>/.venv/lib/python3.7/site-packages/_pytest/config/__init__.py", line 165, in main
    config=config
  File "/home/<project path>/.venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/<project path>/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/<project path>/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/<project path>/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/home/<project path>/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/<project path>/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/<project path>/.venv/lib/python3.7/site-packages/_pytest/main.py", line 306, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/<project path>/.venv/lib/python3.7/site-packages/_pytest/main.py", line 301, in wrap_session
    config._ensure_unconfigure()
  File "/home/<project path>/.venv/lib/python3.7/site-packages/_pytest/config/__init__.py", line 991, in _ensure_unconfigure
    fin()
  File "/home/<project path>/.venv/lib/python3.7/site-packages/_pytest/capture.py", line 699, in stop_global_capturing
    self._global_capturing.pop_outerr_to_orig()
  File "/home/<project path>/.venv/lib/python3.7/site-packages/_pytest/capture.py", line 579, in pop_outerr_to_orig
    out, err = self.readouterr()
  File "/home/<project path>/.venv/lib/python3.7/site-packages/_pytest/capture.py", line 631, in readouterr
    return CaptureResult(out, err)
  File "/home/<project path>/.venv/lib/python3.7/site-packages/pytypes/__init__.py", line 567, in __Generic__new__
    if cls.__origin__ is None:
AttributeError: type object 'CaptureResult' has no attribute '__origin__'

@The-Compiler
Copy link
Member

According to Stewori/pytypes#40, the current pytypes release (1.0b5 from July 2018) does not support Python 3.7.

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

No branches or pull requests

2 participants