Remove __getslice__, __setslice__, __delslice__ methods from proxies

Proxy classes in multiprocessing do not need these methods in Python 3.x.
This commit is contained in:
Richard Oudkerk 2012-05-29 12:01:45 +01:00
parent ecdc076695
commit 1074a9294b
1 changed files with 5 additions and 6 deletions

View File

@ -1035,12 +1035,11 @@ class ValueProxy(BaseProxy):
BaseListProxy = MakeProxyType('BaseListProxy', ( BaseListProxy = MakeProxyType('BaseListProxy', (
'__add__', '__contains__', '__delitem__', '__delslice__', '__add__', '__contains__', '__delitem__', '__getitem__', '__len__',
'__getitem__', '__getslice__', '__len__', '__mul__', '__mul__', '__reversed__', '__rmul__', '__setitem__',
'__reversed__', '__rmul__', '__setitem__', '__setslice__',
'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove',
'reverse', 'sort', '__imul__' 'reverse', 'sort', '__imul__'
)) # XXX __getslice__ and __setslice__ unneeded in Py3.0 ))
class ListProxy(BaseListProxy): class ListProxy(BaseListProxy):
def __iadd__(self, value): def __iadd__(self, value):
self._callmethod('extend', (value,)) self._callmethod('extend', (value,))
@ -1058,8 +1057,8 @@ DictProxy = MakeProxyType('DictProxy', (
ArrayProxy = MakeProxyType('ArrayProxy', ( ArrayProxy = MakeProxyType('ArrayProxy', (
'__len__', '__getitem__', '__setitem__', '__getslice__', '__setslice__' '__len__', '__getitem__', '__setitem__'
)) # XXX __getslice__ and __setslice__ unneeded in Py3.0 ))
PoolProxy = MakeProxyType('PoolProxy', ( PoolProxy = MakeProxyType('PoolProxy', (