From 252781806ffb5556311e28d7c9e8bc6185e9da11 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Mon, 28 Sep 2026 17:43:33 +0000 Subject: [PATCH] fix: Allow Chardet 7 The Chardet <6 constraint cannot resolve with a requirement for Chardet 7. Allow Chardet 7 while retaining Chardet 5 support. Exclude Chardet 6: 6.0.0.post1 returns no encoding for the existing CP1252 requirements fixture, so stdin decoding falls back to UTF-8 and fails. The existing tests for requirements on stdin pass with Chardet 7.0.0 and 7.6.0 on Python 3.12, including that fixture. The native Poetry lock continues to resolve Chardet 5.2.0 for the project's Python 3.9+ range. Codex for Tamir. Signed-off-by: Tamir Duberstein --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 49741777..277e0714 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ packageurl-python = ">=0.11, <2" # keep in sync with same dep in `cyclonedx-pyt pip-requirements-parser = "^32.0" packaging = "^22 || ^23 || ^24 || ^25 || ^26" tomli = { version = "^2.0.1", python = "<3.11" } -chardet = "^5.1" +chardet = ">=5.1, <8, !=6.*" [tool.poetry.group.dev.dependencies] # pin to exact versions, if the tool/lib/plugin is process-relevant