From f55fa7b6f336ceae3d266531bc0c0003137d7b98 Mon Sep 17 00:00:00 2001 From: sigma67 Date: Sun, 21 Jul 2024 15:22:32 +0200 Subject: [PATCH] add compatibility note to docs --- doc/src/index.rst | 2 ++ src/pdm_build_locked/command.py | 2 +- tests/unit/test_build_command.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/src/index.rst b/doc/src/index.rst index 55f9ed3..2c9b41e 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -5,6 +5,8 @@ pdm-build-locked is a pdm plugin to enabling reproducible installs of Python CLI It achieves this by adding the pinned packages from PDM's lockfile as additional optional dependency groups to the distribution metadata. +Compatible with ``pdm>=2.11``. + .. toctree:: :maxdepth: 2 diff --git a/src/pdm_build_locked/command.py b/src/pdm_build_locked/command.py index 57bdff7..95da694 100644 --- a/src/pdm_build_locked/command.py +++ b/src/pdm_build_locked/command.py @@ -141,7 +141,7 @@ def _get_locked_packages(project: Project, group: str) -> list[str]: supported_params = inspect.signature(resolve_candidates_from_lockfile).parameters if "cross_platform" in supported_params: # pdm 2.11.0+ - requirements = list(project.get_dependencies(group).values()) + requirements = list(project.get_dependencies(group).values()) # type: ignore[attr-defined] candidates = resolve_candidates_from_lockfile(project, requirements, cross_platform=True, groups=[group]) elif "env_spec" in supported_params: # pdm 2.17.0+ diff --git a/tests/unit/test_build_command.py b/tests/unit/test_build_command.py index 96640bc..40c6431 100644 --- a/tests/unit/test_build_command.py +++ b/tests/unit/test_build_command.py @@ -118,7 +118,7 @@ def test_build_locked_pyproject(pdm: PDMCallable, data_base_path: Path, temp_dir assert result.exit_code == 0 wheel = wheel_from_tempdir(temp_dir) - assert count_group_dependencies(wheel, "locked") == 24 + assert count_group_dependencies(wheel, "locked") == 26 assert count_group_dependencies(wheel, "extras-locked") == 1 assert count_group_dependencies(wheel, "cow-locked") == 1