From 0b780db8ebf8df374e506dbc70ca31d2da42ffa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 20 May 2026 09:50:57 -0700 Subject: [PATCH 1/3] python3Packages.chardet: 5.2.0 -> 6.0.0.post1 Diff: https://github.com/chardet/chardet/compare/5.2.0...6.0.0.post1 Changelog: https://github.com/chardet/chardet/releases/tag/6.0.0.post1 --- .../python-modules/chardet/default.nix | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/chardet/default.nix b/pkgs/development/python-modules/chardet/default.nix index 87f4b526b9b4..7e0b2344d250 100644 --- a/pkgs/development/python-modules/chardet/default.nix +++ b/pkgs/development/python-modules/chardet/default.nix @@ -1,26 +1,36 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + hatch-vcs, + hatchling, hypothesis, + pytest-timeout, + pytest-xdist, pytestCheckHook, - setuptools, }: buildPythonPackage rec { pname = "chardet"; - version = "5.2.0"; + version = "6.0.0.post1"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-Gztv9HmoxBS8P6LAhSmVaVxKAm3NbQYzst0JLKOcHPc="; + src = fetchFromGitHub { + owner = "chardet"; + repo = "chardet"; + tag = version; + hash = "sha256-7G998L4VRvNiGBBNAxPJB27lI2DtL1lTteowUH2NBDk="; }; - nativeBuildInputs = [ setuptools ]; + build-system = [ + hatch-vcs + hatchling + ]; nativeCheckInputs = [ hypothesis + pytest-timeout + pytest-xdist pytestCheckHook ]; @@ -32,7 +42,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "chardet" ]; meta = { - changelog = "https://github.com/chardet/chardet/releases/tag/${version}"; + changelog = "https://github.com/chardet/chardet/releases/tag/${src.tag}"; description = "Universal encoding detector"; mainProgram = "chardetect"; homepage = "https://github.com/chardet/chardet"; From 9dfc99b8d876daacfb34786a0af0ebcd3097e2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 20 May 2026 11:06:01 -0700 Subject: [PATCH 2/3] python3Packages.chardet: use finalAttrs --- pkgs/development/python-modules/chardet/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/chardet/default.nix b/pkgs/development/python-modules/chardet/default.nix index 7e0b2344d250..1e6bf432037e 100644 --- a/pkgs/development/python-modules/chardet/default.nix +++ b/pkgs/development/python-modules/chardet/default.nix @@ -10,7 +10,7 @@ pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "chardet"; version = "6.0.0.post1"; pyproject = true; @@ -18,7 +18,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "chardet"; repo = "chardet"; - tag = version; + tag = finalAttrs.version; hash = "sha256-7G998L4VRvNiGBBNAxPJB27lI2DtL1lTteowUH2NBDk="; }; @@ -42,11 +42,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "chardet" ]; meta = { - changelog = "https://github.com/chardet/chardet/releases/tag/${src.tag}"; + changelog = "https://github.com/chardet/chardet/releases/tag/${finalAttrs.src.tag}"; description = "Universal encoding detector"; mainProgram = "chardetect"; homepage = "https://github.com/chardet/chardet"; license = lib.licenses.lgpl21Plus; maintainers = [ ]; }; -} +}) From 1e0590976310901b97d40324705d71746d9b63bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 21 May 2026 08:45:07 -0700 Subject: [PATCH 3/3] python3Packages.httpx: skip tests broken by chardet v6 --- pkgs/development/python-modules/httpx/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/httpx/default.nix b/pkgs/development/python-modules/httpx/default.nix index 2b146d05b658..a5e66abfcd68 100644 --- a/pkgs/development/python-modules/httpx/default.nix +++ b/pkgs/development/python-modules/httpx/default.nix @@ -96,6 +96,10 @@ buildPythonPackage rec { "test_sync_proxy_close" # ResourceWarning: Async generator 'httpx._content.ByteStream.__aiter__' was garbage collected before it had been exhausted. Surround its use in 'async with aclosing(...):' to ensure that it gets cleaned up as soon as you're done using it. "test_write_timeout" # trio variant + # chardet v6 recognizes the wrong encoding + "test_client_decode_text_using_autodetect" + "test_client_decode_text_using_explicit_encoding" + "test_response_decode_text_using_autodetect" ]; disabledTestPaths = [ "tests/test_main.py" ];