2021-12-30 13:39:12 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, trio
, outcome
, sniffio
, pytest-trio
, pytestCheckHook
2022-02-20 05:27:41 +00:00
, pythonOlder
2021-12-30 13:39:12 +00:00
} :
buildPythonPackage rec {
pname = " t r i o - a s y n c i o " ;
version = " 0 . 1 2 . 0 " ;
2022-02-20 05:27:41 +00:00
format = " s e t u p t o o l s " ;
disabled = pythonOlder " 3 . 7 " ;
2021-12-30 13:39:12 +00:00
src = fetchPypi {
pname = " t r i o _ a s y n c i o " ;
inherit version ;
sha256 = " 8 2 4 b e 2 3 b 0 c 6 7 8 c 0 d f 9 4 2 8 1 6 c d b 5 7 b 9 2 a 8 b 9 4 f 2 6 4 f f f a 8 9 f 0 4 6 2 6 b 0 b a 2 d 0 0 9 7 6 8 " ;
} ;
postPatch = ''
substituteInPlace setup . py \
- - replace " ' p y t e s t - r u n n e r ' " " "
'' ;
propagatedBuildInputs = [
trio
outcome
sniffio
] ;
checkInputs = [
pytest-trio
pytestCheckHook
] ;
2022-02-20 05:27:41 +00:00
pytestFlagsArray = [
# https://github.com/python-trio/trio-asyncio/issues/112
2023-01-20 10:41:00 +00:00
" - W " " i g n o r e : : D e p r e c a t i o n W a r n i n g "
# 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 " " i g n o r e : : t r i o . T r i o D e p r e c a t i o n W a r n i n g "
2022-02-20 05:27:41 +00:00
] ;
2021-12-30 13:39:12 +00:00
disabledTestPaths = [
" t e s t s / p y t h o n " # tries to import internal API test.test_asyncio
] ;
2022-02-20 05:27:41 +00:00
pythonImportsCheck = [
" t r i o _ a s y n c i o "
] ;
2021-12-30 13:39:12 +00:00
meta = with lib ; {
description = " R e - i m p l e m e n t a t i o n o f t h e a s y n c i o m a i n l o o p o n t o p o f T r i o " ;
homepage = " h t t p s : / / g i t h u b . c o m / p y t h o n - t r i o / t r i o - a s y n c i o " ;
license = with licenses ; [ asl20 /* o r */ mit ] ;
maintainers = with maintainers ; [ dotlambda ] ;
} ;
}