Skip to content

Typing issue in 0.21.1 #141

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
fake-name opened this issue Sep 19, 2018 · 2 comments
Closed

Typing issue in 0.21.1 #141

fake-name opened this issue Sep 19, 2018 · 2 comments

Comments

@fake-name
Copy link

In a clean venv on Ubuntu 16.04 LTS:

(venv) scrapeworker@scrape-worker-3:/scraper$ python
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zeroconf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/scraper/venv/lib/python3.5/site-packages/zeroconf.py", line 320, in <module>
    OptionalExcInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]
  File "/usr/lib/python3.5/typing.py", line 649, in __getitem__
    return Union[arg, type(None)]
  File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
    dict(self.__dict__), parameters, _root=True)
  File "/usr/lib/python3.5/typing.py", line 512, in __new__
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 1077, in __subclasscheck__
    if super().__subclasscheck__(cls):
  File "/usr/lib/python3.5/abc.py", line 225, in __subclasscheck__
    for scls in cls.__subclasses__():
TypeError: descriptor '__subclasses__' of 'type' object needs an argument

Reverting to zeroconf 0.20.0 fixes the issue.

Possibly related to python/typing#266?

fake-name added a commit to fake-name/AutoTriever that referenced this issue Sep 19, 2018
@jstasiak
Copy link
Collaborator

jstasiak commented Sep 19, 2018

The newly released 0.21.2 should take care of this, please let us know.

@fake-name
Copy link
Author

Yep, that seems to have fixed it.

Also, it works on ubuntu 14.04 too (also, apparently I have 14.04 VPSes. Whoops?).

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