Closed garciparedes closed 4 years ago
You’re welcome.
Never seen this issue before. Need time to investigate: I don’t really know where to define the __reduce_ex__()
function (and why).
Hum! This must be Deprecated v1.2.7. The 1.2.8 is about to be released 😉
Well, fixing the bug you reported is quite complex.
The problem actually comes from the __reduce_ex__
function which is not implemented.
According to @GrahamDumpleton: "Depending on the use case you may or may not want the original wrapped object to pickled".
It's clear that in a general context, we can't take a decision, but here, in the context of the @deprecated
decorator we can assume the decorated function should be pickled.
The problem is how.
One of the person who chat in the issue tracker gives an example. We can start with this example to implement a __reduce_ex__
function which is able to serialize a decorated function…
It is very difficult to fix this bug, maybe impossible without diving deep inside Wrapt
core library.
Won't fix, sorry.
Hi! First of all, thank you so much for writing this library, it really helps me maintaining deprecations around my source code.
Nevertheless, I realised that there is one problem related with the serialization process (with both
pickle
anddill
) which I believe is related with thewrapt
library and the https://github.com/GrahamDumpleton/wrapt/issues/102 issue, in which the author aims to implement the__reduce_ex__
.Expected Behavior
Tell us what should happen.
Actual Behavior
Tell us what happens instead.
In case of replacing the
pickle
module bydill
, the error trace is more descriptive:Environment
3.7.6
1.2.8