Uh oh!
There was an error while loading. Please reload this page.
bpo-43224: Implement pickling of TypeVarTuples - #32119
Conversation
Fidget-Spinner
left a comment
There was a problem hiding this comment.
correct in thinking we do need to test both assertEqual and assertIs for TypeVarTuples and unpacked TypeVarTuples?
IIRC, assertIs for pickle/unpickling isn't guaranteed, so we don't need to test for that.
Other than the tests, the code in typing.py LGTM.
Uh oh!
There was an error while loading. Please reload this page.
JelleZijlstra
left a comment
There was a problem hiding this comment.
Thanks, I think these tests are a bit repetitive.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This reverts commit de68232.
Edit: Nevermind, I just read the bug report. |
mrahtz
commented
Apr 6, 2022
Lol, my bad - I was cleaning up some old branches, and forgotten this hadn't yet been merged 😅 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
mrahtz
commented
Apr 22, 2022
Thanks, Jelle! |
Guess who learned a whole bunch about how pickling works :)
Notes:
_BoundVarianceMixinalso contains a key ingredient for pickling of things that use it! I've refactored its__reduce__into a separate mixin for clarity.assertEquala reasonable way of testing this functionality? Am I correct in thinking we do need to test bothassertEqualandassertIsfor TypeVarTuples and unpacked TypeVarTuples?This PR doesn't include implementation of pickling support for unpacked native
tuple; I'll do that in a future PR. (And I guess we'll also need to add tests forcopy?)https://bugs.python.org/issue43224