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

Import Protocol from typing_extensions #5111

Merged
merged 1 commit into from
Oct 24, 2020

Commits on Oct 24, 2020

  1. Import Protocol from typing_extensions

    Conditional imports must reference `sys.version_info` directly
    for type checkers to be able to narrow them.  If a type checker
    cannot tell whether `PY_38` is true, it will combine the imports
    from both clauses in a `Union`.
    However, `typing.Protocol` and `typing_extensions.Protocol` are
    incompatible with each other - they do not inherit from the same class.
    This produces a type error which is reported to users of aiohttp
    depending on their type checking configuration.
    layday committed Oct 24, 2020
    Configuration menu
    Copy the full SHA
    6d22a98 View commit details
    Browse the repository at this point in the history