Skip to content

gh-153569: Replace tokenizer input readers - #156472

Merged
pablogsal merged 5 commits into
python:mainfrom
pablogsal:gh-153569-tokenizer-reader-cutover
Aug 28, 2026
Merged

gh-153569: Replace tokenizer input readers#156472
pablogsal merged 5 commits into
python:mainfrom
pablogsal:gh-153569-tokenizer-reader-cutover

Conversation

@pablogsal

@pablogsal pablogsal commented Aug 27, 2026

Copy link
Copy Markdown
Member

This gets rid of the four separate tokenizer input implementations and replaces them with one reader and decoder pipeline. Files, strings, readline callbacks, and interactive input now share encoding detection, incremental decoding, newline handling, and cleanup, so the duplicated reader state and helpers go away. Complete UTF-8 callback lines skip incremental codec setup, while split and stateful input keeps the decoder state it needs. Interactive input keeps the source it needs without making the other readers retain a second copy.

This is the next part of #153569.

@pablogsal
pablogsal merged commit f5dbcba into python:main Aug 28, 2026
60 checks passed
@pablogsal
pablogsal deleted the gh-153569-tokenizer-reader-cutover branch August 28, 2026 15:26
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