Skip to content

feat!: enforces spec length bounds and removes deprecation machinery - #82

Merged
wgordon17 merged 4 commits into
mainfrom
feat/v3-spec-bounds
Nov 9, 2026
Merged

wgordon17 merged 4 commits into
mainfrom
feat/v3-spec-bounds

Conversation

@wgordon17

Copy link
Copy Markdown
Member

Summary

  • Rejects lengths outside the CUID2 specification range 2..32 with ValueError in the library and exit code 2 in the CLI, and defaults and clamps is_cuid max_length to 32.
  • Removes MAXIMUM_LENGTH (98), the FutureWarning machinery, _console_main and _show_cli_warning; the console script and python -m cuid2 call cuid2.cli:main directly.
  • Updates tests, README, and the CHANGELOG Unreleased section, including an upgrade note for callers using lengths above 32.

- Raises TypeError for non-integer lengths at construction via operator.index
- Describes length as exact in docstrings and clarifies the CLI --help defaults
- Pins cuid2<3 in the upgrade note and records the TypeError change
@wgordon17
wgordon17 marked this pull request as ready for review November 9, 2026 02:13
@wgordon17
wgordon17 requested a review from a team November 9, 2026 02:13
@wgordon17
wgordon17 merged commit dbfd735 into main Nov 9, 2026
25 checks passed
@wgordon17
wgordon17 deleted the feat/v3-spec-bounds branch November 9, 2026 02:13
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