Skip to content

Commit

Permalink
Revert "Try and make pickling list iterators work"
Browse files Browse the repository at this point in the history
This reverts commit f607138dfea8f04d7b302f49b76dba8756b17575.
  • Loading branch information
holdenk committed Apr 8, 2014
1 parent cd1e81c commit 3bcd81d
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions python/pyspark/cloudpickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,6 @@ def save_codeobject(self, obj, pack=struct.pack):
self.save_reduce(types.CodeType, args, obj=obj)
dispatch[types.CodeType] = save_codeobject #new type

def save_listiterator(self, obj, pack=struct.pack):
"""
Save a list iterator. Note: this reads the iterator... Sorry!
"""
pickle.PicklingError("mini sad panda")
contents = list(obj)
self.save_reduce(load_listr_itr, contents, obj=obj)
dispatch[type(iter(list()))] = save_listiterator

def save_function(self, obj, name=None, pack=struct.pack):
""" Registered with the dispatch to handle all function types.
Expand Down Expand Up @@ -845,10 +836,6 @@ def _restore_attr(obj, attr):
setattr(obj, key, val)
return obj

#hack to load the list iterator
def load_list_tr(args):
itr(args)

def _get_module_builtins():
return pickle.__builtins__

Expand Down

0 comments on commit 3bcd81d

Please sign in to comment.