Skip to content

Commit b8f8d80

Browse files
authored
Fix stubtest tests with typing-extensions>=4.6.0 (#15294)
`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.
1 parent 1ee465c commit b8f8d80

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mypy/stubtest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,6 +1393,9 @@ def verify_typealias(
13931393
"__dataclass_fields__", # Generated by dataclasses
13941394
"__dataclass_params__", # Generated by dataclasses
13951395
"__doc__", # mypy's semanal for namedtuples assumes this is str, not Optional[str]
1396+
# Added to all protocol classes on 3.12+ (or if using typing_extensions.Protocol)
1397+
"__protocol_attrs__",
1398+
"__callable_proto_members_only__",
13961399
# typing implementation details, consider removing some of these:
13971400
"__parameters__",
13981401
"__origin__",

0 commit comments

Comments
 (0)