Skip to content

Drop setuptools as a direct runtime dependency#1243

Merged
berendt merged 1 commit into
mainfrom
remove-setuptools-runtime-dep
Jun 27, 2026
Merged

Drop setuptools as a direct runtime dependency#1243
berendt merged 1 commit into
mainfrom
remove-setuptools-runtime-dep

Conversation

@berendt

@berendt berendt commented Jun 27, 2026

Copy link
Copy Markdown
Member

Fixes #1234

Background

setuptools was listed as a direct runtime dependency in requirements.txt and Pipfile (added in #863). However, the project itself does not import setuptools or pkg_resources at runtime — version detection uses importlib.metadata (stdlib) in openstack_image_manager/__init__.py.

The setuptools>=61.0.0 entry in pyproject.toml is a build dependency ([build-system].requires) and is unrelated/unchanged.

What changed

  • Removed the redundant setuptools==82.0.1 pin from requirements.txt and Pipfile.
  • Regenerated Pipfile.lock.

setuptools is still pulled in transitively as a runtime dependency of pbr (openstacksdkkeystoneauth1/os-service-typespbr), so it remains installed. The relock keeps setuptools at ==82.0.1 with no other package version changes — only the direct-dependency marker and the meta hash differ.

The original rationale (providing pkg_resources under Python 3.12+, where setuptools is no longer pre-installed in venvs) no longer applies regardless: setuptools removed pkg_resources in v81, so the pinned 82.0.1 does not ship pkg_resources anyway.

🤖 Generated with Claude Code

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>
@berendt berendt merged commit c48c048 into main Jun 27, 2026
3 checks passed
@berendt berendt deleted the remove-setuptools-runtime-dep branch June 27, 2026 18:37
@github-project-automation github-project-automation Bot moved this from Ready to Done in Human Board Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Is setuptools really a runtime dependency?

2 participants