Fix saving __qualname__ of functions#744
Fix saving __qualname__ of functions#744dfremont wants to merge 3 commits intouqfoundation:masterfrom
Conversation
|
Whoops, I forgot @mmckerns or @anivegesana (author of the specific line I modified) could you please review this when you have a moment? |
|
The unfortunate thing about changing behavior is that we also have to make sure the changes to the code do not impact the ability to unpickle old pickles that were created before the change. I'll review your changes -- can you check your changes versus some old pickles? If it fails, we would need to add a shim to the code to handle old pickles. |
|
Thanks, Mike. The 1-line change I made is in |
Summary
This PR fixes the saving of the
__qualname__attribute of functions when it is the same as__name__but different from__code__.co_qualname(a situation that arises when usingfunctools.wraps: see issue #602 for details).Fixes #602. This changes existing behavior, so is technically not backwards-compatible, but I think the existing behavior was clearly wrong. (It was also inconsistent between module-level and local functions.)
Checklist
Documentation and Tests
python tests/__main__.py, and pass.Release Management