Repository navigation
gh-130775: Allow negative locations in ast - #130795
Conversation
| {'lineno': -2, 'col_offset': 0}, | ||
| {'lineno': 0, 'col_offset': -2}, | ||
| {'lineno': 0, 'col_offset': -2, 'end_col_offset': -2}, | ||
| {'lineno': -2, 'end_lineno': -2, 'col_offset': 0}, |
There was a problem hiding this comment.
- Off topic: are we already testing that passing a non-int is fine?
- Maybe test with values that are excessively large (either in + or -) just for overflow checks.
There was a problem hiding this comment.
I will open a new issue for that, if we don't. Thanks for the idea.
Co-authored-by: Victor Stinner <[email protected]>
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I just suggest a shorter test name :-)
I remove my LGTM vote, I didn't notice that -1 value is still allowed. I'm not sure about rejecting values <= -2.
|
Ok, I followed the idea in #130795 (comment) by @JelleZijlstra and now all negative locations are just allowed. This way we won't have any compat issues and can backport this fix easily. Thanks a lot, everyone! |
|
Looks like #130627 changed a lot of related things. Digging into it. |
|
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
|
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Sorry, @sobolevn, I could not cleanly backport this to |
|
Sorry, @sobolevn, I could not cleanly backport this to |
|
Thanks everyone! 🎉 |
|
I will work on manual backports today. |
astast
…30795) (cherry picked from commit bc5233b) Co-authored-by: sobolevn <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
|
GH-132243 is a backport of this pull request to the 3.13 branch. |
…30795) (cherry picked from commit bc5233b) Co-authored-by: sobolevn <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
|
GH-132260 is a backport of this pull request to the 3.12 branch. |
) (cherry picked from commit bc5233b) Co-authored-by: sobolevn <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.