mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-103134: Update multiprocessing.managers.ListProxy and DictProxy (GH-103133)
This commit is contained in:
parent
1db4695644
commit
bbb49888a7
3 changed files with 60 additions and 10 deletions
|
@ -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__'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue