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

Hypothesis 5.8.0 broken on Python 3.5.2 #2381

Closed
cole opened this issue Apr 2, 2020 · 5 comments
Closed

Hypothesis 5.8.0 broken on Python 3.5.2 #2381

cole opened this issue Apr 2, 2020 · 5 comments
Labels
interop how to play nicely with other packages meta for wider topics than the software itself

Comments

@cole
Copy link

cole commented Apr 2, 2020

Importing gives TypeError: 'ellipsis' object is not iterable:

❯ docker run -it python:3.5.2 /bin/bash -c "pip install hypothesis && python -m hypothesis"
Collecting hypothesis
  Downloading https://files.pythonhosted.org/packages/99/b4/63160b387f39a5d8c98e281f91136483245ae4d15379e72f720543122f3d/hypothesis-5.8.0-py3-none-any.whl (289kB)
    100% |████████████████████████████████| 296kB 3.6MB/s 
Collecting attrs>=19.2.0 (from hypothesis)
  Downloading https://files.pythonhosted.org/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl
Collecting sortedcontainers<3.0.0,>=2.1.0 (from hypothesis)
  Downloading https://files.pythonhosted.org/packages/13/f3/cf85f7c3a2dbd1a515d51e1f1676d971abe41bba6f4ab5443240d9a78e5b/sortedcontainers-2.1.0-py2.py3-none-any.whl
Installing collected packages: attrs, sortedcontainers, hypothesis
Successfully installed attrs-19.3.0 hypothesis-5.8.0 sortedcontainers-2.1.0
You are using pip version 9.0.1, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/runpy.py", line 174, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/lib/python3.5/runpy.py", line 133, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/local/lib/python3.5/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/usr/local/lib/python3.5/site-packages/hypothesis/__init__.py", line 26, in <module>
    from hypothesis.core import example, find, given, reproduce_failure, seed
  File "/usr/local/lib/python3.5/site-packages/hypothesis/core.py", line 36, in <module>
    import hypothesis.strategies as st
  File "/usr/local/lib/python3.5/site-packages/hypothesis/strategies/__init__.py", line 17, in <module>
    from hypothesis.strategies._internal.core import (
  File "/usr/local/lib/python3.5/site-packages/hypothesis/strategies/_internal/core.py", line 2248, in <module>
    ) -> SearchStrategy[Callable[..., Any]]:
  File "/usr/local/lib/python3.5/typing.py", line 1025, in __getitem__
    tvars = _type_vars(params)
  File "/usr/local/lib/python3.5/typing.py", line 284, in _type_vars
    _get_type_vars(types, tvars)
  File "/usr/local/lib/python3.5/typing.py", line 279, in _get_type_vars
    t._get_type_vars(tvars)
  File "/usr/local/lib/python3.5/typing.py", line 786, in _get_type_vars
    _get_type_vars(self.__args__, tvars)
  File "/usr/local/lib/python3.5/typing.py", line 277, in _get_type_vars
    for t in types:
TypeError: 'ellipsis' object is not iterable
@cole
Copy link
Author

cole commented Apr 2, 2020

Possible dupe of #2334?

@Zac-HD
Copy link
Member

Zac-HD commented Apr 2, 2020

Related but distinct I think... but we're more likely to drop support for 3.5 than fix this I think.

@Zac-HD Zac-HD added bug something is clearly wrong here meta for wider topics than the software itself labels Apr 2, 2020
@cole
Copy link
Author

cole commented Apr 2, 2020

I thought that might be the case 😢. Fair enough.

@Zac-HD
Copy link
Member

Zac-HD commented Apr 2, 2020

Yeah 😕

I'd be happy to take a patch for this, but per docs "Hypothesis does not officially support anything except the latest patch release of any version of Python it supports".

As context Numpy has already dropped 3.5, the PSF will in September, and it's only around 3% of our downloads - and only a fraction of that will be 3.5.2; while even the whole 3% is well less than the unsupported Python 2.

@Zac-HD
Copy link
Member

Zac-HD commented Apr 20, 2020

Unfortunately this looks like a known bug in Python 3.5.2 - python/typing#259 - which we won't be able to fix 😞

@Zac-HD Zac-HD closed this as completed Apr 20, 2020
@Zac-HD Zac-HD added interop how to play nicely with other packages and removed bug something is clearly wrong here labels Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop how to play nicely with other packages meta for wider topics than the software itself
Projects
None yet
Development

No branches or pull requests

2 participants