summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing
diff options
context:
space:
mode:
authorRoy Hyunjin Han <rhh@crosscompute.com>2024-05-20 14:28:36 (GMT)
committerGitHub <noreply@github.com>2024-05-20 14:28:36 (GMT)
commitbbb49888a752869ae93423c42039a3a8dfab34d4 (patch)
treef495f6c86bffff3d2b16ce0706033e7705b25f25 /Lib/multiprocessing
parent1db4695644388817c727db80cbbd38714cc5125d (diff)
downloadcpython-bbb49888a752869ae93423c42039a3a8dfab34d4.zip
cpython-bbb49888a752869ae93423c42039a3a8dfab34d4.tar.gz
cpython-bbb49888a752869ae93423c42039a3a8dfab34d4.tar.bz2
gh-103134: Update multiprocessing.managers.ListProxy and DictProxy (GH-103133)
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r--Lib/multiprocessing/managers.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
index 76b915d..0f5f9f6 100644
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -1152,10 +1152,10 @@ class ValueProxy(BaseProxy):
BaseListProxy = MakeProxyType('BaseListProxy', (
- '__add__', '__contains__', '__delitem__', '__getitem__', '__len__',
- '__mul__', '__reversed__', '__rmul__', '__setitem__',
- 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove',
- 'reverse', 'sort', '__imul__'
+ '__add__', '__contains__', '__delitem__', '__getitem__', '__imul__',
+ '__len__', '__mul__', '__reversed__', '__rmul__', '__setitem__',
+ 'append', 'clear', 'copy', 'count', 'extend', 'index', 'insert', 'pop',
+ 'remove', 'reverse', 'sort',
))
class ListProxy(BaseListProxy):
def __iadd__(self, value):
@@ -1169,16 +1169,20 @@ class ListProxy(BaseListProxy):
_BaseDictProxy = MakeProxyType('DictProxy', (
- '__contains__', '__delitem__', '__getitem__', '__iter__', '__len__',
- '__setitem__', 'clear', 'copy', 'get', 'items',
+ '__contains__', '__delitem__', '__getitem__', '__ior__', '__iter__',
+ '__len__', '__or__', '__reversed__', '__ror__',
+ '__setitem__', 'clear', 'copy', 'fromkeys', 'get', 'items',
'keys', 'pop', 'popitem', 'setdefault', 'update', 'values'
))
_BaseDictProxy._method_to_typeid_ = {
'__iter__': 'Iterator',
}
class DictProxy(_BaseDictProxy):
- __class_getitem__ = classmethod(types.GenericAlias)
+ def __ior__(self, value):
+ self._callmethod('__ior__', (value,))
+ return self
+ __class_getitem__ = classmethod(types.GenericAlias)
ArrayProxy = MakeProxyType('ArrayProxy', (
'__len__', '__getitem__', '__setitem__'