FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-153569: hide tokenizer state behind token and source operations by pablogsal · Pull Request #156654 · python/cpython · GitHub

Repository navigation

gh-153569: hide tokenizer state behind token and source operations - #156654

Merged
pablogsal merged 4 commits into
python:mainfrom
pablogsal:gh-153569-tokenizer-source-ftstring-clean
Sep 12, 2026
Merged

pablogsal merged 4 commits into
python:mainfrom
pablogsal:gh-153569-tokenizer-source-ftstring-clean

Conversation

pablogsal commented Aug 30, 2026 •
edited
Loading

Copy link
Copy Markdown
Member

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.

pablogsal force-pushed the gh-153569-tokenizer-source-ftstring-clean branch 4 times, most recently from b2bc8d1 to d9b2b16 Compare August 30, 2026 13:16
pablogsal force-pushed the gh-153569-tokenizer-source-ftstring-clean branch 4 times, most recently from 9ce1fd9 to afd9d72 Compare September 5, 2026 17:46
pablogsal force-pushed the gh-153569-tokenizer-source-ftstring-clean branch from afd9d72 to f72cb2b Compare September 5, 2026 19:17
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 force-pushed the gh-153569-tokenizer-source-ftstring-clean branch 3 times, most recently from 7e5d82c to 9240806 Compare September 6, 2026 20:57
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 force-pushed the gh-153569-tokenizer-source-ftstring-clean branch 4 times, most recently from 0eb2ce0 to 6f220e4 Compare September 6, 2026 23:35
pablogsal closed this Sep 6, 2026
pablogsal reopened this Sep 6, 2026
pablogsal force-pushed the gh-153569-tokenizer-source-ftstring-clean branch from 6f220e4 to bbc061f Compare September 7, 2026 00:03
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
pablogsal force-pushed the gh-153569-tokenizer-source-ftstring-clean branch from bbc061f to b619385 Compare September 7, 2026 00:05
pablogsal force-pushed the gh-153569-tokenizer-source-ftstring-clean branch 2 times, most recently from 0b47836 to aef6c9e Compare September 8, 2026 23:27
pablogsal marked this pull request as ready for review September 8, 2026 23:28
pablogsal merged commit 7bfa97f into python:main Sep 12, 2026
62 checks passed
pablogsal deleted the gh-153569-tokenizer-source-ftstring-clean branch September 12, 2026 13:30
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL