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 'typing' has no attribute 'NoReturn' with Python 3.5.3 #366

Closed
lafrech opened this issue Feb 1, 2019 · 3 comments

Comments

@lafrech
Copy link
Member

commented Feb 1, 2019

I get this error when running the tests with Python 3.5.3.

tests/test_py3/test_aiohttpparser_async_functions.py:6: in <module>
    from webargs.aiohttpparser import parser, use_args, use_kwargs
webargs/aiohttpparser.py:72: in <module>
    class AIOHTTPParser(AsyncParser):
webargs/aiohttpparser.py:148: in AIOHTTPParser
    ) -> typing.NoReturn:
E   AttributeError: module 'typing' has no attribute 'NoReturn'

The docs say typing.NoReturn was added in 3.6.5. However, the tests pass on Travis with Python 3.5.6.

@sloria

This comment has been minimized.

Copy link
Member

commented Feb 2, 2019

Looks like this was a bug until 3.5.4rc1 : https://bugs.python.org/issue28556 .

@lafrech Can you upgrade your Python version?

@lafrech

This comment has been minimized.

Copy link
Member Author

commented Feb 2, 2019

Not really. https://packages.debian.org/search?keywords=python3

I could use pyenv to develop and run the tests. Still, people using Debian stable or any 3.5.3- version can't run the asyncio part of the code. I mean it is not only about me running the tests but also about anyone willing to run an application using the lib.

But as long as no one complains, maybe we can live with this until 3.6 or 3.7 is standard.

@sloria

This comment has been minimized.

Copy link
Member

commented Feb 3, 2019

I see. I'd prefer not to support old patch versions Python, but we can live with removing the typing.NoReturn usages for now, at least until we decide to drop 3.5 support.

sloria added a commit that referenced this issue Feb 4, 2019

@sloria sloria closed this in #368 Feb 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.