Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-39031: Include elif keyword when producing lineno/col-offset info for if_stmt #17582

Merged
merged 4 commits into from Dec 12, 2019

Conversation

@lysnikolaou
Copy link
Contributor

lysnikolaou commented Dec 12, 2019

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal

@pablogsal

This comment has been minimized.

Copy link
Member

pablogsal commented Dec 12, 2019

Hi there 😉 Can you add a NEWS entry?

@pablogsal pablogsal self-requested a review Dec 12, 2019
@pablogsal pablogsal self-assigned this Dec 12, 2019
Copy link
Member

pablogsal left a comment

Can you also add a elif case to the exec_test list and regenerate the test data (check the end of the file for instructions)?

@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Dec 12, 2019

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

lysnikolaou and others added 2 commits Dec 12, 2019
Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
@lysnikolaou

This comment has been minimized.

Copy link
Contributor Author

lysnikolaou commented Dec 12, 2019

Thanks a lot for the review @pablogsal! I have made the requested changes; please review again.

@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Dec 12, 2019

Thanks for making the requested changes!

@pablogsal: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from pablogsal Dec 12, 2019
Copy link
Member

pablogsal left a comment

Thanks for the patch @lysnikolaou! I will backport this to 3.8 and 3.7 once the CI finish.

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Dec 12, 2019

@lysnikolaou: Status check is done, and it's a failure .

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Dec 12, 2019

@lysnikolaou: Status check is done, and it's a success .

@miss-islington miss-islington merged commit 025a602 into python:master Dec 12, 2019
4 checks passed
4 checks passed
Azure Pipelines PR #20191212.12 succeeded
Details
bedevere/issue-number Issue number 39031 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Dec 12, 2019

GH-17583 is a backport of this pull request to the 3.8 branch.

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Dec 12, 2019

Sorry, @lysnikolaou, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 025a602af7ee284d8db6955c26016f3f27d35536 3.7

pablogsal added a commit to pablogsal/cpython that referenced this pull request Dec 12, 2019
…t info for if_stmt (pythonGH-17582)

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal.
(cherry picked from commit 025a602)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
pablogsal added a commit to pablogsal/cpython that referenced this pull request Dec 12, 2019
…t info for if_stmt (pythonGH-17582)

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal.
(cherry picked from commit 025a602)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Dec 12, 2019

GH-17584 is a backport of this pull request to the 3.7 branch.

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Dec 13, 2019

Thanks @lysnikolaou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒🤖

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Dec 13, 2019

I'm having trouble backporting to 3.8. Reason: 'Error 110 while writing to socket. Connection timed out.'. Please retry by removing and re-adding the needs backport to 3.8 label.

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Dec 13, 2019

Thanks @lysnikolaou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒🤖

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Dec 13, 2019

Sorry @lysnikolaou, I had trouble checking out the 3.8 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 025a602af7ee284d8db6955c26016f3f27d35536 3.8

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Dec 13, 2019

Thanks @lysnikolaou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒🤖 I'm not a witch! I'm not a witch!

@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Dec 13, 2019

GH-17589 is a backport of this pull request to the 3.8 branch.

miss-islington added a commit to miss-islington/cpython that referenced this pull request Dec 13, 2019
… for if_stmt (pythonGH-17582)

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 025a602)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
pablogsal added a commit that referenced this pull request Dec 13, 2019
…t info for if_stmt (GH-17582) (#17584)

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal.
(cherry picked from commit 025a602)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
pablogsal added a commit that referenced this pull request Dec 13, 2019
… for if_stmt (GH-17582) (GH-17589)

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 025a602)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
@lysnikolaou

This comment has been minimized.

Copy link
Contributor Author

lysnikolaou commented Dec 13, 2019

@pablogsal I just found out that I kind of messed this up and one more change is needed. What is the right course of action here? Open a new PR for the additional change?

@pablogsal

This comment has been minimized.

Copy link
Member

pablogsal commented Dec 13, 2019

Open a new PR for the additional change?

Yes, also explain in the issue what is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.