1{ lib, buildPythonPackage, fetchPypi, pythonOlder, pytest, pytest-asyncio }:
2
3buildPythonPackage rec {
4 pname = "async_generator";
5 version = "1.10";
6
7 disabled = pythonOlder "3.5";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144";
12 };
13
14 checkInputs = [ pytest pytest-asyncio ];
15
16 checkPhase = ''
17 pytest -W error -ra -v --pyargs async_generator
18 '';
19
20 meta = with lib; {
21 description = "Async generators and context managers for Python 3.5+";
22 homepage = https://github.com/python-trio/async_generator;
23 license = with licenses; [ mit asl20 ];
24 };
25}