You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a=<function a at 0x108164a40>, b=<function a at 0x1081963e0>, c=<function b at 0x108ca2fc0>
where the unpickled function should have name a like the original does.
I thought the issue might be that the __qualname__ attribute of the function wasn't getting saved, but setting that attribute manually rather than using functools.wraps actually works; the code
Hi @mmckerns, I'm still seeing this issue with dill 0.3.7 -- any idea what the cause might be? I haven't been able to figure out why the second snippet above works while the first one doesn't.
dill
seems to not preserve the metadata of functions wrapped withfunctools.wraps
. Withdill
0.3.6 on Python 3.11.1, the following code:prints something along the lines of
where the unpickled function should have name
a
like the original does.I thought the issue might be that the
__qualname__
attribute of the function wasn't getting saved, but setting that attribute manually rather than usingfunctools.wraps
actually works; the codeprints something like
where now the name of the unpickled function is correct. So I don't know what's going on.
The text was updated successfully, but these errors were encountered: