Skip to content

latest pytest crashes on import on python 3.5.0 #5751

@njsmith

Description

@njsmith

We have a CI job that tests on python 3.5.0, because 3.5.0 had a lot of issues with both async/await and typing, so we want to make sure that we're working around them correctly. I guess pytest does not have a similar CI job, because the latest release crashes on import, somewhere in the typing module :-)

  File "/home/travis/virtualenv/python3.5.0/lib/python3.5/site-packages/_pytest/_code/__init__.py", line 2, in <module>
    from .code import Code  # noqa
  File "/home/travis/virtualenv/python3.5.0/lib/python3.5/site-packages/_pytest/_code/code.py", line 388, in <module>
    class ExceptionInfo(Generic[_E]):
  File "/home/travis/virtualenv/python3.5.0/lib/python3.5/site-packages/_pytest/_code/code.py", line 594, in ExceptionInfo
    def match(self, regexp: Union[str, Pattern]) -> bool:
  File "/opt/python/3.5.0/lib/python3.5/typing.py", line 534, in __getitem__
    dict(self.__dict__), parameters, _root=True)
  File "/opt/python/3.5.0/lib/python3.5/typing.py", line 491, in __new__
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/opt/python/3.5.0/lib/python3.5/typing.py", line 491, in <genexpr>
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
TypeError: issubclass() arg 1 must be a class

https://travis-ci.org/python-trio/trio/jobs/572601545

I'm guessing this is actually a bug in typing, and maybe the answer is just that pytest should announce that it's dropping support for 3.5.0. But I don't see anything about that in the release notes, so I figured you'd appreciate a heads-up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressedtype: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions