I believe a lot of people use https://pypi.org/project/cloudpickle/ thanks
to its support for pickling functions.
On Fri, Jun 10, 2022 at 4:56 AM haael wrote:
>
>
> During some sophisticated pickling I noticed that method `__func__`
> objects are unpicklable, because they share the name with the
ACTIVITY SUMMARY (2022-06-03 - 2022-06-10)
Python tracker at https://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.
Issues counts and deltas:
open7146 ( +0)
closed 51841 ( +0)
total 58987 ( +0)
Open issues wi
This is not just about the content of the name attributes: ;bound methods
do contain a reference to the specific instance
they are bound too - which is not retrievable (or maybe is through some
dunder attribute) - this instance has to be pickled, transported
and its reference updated on unpickling.
During some sophisticated pickling I noticed that method `__func__`
objects are unpicklable, because they share the name with the bound
method object itself.
```
from pickle import dumps
class A:
@classmethod
def b(cls):
pass
print(A.b) # >
print(A.b.__func__) #
dumps(A