◐ Shell
reader mode source ↗
Skip to content

bpo-25324: copy tok_name before changing it#1608

Merged
vstinner merged 11 commits into
python:masterfrom
albertjan:fix-issue-25324
May 31, 2017
Merged

bpo-25324: copy tok_name before changing it#1608
vstinner merged 11 commits into
python:masterfrom
albertjan:fix-issue-25324

Conversation

@albertjan

Copy link
Copy Markdown
Contributor

Saw this open bug report, and since I was looking at tokenize.py anyway. I figured I address it.

This may catch people off guard though because they may be relying on tok_name containing ENCODING, COMMENT and NL. 🤷‍♂️

@mention-bot

Copy link
Copy Markdown

@albertjan, thanks for your PR! By analyzing the history of the files in this pull request, we identified @serhiy-storchaka, @1st1 and @tpn to be potential reviewers.

@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@serhiy-storchaka serhiy-storchaka requested a review from meadori May 16, 2017 16:22

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

I'm not sure that it's the right way to fix the issue: see http://bugs.python.org/issue25324 discussion. I also have comments on the change itself, but I will want until we agree on the way to fix the issue before reviewing the change.

@brettcannon

Copy link
Copy Markdown
Member

Due to a new release of Sphinx, we had to fix the documentation to build on Travis again. Please do a merge to get these changes to help get Travis passing on your PR.

@albertjan

Copy link
Copy Markdown
Contributor Author

Updated the PR. comments are now copied from token.h to token.py automatically. And I moved ERRORTOKEN back to where it was.

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

LGTM, but I added a new (last I hope) serie of nitpicking comments :-p

@albertjan

Copy link
Copy Markdown
Contributor Author

This should address your comments. Thanks for taking the time to review my PR.

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

LGTM. I will merge the change once tests pass.

@serhiy-storchaka

Copy link
Copy Markdown
Member

Please wait with merging. I'm finishing my patch for generating token.h from token.py.

@vstinner

Copy link
Copy Markdown
Member

Please wait with merging. I'm finishing my patch for generating token.h from token.py.

Wait? Do you expect conflicts?

@serhiy-storchaka

Copy link
Copy Markdown
Member

Yes, conflicts, and maybe this will lead to redesigning both patches.

@albertjan

Copy link
Copy Markdown
Contributor Author

Should I do a merge or a rebase to resolve the conflicts?

@vstinner

Copy link
Copy Markdown
Member

Should I do a merge or a rebase to resolve the conflicts?

As you want.

@vstinner vstinner dismissed serhiy-storchaka’s stale review May 31, 2017 12:26

NEWS and doc was fixed.

@vstinner vstinner merged commit fc354f0 into python:master May 31, 2017
@vstinner

Copy link
Copy Markdown
Member

LGTM. Thanks @albertjan!

@ammaraskar

Copy link
Copy Markdown
Member

Nevermind @albertjan, looks like the issue I described here was caused by a merge issue. Thanks anyway :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants