diff --git a/pkgs/development/python-modules/chardet/default.nix b/pkgs/development/python-modules/chardet/default.nix index 87f4b526b9b4..1e6bf432037e 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 { +buildPythonPackage (finalAttrs: { 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 = finalAttrs.version; + hash = "sha256-7G998L4VRvNiGBBNAxPJB27lI2DtL1lTteowUH2NBDk="; }; - nativeBuildInputs = [ setuptools ]; + build-system = [ + hatch-vcs + hatchling + ]; nativeCheckInputs = [ hypothesis + pytest-timeout + pytest-xdist pytestCheckHook ]; @@ -32,11 +42,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "chardet" ]; meta = { - changelog = "https://github.com/chardet/chardet/releases/tag/${version}"; + 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 = [ ]; }; -} +}) 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" ];