| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
|
That's kind of interesting that we don't do the collections.abc.Mapping.register(Context) thing at runtime; feels like an omission over at CPython |
Sorry, something went wrong.
There was a problem hiding this comment.
Interesting, but the primer hits are encouraging.
Sorry, something went wrong.
|
Yeah, I was wondering if maybe the right thing to do here was add the registration to cpython? I haven't looked at them in detail yet, but two others in a somewhat similar boat are multiprocessing.managers.DictProxy and multiprocessing.managers.BaseListProxy. They're MutableMapping and MutableSequence in typeshed, respectively, but neither is actually registered to the ABC at runtime. They're on my "investigate" list coming up. |
Sorry, something went wrong.
Very possibly. In theory of course, we could do this change and the CPython change, though it might lead to some annoying branching in the stubs if the CPython change is only accepted for Python 3.14+ |
Sorry, something went wrong.
|
This is now fixed in cpython for 3.12 and up. It probably doesn't make sense to branch for the sake of 3.8 to 3.11. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
It's not a subclass, it's not registered to Mapping, and Mapping isn't protocol-like, so at runtime:
It does have all the necessary methods to be Mapping, it just isn't.