Skip to content

release: prepare cChardet 2.4.1 - #183

Merged
PyYoshi merged 1 commit into
masterfrom
release/2.4.1
Nov 13, 2026
Merged

PyYoshi merged 1 commit into
masterfrom
release/2.4.1

Conversation

@PyYoshi

@PyYoshi PyYoshi commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Summary

Prepare cChardet 2.4.1 for release.

  • set the public package version to 2.4.1
  • finalize the 2.4.1 changelog with the 2026-11-14 release date

Highlights

This bug-fix release addresses two memory-safety bugs in UniversalDetector (#182):

  • Threading: one detector shared between threads could crash the process, even on GIL builds. Its methods now hold a per-instance lock.
  • Weighted reset: with language_weights, calling close() after reset() returned freed memory as the result. The bundled uchardet now drops its weighted candidates on reset.

Wheels are now built with cibuildwheel 4.3.5 against CPython 3.15.2 (#181). As with 2.4.0, they cover:

  • CPython 3.11–3.15 plus free-threaded 3.14t/3.15t
  • manylinux x86_64/aarch64, Windows x86/AMD64/ARM64, and macOS x86_64/arm64

That makes 49 wheels plus the sdist.

Local validation

All checks below ran with CPython 3.15.2:

  • make check
    • Ruff 0.17.5 passed
    • strict mypy passed
    • 31 pytest tests passed
  • uv lock --check passed
  • uv build produced cchardet-2.4.1.tar.gz and a 2.4.1 wheel
    • twine check passed for both distributions
    • the sdist contains the fixed uchardet Reset()
  • two clean environments:
    • the wheel installed into CPython 3.15.2
    • the sdist built from source in free-threaded CPython 3.15.2t, where the GIL stays disabled
  • in both environments, these all passed:
    • cchardet.__version__ == "2.4.1" and cchardet.version == (2, 4, 1)
    • detect(), detect_all(), incremental UniversalDetector, and the cchardetect CLI (module, --json, and the console script) on Shift_JIS input
    • a weighted reset() followed by close() returns no result
    • one detector shared by 8 threads survives mixed feed/reset/close/result calls
  • the Build wheels workflow built all platform wheels on fix: UniversalDetector crashes with concurrent calls and after a weighted reset #182, and they passed the wheel smoke test

After merge, create and push a signed v2.4.1 tag. The tag workflow then:

  1. builds the sdist and all platform wheels
  2. verifies that the tag matches the package version
  3. waits for approval at the protected pypi environment
  4. publishes through Trusted Publishing with attestations

@PyYoshi
PyYoshi merged commit 69b9efe into master Nov 13, 2026
47 checks passed
@PyYoshi
PyYoshi deleted the release/2.4.1 branch November 13, 2026 17:50
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