From 50e825bd285f9b298c4fcf11d9cf83936cf40a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 6 Dec 2023 08:20:19 -0800 Subject: [PATCH] python311Packages.trio-asyncio: modernize expression --- .../python-modules/trio-asyncio/default.nix | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/trio-asyncio/default.nix b/pkgs/development/python-modules/trio-asyncio/default.nix index a91dd619ded9..de238ddc7c23 100644 --- a/pkgs/development/python-modules/trio-asyncio/default.nix +++ b/pkgs/development/python-modules/trio-asyncio/default.nix @@ -1,9 +1,11 @@ { lib , buildPythonPackage , fetchPypi +, setuptools , trio , outcome , sniffio +, exceptiongroup , pytest-trio , pytestCheckHook , pythonAtLeast @@ -13,14 +15,14 @@ buildPythonPackage rec { pname = "trio-asyncio"; version = "0.13.0"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchPypi { pname = "trio_asyncio"; inherit version; - sha256 = "sha256-fKJLIaGxes3mV1LWkziGuiQoTlL0srDe/k6o7YpjSmI="; + hash = "sha256-fKJLIaGxes3mV1LWkziGuiQoTlL0srDe/k6o7YpjSmI="; }; postPatch = '' @@ -28,10 +30,16 @@ buildPythonPackage rec { --replace "'pytest-runner'" "" ''; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ trio outcome sniffio + ] ++ lib.optionals (pythonOlder "3.11") [ + exceptiongroup ]; nativeCheckInputs = [ @@ -39,26 +47,16 @@ buildPythonPackage rec { pytestCheckHook ]; - pytestFlagsArray = [ - # https://github.com/python-trio/trio-asyncio/issues/112 - "-W" "ignore::DeprecationWarning" - # trio.MultiError is deprecated since Trio 0.22.0; use BaseExceptionGroup (on Python 3.11 and later) or exceptiongroup.BaseExceptionGroup (earlier versions) instead (https://github.com/python-trio/trio/issues/2211) - "-W" "ignore::trio.TrioDeprecationWarning" - ]; - disabledTestPaths = [ "tests/python" # tries to import internal API test.test_asyncio ]; - disabledTests = lib.optionals (pythonAtLeast "3.11") [ - "test_run_task" - ]; - pythonImportsCheck = [ "trio_asyncio" ]; meta = with lib; { + changelog = "https://github.com/python-trio/trio-asyncio/blob/v${version}/docs/source/history.rst"; description = "Re-implementation of the asyncio mainloop on top of Trio"; homepage = "https://github.com/python-trio/trio-asyncio"; license = with licenses; [ asl20 /* or */ mit ];