Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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.. (cherry picked from commit fb8037a) Co-authored-by: layday <31134424+layday@users.noreply.github.com> Co-authored-by: layday <31134424+layday@users.noreply.github.com>
- Loading branch information