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

typing imports fail with Python 3.5.0 or 3.5.1 #114

Closed
mattsb42-aws opened this issue Nov 18, 2017 · 0 comments
Closed

typing imports fail with Python 3.5.0 or 3.5.1 #114

mattsb42-aws opened this issue Nov 18, 2017 · 0 comments

Comments

@mattsb42-aws
Copy link
Member

Problem

Due to a known bug with Python 3.5.1 and earlier, our use of typing types fail immediately on import in Python 3.5.0 and 3.5.1.

Solution

Add try/catch blocks around the typing imports.

This will allow incompatible Python versions to proceed successfully if they cannot import the requested objects.

Because we use Python 2 style mypy annotations and the only thing that uses the typing imports is the mypy analyzer, the only time that the imported objects are used is when the mypy analyzer runs. As long as we ensure that we do not run the mypy testenvs with either of these versions, this should not be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant