Closed
Description
Feature
Many existing test cases check that pickle.dumps
and pickle.loads
of a given type return the exact same value. Almost failed pickle test in RustPython, lack __reduce__
method.
-
arrayiterator.__reduce__
(test_array::test_iterator_pickle) — add arrayiter.__reduce__ #3868 -
filter.__reduce__
(test_builtin::test_filter_pickle) — add filter.__reduce__ #3732 -
map.__reduce__
(test_builtin::test_map_pickle) — Add map.reduce() #3734 -
ImportError.__reduce__
(test_exceptions::test_copy_pickle) — Implemented __reduce__ method for the ImportError exception #4973 -
OSError.__reduce__
— Add OSError.__reduce__ #4191 -
BaseException.__reduce__
— Add BaseException.__reduce__ #3665 -
method.__reduce__
— Add method.__reduce__ #4237 -
groupby.__reduce__
-
_grouper.__reduce__
-
tee.__reduce__
-
cycle.__reduce__
-
dropwhile.__reduce__
— Add dropwhile.__reduce__ #4201 -
takewhile.__reduce__
— add takewhile.__reduce__ #4190 -
islice.__reduce__
— Implement islice.__reduce__ #4390 -
starmap.__reduce__
— Additertools.starmap.__reduce__
#3988 -
chain.__reduce__
— Chain reduce #4232 -
product.__reduce__
[VM] Object pickling implementation for product object (python itertools) #5089 -
combinations.__reduce__
— Add itertool.combinations.__reduce__ method #3931, Addcombinations.__reduce__
#4272 -
combinations_with_replacement.__reduce__
-
permutations.__reduce__
added __reduce__ method for itertools.permutations #5029 -
accumulate.__reduce__
Implement itertools.accumulate.__reduce__ and __setstate__ #4434 -
compress.__reduce__
— Add itertools.compress.__reduce__ #3791 -
filterfalse.__reduce__
— Addfilterfalse.__reduce__
#3745 -
count.__reduce__
— Add count.reduce() #3737 -
zip_longest.__reduce__
Add reduce and setstate for zip_longest #4235 -
NotImplemented.__reduce__
— Add NotImplemented.__reduce__() #3738 -
types.SimpleNamespace.__reduce__
Implemented __reduce__ method for types.SimpleNamespace #4975
These listed elements are almost similar and quite simple to implement.
Please take a look at many PR and existing codes for __reduce__