Skip to content

typing imports fail with Python 3.5.0 or 3.5.1 #114

@mattsb42-aws

Description

@mattsb42-aws

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions