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-25643: Refactor the C tokenizer #25050

Merged
merged 6 commits into from Mar 28, 2021
Merged

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Mar 28, 2021

https://bugs.python.org/issue25643

Based on the original patch by Serhiy Storchaka

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

@pablogsal, @serhiy-storchaka: I added some PEP 7 comments, some comments about deprecated memory functions, and some decref / free control questions. Hope you don't mind.

Parser/tokenizer.c Show resolved Hide resolved
Parser/tokenizer.c Outdated Show resolved Hide resolved
Parser/tokenizer.c Outdated Show resolved Hide resolved
Parser/tokenizer.c Show resolved Hide resolved
Parser/tokenizer.c Outdated Show resolved Hide resolved
Parser/tokenizer.c Outdated Show resolved Hide resolved
Parser/tokenizer.c Outdated Show resolved Hide resolved
Parser/tokenizer.c Outdated Show resolved Hide resolved
Parser/tokenizer.c Outdated Show resolved Hide resolved
Parser/tokenizer.c Outdated Show resolved Hide resolved
pablogsal and others added 3 commits Mar 28, 2021
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
@pablogsal
Copy link
Member Author

pablogsal commented Mar 28, 2021

@pablogsal, @serhiy-storchaka: I added some PEP 7 comments, some comments about deprecated memory functions, and some decref / free control questions. Hope you don't mind.

Thanks a lot for your comments and for the review. I have applied most of the PEP7 and made some changes to error returning paths so they are a bit more clear.

Regarding PEP7, normally we only adapt it when we are reworking things, but given that this change was quite big I had opted to not make it worse by changing the surrounding style, but I think it doesn't hurt that much.

@pablogsal
Copy link
Member Author

pablogsal commented Mar 28, 2021

@erlend-aasland Once you are ok with the changes, you can approve the PR if you wish :)

Parser/tokenizer.c Outdated Show resolved Hide resolved
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

@erlend-aasland Once you are ok with the changes, you can approve the PR if you wish :)

LGTM :)

@pablogsal pablogsal merged commit 261a452 into python:master Mar 28, 2021
10 checks passed
@pablogsal pablogsal deleted the better_token branch Mar 28, 2021
kreathon pushed a commit to kreathon/cpython that referenced this pull request May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants