Drop setuptools as a direct runtime dependency#1243
Merged
Conversation
setuptools was listed as a direct runtime dependency in requirements.txt and Pipfile (#863), but the project itself does not import setuptools or pkg_resources at runtime (version detection uses importlib.metadata in openstack_image_manager/__init__.py). setuptools is still pulled in transitively as a runtime dependency of pbr (openstacksdk -> keystoneauth1/os-service-types -> pbr), so it remains installed; only the redundant direct pin is removed. The original rationale (providing pkg_resources under Python 3.12+) no longer applies anyway, since setuptools removed pkg_resources in v81. Pipfile.lock is regenerated: setuptools stays as a transitive dependency (==82.0.1) with no package version changes. Closes #1234 Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Christian Berendt <berendt@osism.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1234
Background
setuptoolswas listed as a direct runtime dependency inrequirements.txtandPipfile(added in #863). However, the project itself does not importsetuptoolsorpkg_resourcesat runtime — version detection usesimportlib.metadata(stdlib) inopenstack_image_manager/__init__.py.The
setuptools>=61.0.0entry inpyproject.tomlis a build dependency ([build-system].requires) and is unrelated/unchanged.What changed
setuptools==82.0.1pin fromrequirements.txtandPipfile.Pipfile.lock.setuptoolsis still pulled in transitively as a runtime dependency ofpbr(openstacksdk→keystoneauth1/os-service-types→pbr), so it remains installed. The relock keepssetuptoolsat==82.0.1with no other package version changes — only the direct-dependency marker and the meta hash differ.The original rationale (providing
pkg_resourcesunder Python 3.12+, where setuptools is no longer pre-installed in venvs) no longer applies regardless: setuptools removedpkg_resourcesin v81, so the pinned82.0.1does not shippkg_resourcesanyway.🤖 Generated with Claude Code