Skip to content

Allow Chardet 7 #1109

Closed
Closed

Description

@tamird

Problem

cyclonedx-bom 7.4.0 requires Chardet below 6, so it cannot resolve alongside a Chardet 7 requirement.

Proposed solution

Admit Chardet 7 while preserving Chardet 5 support and excluding Chardet 6. Chardet 6.0.0.post1 returns no encoding for the existing CP1252 requirements fixture, which makes requirements - fall back to UTF-8 and fail.

Alternatives considered

A contiguous range through Chardet 6 is unsuitable because of that observed failure. No decoding change is needed for the tested Chardet 7 releases.

Additional context

The existing tests for requirements on stdin passed with Chardet 7.0.0 and 7.6.0 on Python 3.12, including the CP1252 fixture. These runs used the configured unittest command directly because Tox stopped on an invalid requirement emitted from the unchanged cyclonedx-python-lib union. The Poetry environment's Requests 2.32.5 warned about Chardet 7.

Contribution

  • I am willing to provide an implementation

Codex for Tamir.

Activity

  1. jkowalleck commented on Sep 29, 2026

    @jkowalleck
    Member

    this looks like an interesting improvement.
    thank you so much for flagging the outdated chardet.

  2. linked a pull request that will close this issuefeat(deps): support `chardet` v7 #1110on Sep 29, 2026
  3. jkowalleck commented on Sep 29, 2026

    @jkowalleck
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciestopic: modify/update a dependency

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions