bpo-37170: Fix the cast on error in PyLong_AsUnsignedLongLongMask()#13860
Conversation
vstinner
left a comment
There was a problem hiding this comment.
While we are on it, can you also update the doc?
https://docs.python.org/dev/c-api/long.html#c.PyLong_AsUnsignedLongLongMask
replace -1 with (unsigned long long) -1 in the doc.
Since it's a bug fix, can you also add a NEWS entry?
|
Thank you, @vstinner, for the review. I have made the requested changes. 3.6 only takes security fixes at this point, so I think the "needs backport to 3.6" label should be removed, no? |
jdemeyer
left a comment
There was a problem hiding this comment.
Shouldn't there be a test added for this?
Oops, I'm not used to Python 3.8 branch yet :-) I wanted to add "needs backport to 3.8" ;-) (fixed)
Yes, a test would be good. |
mdickinson
left a comment
There was a problem hiding this comment.
LGTM. Would it be feasible to write a regression test?
Ah, sorry; I should have read the other comments first. |
A test should be added. |
mdickinson
left a comment
There was a problem hiding this comment.
LEGTM! (Looks even gooder to me, now that it has a test.)
|
Thanks @ZackerySpytz for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.7, 3.8. |
|
I'm having trouble backporting to |
|
Sorry, @ZackerySpytz and @vstinner, I could not cleanly backport this to |
|
Sorry @ZackerySpytz and @vstinner, I had trouble checking out the |
|
@ZackerySpytz: oh, so backport failed. Would you mind to attempt to backport the change manually to 3.8 first? Once 3.8 fix will land, we can consider other backports. |
…sk() (pythonGH-13860) (cherry picked from commit dc24765) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
GH-13891 is a backport of this pull request to the 3.8 branch. |
|
@vstinner, I have created a backport to 3.8. |
Merged, thanks. Can you try to backport to 3.7 and 2.7? You might reuse the 3.8 commit or not, it's up to you. |
…sk() (pythonGH-13860). (cherry picked from commit dc24765) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
GH-13896 is a backport of this pull request to the 3.7 branch. |
…sk() (pythonGH-13860). (cherry picked from commit dc24765) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
GH-13898 is a backport of this pull request to the 2.7 branch. |
https://bugs.python.org/issue37170