From e8a835241ee13c9f2c40ed8fe2aa2c25ac59e65c Mon Sep 17 00:00:00 2001 From: Austin Butler Date: Fri, 27 Jan 2023 23:21:31 -0800 Subject: [PATCH] pythonPackages.loguru: 0.6.0 -> unstable-2023-01-20 --- .../python-modules/loguru/default.nix | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/loguru/default.nix b/pkgs/development/python-modules/loguru/default.nix index 70476a4b8900..f89741e527af 100644 --- a/pkgs/development/python-modules/loguru/default.nix +++ b/pkgs/development/python-modules/loguru/default.nix @@ -4,31 +4,29 @@ , buildPythonPackage , colorama , fetchpatch -, fetchPypi +, fetchFromGitHub +, freezegun +, mypy , pytestCheckHook , pythonOlder }: buildPythonPackage rec { pname = "loguru"; - version = "0.6.0"; + # No release since Jan 2022, only master is compatible with Python 3.11 + # https://github.com/Delgan/loguru/issues/740 + version = "unstable-2023-01-20"; format = "setuptools"; disabled = pythonOlder "3.5"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-BmvQZ1jQpRPpg2/ZxrWnW/s/02hB9LmWvGC1R6MJ1Bw="; + src = fetchFromGitHub { + owner = "Delgan"; + repo = pname; + rev = "07f94f3c8373733119f85aa8b9ca05ace3325a4b"; + hash = "sha256-lMGyQbBX3z6186ojs/iew7JMrG91ivPA679T9r+7xYw="; }; - patches = [ - (fetchpatch { - name = "fix-test-repr-infinite-recursion.patch"; - url = "https://github.com/Delgan/loguru/commit/4fe21f66991abeb1905e24c3bc3c634543d959a2.patch"; - hash = "sha256-NUOkgUS28TOazO0txMinFtaKwsi/J1Y7kqjjvMRCnR8="; - }) - ]; - propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ aiocontextvars ]; @@ -36,19 +34,15 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook colorama + freezegun + mypy ]; disabledTestPaths = lib.optionals stdenv.isDarwin [ "tests/test_multiprocessing.py" ]; - disabledTests = [ - "test_time_rotation_reopening" - "test_file_buffering" - # Tests are failing with Python 3.10 - "test_exception_others" - "" - ] ++ lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming"