-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Register multiprocessing proxy types to an appropriate collections.abc class #126417
Comments
…propriate collections.abc class (python#126419) (cherry-picked from commit 78842e4)
…propriate collections.abc class (python#126419) (cherry-picked from commit 78842e4)
…ate collections.abc class (#126419) (#126436) Co-authored-by: Stephen Morton <[email protected]>
…ate collections.abc class (#126419) (#126435) Co-authored-by: Stephen Morton <[email protected]>
Thanks @tungol! |
Checks that appropriate dunder __ methods exist on the dict and list proxy types. Co-authored-by: Alex Waygood <[email protected]>
…ythonGH-126454) Checks that appropriate dunder __ methods exist on the dict and list proxy types. (cherry picked from commit 6ee542d) Co-authored-by: Stephen Morton <[email protected]> Co-authored-by: Alex Waygood <[email protected]>
…ythonGH-126454) Checks that appropriate dunder __ methods exist on the dict and list proxy types. (cherry picked from commit 6ee542d) Co-authored-by: Stephen Morton <[email protected]> Co-authored-by: Alex Waygood <[email protected]>
FYI - The backports of the validation test don't work on 3.13 or earlier because ListProxy in those versions does not have the methods added to 3.14 by #103133. I'll close those backports. |
…to an appropriate collections.abc class (python#126419) (python#126435)" This reverts commit c1e708a.
…to an appropriate collections.abc class (python#126419) (python#126436)" This reverts commit 47d48b6.
The backports of the original PR are being reverted in:
(We're not reverting it for 3.14+, it's a good change! But there were concerns raised in #126451 over whether it was a good idea to backport this kind of change, and I think those concerns were reasonable.) |
…te collections.abc class (python#126419)
…ython#126454) Checks that appropriate dunder __ methods exist on the dict and list proxy types. Co-authored-by: Alex Waygood <[email protected]>
Feature or enhancement
Proposal:
For consistency with the types that they proxy, I believe that
multiprocessing.managers.ListProxy
should be registered tocollections.abc.MutableSequence
andmultiprocessing.managers.DictProxy
should be registered tocollections.abc.MutableMapping
. This could be done by registering either those types themselves or by registering their base classes,BaseListProxy
and_BaseDictProxy
.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
I discovered that these weren't registered to their ABCs while working on typeshed, so a little previous discussion occurred in issues in that repo:
python/typeshed#12893
python/typeshed#12892
Linked PRs
The text was updated successfully, but these errors were encountered: