From d61438a939c0d3aea558419519cf39a60c85788b Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 25 Jun 2008 13:04:48 +0000 Subject: [PATCH] make changes for py3k for multiprocessing --- Lib/multiprocessing/managers.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py index e4d16883871..a460edc83df 100644 --- a/Lib/multiprocessing/managers.py +++ b/Lib/multiprocessing/managers.py @@ -41,7 +41,7 @@ def reduce_array(a): copyreg.pickle(array.array, reduce_array) view_types = [type(getattr({}, name)()) for name in ('items','keys','values')] -if view_types[0] is not list: # XXX only needed in Py3.0 +if view_types[0] is not list: # only needed in Py3.0 def rebuild_as_list(obj): return list, (list(obj),) for view_type in view_types: @@ -930,14 +930,11 @@ def Array(typecode, sequence, lock=True): # class IteratorProxy(BaseProxy): - # XXX remove methods for Py3.0 and Py2.6 - _exposed_ = ('__next__', 'next', 'send', 'throw', 'close') + _exposed_ = ('__next__', 'send', 'throw', 'close') def __iter__(self): return self def __next__(self, *args): return self._callmethod('__next__', args) - def next(self, *args): - return self._callmethod('next', args) def send(self, *args): return self._callmethod('send', args) def throw(self, *args):