You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is in the typing code that checks if any of the parent classes for a Protocol are builtin protocols. The code today maintains a whitelist of builtin protocols that are okay to be subclassed, but expects them all to live within the 'collections.abc' module. This means 'typing.ContextManager' and 'typing.AsyncContextManager' cannot be subclassed, even though those protocols are listing in the whitelist.
I'd like to take a stab at putting up a patch for this but I've never contributed anything to Python before, so I'll have a read through the contribution docs and put up a PR.
New changeset 692a0dc by Ivan Levkivskyi (Divij Rajkumar) in branch 'master': bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647) 692a0dc
New changeset 52baf90 by Miss Islington (bot) in branch '3.8': bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647) 52baf90
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: