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

AttributeError: 'module' object has no attribute '_GenericAlias' #2014

Closed
lazka opened this issue Jun 20, 2019 · 3 comments · Fixed by #2015
Closed

AttributeError: 'module' object has no attribute '_GenericAlias' #2014

lazka opened this issue Jun 20, 2019 · 3 comments · Fixed by #2015
Labels
bug something is clearly wrong here interop how to play nicely with other packages

Comments

@lazka
Copy link
Contributor

lazka commented Jun 20, 2019

Looks like the recent typing update broke hypothesis (Python 2 only):

  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/hypothesis/internal/compat.py", line 302, in <module>
    typing_root_type = (typing._Final, typing._GenericAlias)  # type: ignore
AttributeError: 'module' object has no attribute '_GenericAlias'
@lazka
Copy link
Contributor Author

lazka commented Jun 20, 2019

@Zac-HD git blame tells me this is your code :)

@Zac-HD Zac-HD added bug something is clearly wrong here interop how to play nicely with other packages labels Jun 20, 2019
@Zac-HD
Copy link
Member

Zac-HD commented Jun 20, 2019

Hurrah! Looks like the underscore-means-private convention actually bit us - let's see what I can do...

@lazka
Copy link
Contributor Author

lazka commented Jun 21, 2019

Works nicely again. Thanks for the quick fix!

noritada added a commit to noritada/commonmark.py that referenced this issue Sep 6, 2020
This upgrade is to fix an issue in Hypothesis that only affects Python
2.x.

    $ python commonmark/tests/unit_tests.py
    Traceback (most recent call last):
      File "commonmark/tests/unit_tests.py", line 6, in <module>
        from hypothesis import given, example
      :
      File "/home/travis/virtualenv/python2.7.17/lib/python2.7/site-packages/hypothesis/internal/compat.py", line 302, in <module>
        typing_root_type = (typing._Final, typing._GenericAlias)  # type: ignore
    AttributeError: 'module' object has no attribute '_GenericAlias'

HypothesisWorks/hypothesis#2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is clearly wrong here interop how to play nicely with other packages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants