Skip to content

Commit

Permalink
Fix stubtest tests with typing-extensions>=4.6.0 (#15294)
Browse files Browse the repository at this point in the history
`teststubtest.py` is currently failing on `master` due to changes that
were made to `typing_extensions.Protocol` in typing_extensions v4.6.0:
https://github.com/python/mypy/actions/runs/5056186170/jobs/9073337924.
This PR fixes the failures.

No need to bump the pinned version of `typing_extensions` in CI, as the
tests will continue to pass if `typing_extensions<4.6.0` is installed.
  • Loading branch information
AlexWaygood authored May 24, 2023
1 parent 1ee465c commit b8f8d80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,9 @@ def verify_typealias(
"__dataclass_fields__", # Generated by dataclasses
"__dataclass_params__", # Generated by dataclasses
"__doc__", # mypy's semanal for namedtuples assumes this is str, not Optional[str]
# Added to all protocol classes on 3.12+ (or if using typing_extensions.Protocol)
"__protocol_attrs__",
"__callable_proto_members_only__",
# typing implementation details, consider removing some of these:
"__parameters__",
"__origin__",
Expand Down

0 comments on commit b8f8d80

Please sign in to comment.