GeezerVison is showing github.com — gh-153569: hide tokenizer state behind token and source operations by pablogsal · Pull Request #156654 · python/cpython
Conversation
pablogsal
commented
Aug 30, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Make pegen and _tokenize consume tokenizer operations instead of accessing the tokenizer layout. Return token kind, span, location, and raw-string context together, so parser actions use the context of the cached token.
Represent persistent scanner positions as offsets and remove pointer save/restore bookkeeping when input storage grows.
Part of gh-153569.
Previous: #156484. Next: #157055.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Sep 5, 2026
pablogsal
changed the title
gh-153569: simplify tokenizer source and formatted-string state
gh-153569: finish tokenizer offsets, diagnostics, and opaque API
Sep 5, 2026
pablogsal
changed the title
gh-153569: finish tokenizer offsets, diagnostics, and opaque API
gh-153569: finish tokenizer offsets and the opaque API cutover
Sep 6, 2026
pablogsal
changed the title
gh-153569: finish tokenizer offsets and the opaque API cutover
gh-153569: hide tokenizer state behind token and source operations
Sep 7, 2026
Uh oh!
There was an error while loading. Please reload this page.
clin1234
pushed a commit
to clin1234/cpython
that referenced
this pull request
Sep 12, 2026
…ons (python#156654)
Make pegen and _tokenize consume tokenizer operations instead of accessing the tokenizer layout. Return token kind, span, location, and raw-string context together, so parser actions use the context of the cached token.
Represent persistent scanner positions as offsets and remove pointer save/restore bookkeeping when input storage grows.
johnslavik
pushed a commit
to johnslavik/cpython
that referenced
this pull request
Sep 14, 2026
…ons (python#156654)
Make pegen and _tokenize consume tokenizer operations instead of accessing the tokenizer layout. Return token kind, span, location, and raw-string context together, so parser actions use the context of the cached token.
Represent persistent scanner positions as offsets and remove pointer save/restore bookkeeping when input storage grows.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|