-
Notifications
You must be signed in to change notification settings - Fork 184
Preserve func.__qualname__ when defined #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cloudpickle/cloudpickle.py
Outdated
| func = args[0] | ||
| keys = ['globals', 'defaults', 'dict', 'closure_values'] | ||
| state = dict(zip(keys, args[1:])) | ||
| state['module'] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ok to set __module__ to None? Or is it preferrable to skip it entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I meant to change that.
|
Kudos for doing this :-) |
Codecov Report
@@ Coverage Diff @@
## master #130 +/- ##
==========================================
- Coverage 84.09% 78.34% -5.76%
==========================================
Files 2 2
Lines 522 531 +9
Branches 91 96 +5
==========================================
- Hits 439 416 -23
- Misses 62 84 +22
- Partials 21 31 +10
Continue to review full report at Codecov.
|
|
@rgbkrk thanks for the merge. Do you want to release 0.4.2 too? Or shall I do it? |
|
I’d love if you can make the release. |
|
0.4.2 released. |
This is a followup for #128 to address @pitrou's comment: #128 (comment).
This is backward compatible with 0.4.0 and 0.4.1 and should make it easier to be forward compatible with future versions shall we need to pass additional function metadata.