Skip to content

gh-153569: Simplify tokenizer source views and reader ownership - #158849

Draft
pablogsal wants to merge 6 commits into
python:mainfrom
pablogsal:tokenizer-source-api-cleanup
Draft

pablogsal wants to merge 6 commits into
python:mainfrom
pablogsal:tokenizer-source-api-cleanup

Conversation

@pablogsal

@pablogsal pablogsal commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Move byte access, searches, and span views into the source API. Keep comment and trailing-statement scanning on offsets, copy formatted-string expression segments through span views, and use logical line spans for _tokenize column calculations.

Move the borrowed file handle and owned encoding into the reader so input state and its cleanup live together. Reuse the codec helper to create incremental decoders.

Follow-up to #153569.

@pablogsal
pablogsal force-pushed the tokenizer-source-api-cleanup branch from f36c44b to 7da4c7f Compare October 5, 2026 15:51
@pablogsal
pablogsal force-pushed the tokenizer-source-api-cleanup branch from 7da4c7f to ffb781d Compare October 5, 2026 16:11
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