Skip to content

Use CONTROL_TOKENS_PATTERN (utf8-tokenizer 0.8.5) - #9

Merged
AmitMY merged 1 commit into
mainfrom
control-tokens-pattern
Oct 10, 2026
Merged

AmitMY merged 1 commit into
mainfrom
control-tokens-pattern

Conversation

@AmitMY

@AmitMY AmitMY commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

utf8-tokenizer 0.8.5 renamed CONTROl_TOKENS_PATTERN to CONTROL_TOKENS_PATTERN (sign/utf8-tokenizer#16), with no alias. This switches to the new name and requires utf8-tokenizer>=0.8.5.

Control tokens are still always their own words (e.g. \x0E / \x0F shift blocks).

Tests

All tests pass with utf8-tokenizer 0.8.5 (97 passed, 1 skipped), and ruff is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_015Xm62qoeaTunFSU5GYCQ1f


Note

Low Risk
Mechanical rename and minimum version bump; segmentation logic is unchanged aside from matching the upstream API.

Overview
Aligns with utf8-tokenizer 0.8.5, which renamed CONTROl_TOKENS_PATTERN to CONTROL_TOKENS_PATTERN without a backward-compatible alias.

The dependency is pinned to utf8-tokenizer>=0.8.5, and imports/usages in languages.py and pretokenizer.py are updated to the new symbol. Tokenization behavior for control tokens (still treated as atomic words in regex patterns) is unchanged.

Reviewed by Cursor Bugbot for commit 52e33af. Bugbot is set up for automated code reviews on this repo. Configure here.

@AmitMY
AmitMY merged commit a3ac62b into main Oct 10, 2026
3 checks passed
@AmitMY
AmitMY deleted the control-tokens-pattern branch October 10, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant