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.
These listed elements are almost similar and quite simple to implement.
Please take a look at many PR and existing codes for __reduce__
Feature
Many existing test cases check that
pickle.dumpsandpickle.loadsof 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__ #3868filter.__reduce__(test_builtin::test_filter_pickle) — add filter.__reduce__ #3732map.__reduce__(test_builtin::test_map_pickle) — Add map.reduce() #3734ImportError.__reduce__(test_exceptions::test_copy_pickle) — Implemented __reduce__ method for the ImportError exception #4973OSError.__reduce__— Add OSError.__reduce__ #4191BaseException.__reduce__— Add BaseException.__reduce__ #3665method.__reduce__— Add method.__reduce__ #4237groupby.__reduce___grouper.__reduce__tee.__reduce__cycle.__reduce__dropwhile.__reduce__— Add dropwhile.__reduce__ #4201takewhile.__reduce__— add takewhile.__reduce__ #4190islice.__reduce__— Implement islice.__reduce__ #4390starmap.__reduce__— Additertools.starmap.__reduce__#3988chain.__reduce__— Chain reduce #4232product.__reduce__[VM] Object pickling implementation for product object (python itertools) #5089combinations.__reduce__— Add itertool.combinations.__reduce__ method #3931, Addcombinations.__reduce__#4272combinations_with_replacement.__reduce__permutations.__reduce__added __reduce__ method for itertools.permutations #5029accumulate.__reduce__Implement itertools.accumulate.__reduce__ and __setstate__ #4434compress.__reduce__— Add itertools.compress.__reduce__ #3791filterfalse.__reduce__— Addfilterfalse.__reduce__#3745count.__reduce__— Add count.reduce() #3737zip_longest.__reduce__Add reduce and setstate for zip_longest #4235NotImplemented.__reduce__— Add NotImplemented.__reduce__() #3738types.SimpleNamespace.__reduce__Implemented __reduce__ method for types.SimpleNamespace #4975These listed elements are almost similar and quite simple to implement.
Please take a look at many PR and existing codes for
__reduce__