From e3bbe8c8304cc0300683facc28ba414aeae17046 Mon Sep 17 00:00:00 2001 From: sigma67 Date: Fri, 22 Nov 2024 21:25:21 +0100 Subject: [PATCH] pdm-build-locked command: ignore dependency-groups during resolution --- pdm.lock | 71 +++++++++++++++++---------------- pyproject.toml | 2 +- src/pdm_build_locked/command.py | 3 ++ 3 files changed, 41 insertions(+), 35 deletions(-) diff --git a/pdm.lock b/pdm.lock index d141bb0..c62deea 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev", "doc"] strategy = [] lock_version = "4.5.0" -content_hash = "sha256:e4e1478d9071af86a8659b9b631248630ab5a4880e4612f1a38c2b65f0d737ec" +content_hash = "sha256:ae315c32582e7830c95383f69ab6cc98249b77e1c02dea2b24cb51922d6d3f2f" [[metadata.targets]] requires_python = ">=3.8" @@ -78,12 +78,12 @@ files = [ [[package]] name = "certifi" -version = "2024.7.4" +version = "2024.8.30" requires_python = ">=3.6" summary = "Python package for providing Mozilla's CA Bundle." files = [ - {file = "certifi-2024.7.4-py3-none-any.whl", hash = "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90"}, - {file = "certifi-2024.7.4.tar.gz", hash = "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b"}, + {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, + {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, ] [[package]] @@ -318,15 +318,15 @@ files = [ [[package]] name = "dep-logic" -version = "0.4.3" +version = "0.4.9" requires_python = ">=3.8" summary = "Python dependency specifications supporting logical operations" dependencies = [ "packaging>=22", ] files = [ - {file = "dep_logic-0.4.3-py3-none-any.whl", hash = "sha256:03f2740fc40e2848f2a4c77baddcc8f5e3773c304da947815306d1e616f3942c"}, - {file = "dep_logic-0.4.3.tar.gz", hash = "sha256:e4768f0a26c8c1c0e39fd520f3e0bd099ca528ec6a8f20359fbc89ffcdf8da45"}, + {file = "dep_logic-0.4.9-py3-none-any.whl", hash = "sha256:06faa33814e5ff881922f644284a608d7da7946462760f710217d829ae864a0e"}, + {file = "dep_logic-0.4.9.tar.gz", hash = "sha256:5d455ea2a3da4fea2be6186d886905c57eeeebe3ea7fa967f599cb8e0f01d5c9"}, ] [[package]] @@ -413,7 +413,7 @@ files = [ [[package]] name = "hishel" -version = "0.0.30" +version = "0.0.33" requires_python = ">=3.8" summary = "Persistent cache implementation for httpx and httpcore" dependencies = [ @@ -421,13 +421,13 @@ dependencies = [ "typing-extensions>=4.8.0", ] files = [ - {file = "hishel-0.0.30-py3-none-any.whl", hash = "sha256:0c73a779a6b554b52dff75e5962057df25764fd798c31b9435ce6398b1b171c8"}, - {file = "hishel-0.0.30.tar.gz", hash = "sha256:656393ee77e9c39a0d6c527c74810e15d96e598dcb9b191f20a788608ceaca99"}, + {file = "hishel-0.0.33-py3-none-any.whl", hash = "sha256:6e6c6cdaf432ff4c4981e7792ef7d1fa4c8ede58b9dbbcefb9ab3fc9770f2a07"}, + {file = "hishel-0.0.33.tar.gz", hash = "sha256:ab5b2661d5e2252f305fd0fb20e8c76bfab3ea73458f20f2591c53c37b270089"}, ] [[package]] name = "httpcore" -version = "1.0.5" +version = "1.0.7" requires_python = ">=3.8" summary = "A minimal low-level HTTP client." dependencies = [ @@ -435,8 +435,8 @@ dependencies = [ "h11<0.15,>=0.13", ] files = [ - {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"}, - {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"}, + {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"}, + {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"}, ] [[package]] @@ -799,15 +799,17 @@ files = [ [[package]] name = "pdm" -version = "2.17.1" +version = "2.20.1" requires_python = ">=3.8" summary = "A modern Python package and dependency manager supporting the latest PEP standards" dependencies = [ "blinker", - "dep-logic>=0.4.3", + "certifi>=2024.8.30", + "dep-logic>=0.4.4", "filelock>=3.13", "findpython<1.0.0a0,>=0.6.0", - "hishel<0.1.0,>=0.0.24", + "hishel<0.1.0,>=0.0.32", + "httpcore>=1.0.6", "httpx[socks]<1,>0.20", "importlib-metadata>=3.6; python_version < \"3.10\"", "importlib-resources>=5; python_version < \"3.9\"", @@ -818,18 +820,18 @@ dependencies = [ "platformdirs", "pyproject-hooks", "python-dotenv>=0.15", - "resolvelib>=1.0.1", + "resolvelib>=1.1", "rich>=12.3.0", "shellingham>=1.3.2", "tomli>=1.1.0; python_version < \"3.11\"", "tomlkit<1,>=0.11.1", - "truststore; python_version >= \"3.10\"", - "unearth>=0.16.0", + "truststore>=0.9; python_version >= \"3.10\"", + "unearth>=0.17.0", "virtualenv>=20", ] files = [ - {file = "pdm-2.17.1-py3-none-any.whl", hash = "sha256:2ef7bb1424217f267b81e40f9c5326af27a519e9535e3272aa3b454ad5ab096c"}, - {file = "pdm-2.17.1.tar.gz", hash = "sha256:9e1a28ecca83f3627aa700b1e3d52cd3f82f10fc908ac6499119baf7a3d4ea6c"}, + {file = "pdm-2.20.1-py3-none-any.whl", hash = "sha256:27904e5a703e6ce6598a2a92a6e4c95b2099746b1aba9402154978afce4ed6a7"}, + {file = "pdm-2.20.1.tar.gz", hash = "sha256:5348e9d33de381f998904a63ab18efdd6d1cf6377d45572e8b996d58dfc5b996"}, ] [[package]] @@ -847,18 +849,18 @@ files = [ [[package]] name = "pdm" -version = "2.17.1" +version = "2.20.1" extras = ["pytest"] requires_python = ">=3.8" summary = "A modern Python package and dependency manager supporting the latest PEP standards" dependencies = [ - "pdm==2.17.1", + "pdm==2.20.1", "pytest", "pytest-mock", ] files = [ - {file = "pdm-2.17.1-py3-none-any.whl", hash = "sha256:2ef7bb1424217f267b81e40f9c5326af27a519e9535e3272aa3b454ad5ab096c"}, - {file = "pdm-2.17.1.tar.gz", hash = "sha256:9e1a28ecca83f3627aa700b1e3d52cd3f82f10fc908ac6499119baf7a3d4ea6c"}, + {file = "pdm-2.20.1-py3-none-any.whl", hash = "sha256:27904e5a703e6ce6598a2a92a6e4c95b2099746b1aba9402154978afce4ed6a7"}, + {file = "pdm-2.20.1.tar.gz", hash = "sha256:5348e9d33de381f998904a63ab18efdd6d1cf6377d45572e8b996d58dfc5b996"}, ] [[package]] @@ -1057,11 +1059,12 @@ files = [ [[package]] name = "resolvelib" -version = "1.0.1" +version = "1.1.0" +requires_python = ">=3.7" summary = "Resolve abstract dependencies into concrete ones" files = [ - {file = "resolvelib-1.0.1-py2.py3-none-any.whl", hash = "sha256:d2da45d1a8dfee81bdd591647783e340ef3bcb104b54c383f70d422ef5cc7dbf"}, - {file = "resolvelib-1.0.1.tar.gz", hash = "sha256:04ce76cbd63fded2078ce224785da6ecd42b9564b1390793f64ddecbe997b309"}, + {file = "resolvelib-1.1.0-py2.py3-none-any.whl", hash = "sha256:f80de38ae744bcf4e918e27a681a5c6cb63a08d9a926c0989c0730bcdd089049"}, + {file = "resolvelib-1.1.0.tar.gz", hash = "sha256:b68591ef748f58c1e2a2ac28d0961b3586ae8b25f60b0ba9a5e4f3d87c1d6a79"}, ] [[package]] @@ -1305,12 +1308,12 @@ files = [ [[package]] name = "truststore" -version = "0.9.1" +version = "0.10.0" requires_python = ">=3.10" summary = "Verify certificates using native system trust stores" files = [ - {file = "truststore-0.9.1-py3-none-any.whl", hash = "sha256:7f5b447d68318d966428131fc1c00442cca3a2d581a3986143558f007efba0b4"}, - {file = "truststore-0.9.1.tar.gz", hash = "sha256:8f7312d70cc33e9003b748a80a04ead1fcb2ed856a7c6c9ca5a02482901a90be"}, + {file = "truststore-0.10.0-py3-none-any.whl", hash = "sha256:b3798548e421ffe2ca2a6217cca49e7a17baf40b72d86a5505dc7d701e77d15b"}, + {file = "truststore-0.10.0.tar.gz", hash = "sha256:5da347c665714fdfbd46f738c823fe9f0d8775e41ac5fb94f325749091187896"}, ] [[package]] @@ -1325,7 +1328,7 @@ files = [ [[package]] name = "unearth" -version = "0.16.1" +version = "0.17.2" requires_python = ">=3.8" summary = "A utility to fetch and download python packages" dependencies = [ @@ -1333,8 +1336,8 @@ dependencies = [ "packaging>=20", ] files = [ - {file = "unearth-0.16.1-py3-none-any.whl", hash = "sha256:5a598ac1a3f185144fadc9de47f1043bff805c36118ffc40f81ef98ff22e8e37"}, - {file = "unearth-0.16.1.tar.gz", hash = "sha256:988a43418fa0b78aeb628a15f6a3b02152c1787f63fe6d254c7f4e2ccf8db0a7"}, + {file = "unearth-0.17.2-py3-none-any.whl", hash = "sha256:4d21af1238a583835fca156322f7225382e718cdcc42d6278050a88e605c4ad5"}, + {file = "unearth-0.17.2.tar.gz", hash = "sha256:0b8a2afd3476f1ab6155fc579501ac47fffe43547d88a70e5a5b76a7fe6caa2c"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 020199b..5f5b787 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ package-dir = "src" [tool.pdm.dev-dependencies] dev = [ - "pdm[pytest]>=2.17.0", + "pdm[pytest]>=2.20.0", "pytest>=7.4.0", "pkginfo>=1.9.6", "pytest-cov>=4.1.0", diff --git a/src/pdm_build_locked/command.py b/src/pdm_build_locked/command.py index 4b69fb3..277ce34 100644 --- a/src/pdm_build_locked/command.py +++ b/src/pdm_build_locked/command.py @@ -49,6 +49,9 @@ def handle(self, project: Project, options: argparse.Namespace) -> None: if dev_dependencies := project.pyproject.settings.get("dev-dependencies"): pdm_dev_dependencies = dev_dependencies.keys() + if dev_dependencies := getattr(project.pyproject, "dev_dependencies", None): + pdm_dev_dependencies.extend(dev_dependencies.keys()) + groups = project.pyproject.settings.get("build", {}).get("locked-groups", None) if groups is None: groups = {group for group in project.all_dependencies if group not in pdm_dev_dependencies}