gh-87390: Fix starred tuple equality and pickling#92249
Conversation
b808ffd to
335747d
Compare
May 3, 2022 18:30
|
I think this is worth a NEWS entry; it's been a while since we put the rest of this code into main. I'll review the PR now. |
Sorry, something went wrong.
JelleZijlstra
left a comment
There was a problem hiding this comment.
Thanks! I'm a little unhappy about making unpacked a public argument to the constructor, but I'm not sure how else we'd get pickling to work.
Sorry, something went wrong.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
I've added a NEWS entry for this specific change, but just to double check - were you thinking of this specific change, or the rest of the PEP 646-related changes we made to |
Sorry, something went wrong.
Just for this change (the PR title would be good as a NEWS entry too). |
Sorry, something went wrong.
Fidget-Spinner
left a comment
There was a problem hiding this comment.
Great work! We're pretty close.
Sorry, something went wrong.
|
Azure pipelines patcheck fail is unrelated, I will fix it on main. |
Sorry, something went wrong.
Nevermind, it seems that 65f88a6 fixed the whitespace issues, so this just needs updating from main. |
Sorry, something went wrong.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
I do not like an idea about extending GenericAlias() with the third parameter. It is a public API.
I'll provide an alternate PR.
Sorry, something went wrong.
|
Looks like this can be closed since the alternative was already merged. |
Sorry, something went wrong.
Hilariously, before this PR, it turned out that
*tuple[int]was equal totuple[int]. Fixing it, I realised that pickling was also broken: it didn't preservegaobject.starred. This PR fixes both.I've tested for refleaks with
python3 -m test -v test_genericalias -R 3:3, and it came back clean, so I think we're good.@Fidget-Spinner I guess you're the one most familiar with this code? :)