diff --git a/pkgs/development/python-modules/dependency-injector/default.nix b/pkgs/development/python-modules/dependency-injector/default.nix index 628e18931255..98acaaba4094 100644 --- a/pkgs/development/python-modules/dependency-injector/default.nix +++ b/pkgs/development/python-modules/dependency-injector/default.nix @@ -7,56 +7,75 @@ , httpx , mypy-boto3-s3 , numpy -, scipy , pydantic +, pytest-asyncio , pytestCheckHook +, pythonOlder , pyyaml +, scipy , six }: buildPythonPackage rec { pname = "dependency-injector"; - version = "4.35.3"; + version = "4.40.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "ets-labs"; repo = "python-dependency-injector"; rev = version; - sha256 = "sha256-2qe4A2T3EagNCh1zSbPWblVN7p9NH8rNwQQVyESJTdk="; + hash = "sha256-lcgPFdAgLmv7ILL2VVfqtGSw96aUfPv9oiOhksRtF3k="; }; propagatedBuildInputs = [ six ]; + passthru.optional-dependencies = { + aiohttp = [ + aiohttp + ]; + pydantic = [ + pydantic + ]; + flask = [ + flask + ]; + yaml = [ + pyyaml + ]; + }; + checkInputs = [ - aiohttp fastapi - flask httpx mypy-boto3-s3 numpy - pydantic - scipy + pytest-asyncio pytestCheckHook - pyyaml - ]; + scipy + ] ++ passthru.optional-dependencies.aiohttp + ++ passthru.optional-dependencies.pydantic + ++ passthru.optional-dependencies.yaml + ++ passthru.optional-dependencies.flask; - postPatch = '' - substituteInPlace requirements.txt \ - --replace "six>=1.7.0,<=1.15.0" "six" - ''; + pythonImportsCheck = [ + "dependency_injector" + ]; disabledTestPaths = [ - # There is no unique identifier to disable the one failing test + # Exclude tests for EOL Python releases "tests/unit/ext/test_aiohttp_py35.py" + "tests/unit/wiring/test_*_py36.py" ]; - pythonImportsCheck = [ "dependency_injector" ]; - meta = with lib; { description = "Dependency injection microframework for Python"; homepage = "https://github.com/ets-labs/python-dependency-injector"; + changelog = "https://github.com/ets-labs/python-dependency-injector/blob/${version}/docs/main/changelog.rst"; license = licenses.bsd3; maintainers = with maintainers; [ gerschtli ]; };