-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
inheritance for multiprocessing.managers.DictProxy #12893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I'm honestly kind of surprised all three of these turned out to be "no effect". |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
I think they're used somewhat rarely; I wouldn't be surprised if there's no mypy_primer coverage for them. They are used, though; we've had bug reports in the past about them when I caused a regression. |
That makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of changes like this, especially when there's no primer impact. It's also a chance to steer users towards using protocols. (In the long term we should also look into adding some "mapping light" protocols to typing
. Similar to what I suggested for Reader/Writer protocols (which I need to prepare a PR for).)
I'm a bit nervous about this, because sort-of the whole point of this class is that it's meant to be basically drop-in compatible with |
I've opened a cpython issue and MR to get this and BaseListProxy registered to their ABCs at runtime. |
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. |
Similar to #12873 and #12892
DictProxy doesn't inherit from MutableMapping and it isn't registered to it either. It does have all the relevant methods.