Skip to content

Pin transitive dependencies to avoid dependabot uv.lock-only PRs - #312

Merged
ekzhu merged 2 commits into
masterfrom
claude/pin-dependencies-cJ4tf
Apr 14, 2026
Merged

Pin transitive dependencies to avoid dependabot uv.lock-only PRs#312
ekzhu merged 2 commits into
masterfrom
claude/pin-dependencies-cJ4tf

Conversation

@ekzhu

@ekzhu ekzhu commented Apr 14, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

  • Explicitly pin transitive dependencies of matplotlib and pytest in pyproject.toml to prevent dependabot from creating uv.lock-only PRs
  • Added pillow>=12.2.0 (for Python 3.10+) and fonttools>=4.60.2 to benchmark dependencies
  • Added pygments>=2.20.0 to test dependencies

These transitive dependencies are now explicitly listed to ensure they are tracked in version control and prevent unnecessary dependabot PRs that only update the lockfile.

Checklist

  • Are unit tests passing?
  • Documentation added/updated for all public APIs?
  • Is this a breaking change? If yes, add "[BREAKING]" to the PR title.

https://claude.ai/code/session_016PmmThgtWzGhjy1aQZa9kC

claude added 2 commits April 14, 2026 04:52
These are transitive deps of matplotlib (benchmark group) and pytest
(test group). Pinning them directly avoids repeated dependabot
uv.lock-only PRs and lets us own the version bumps explicitly.

- pillow==12.2.0 (Python >= 3.10 only; 12.x dropped 3.9 support, so
  Python 3.9 continues to resolve pillow 11.3.0 via matplotlib)
- fonttools==4.60.2
- pygments==2.20.0

https://claude.ai/code/session_016PmmThgtWzGhjy1aQZa9kC
Relaxes the pins added in the previous commit to minimum-version
constraints so the resolver can still pick newer versions without
requiring a pyproject.toml edit.

https://claude.ai/code/session_016PmmThgtWzGhjy1aQZa9kC
@ekzhu
ekzhu merged commit 785c4b3 into master Apr 14, 2026
19 checks passed
@ekzhu
ekzhu deleted the claude/pin-dependencies-cJ4tf branch April 14, 2026 05:06

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates several dependencies and adds explicit pins for transitive dependencies in pyproject.toml to manage dependency updates. My review identified a version mismatch for datasketch in uv.lock that lacks a corresponding update in pyproject.toml. Additionally, I recommend removing the explicit pins for transitive dependencies like pillow, fonttools, and pygments, as this practice over-constrains the environment and is better handled through Dependabot configuration.

Comment thread uv.lock
[[package]]
name = "datasketch"
version = "1.8.0"
version = "1.9.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The datasketch version was bumped to 1.9.0 in the lockfile, but no corresponding change appears in pyproject.toml. This inconsistency should be resolved by either updating the version in pyproject.toml or reverting the change in uv.lock.

version = "1.8.0"

Comment thread pyproject.toml
Comment on lines +41 to +43
# Transitive deps of matplotlib listed to avoid dependabot uv.lock-only PRs.
"pillow>=12.2.0; python_version >= '3.10'",
"fonttools>=4.60.2",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Pinning transitive dependencies like pillow and fonttools to manage Dependabot noise is discouraged for libraries. This practice over-constrains the environment for downstream users and adds maintenance overhead, as these versions must be manually kept in sync with the requirements of the actual parent dependency (matplotlib). Consider using Dependabot's grouped-updates or ignore rules in .github/dependabot.yml instead.

Comment thread pyproject.toml
Comment on lines +58 to +59
# Transitive dep of pytest listed to avoid dependabot uv.lock-only PRs.
"pygments>=2.20.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Explicitly listing pygments here as a workaround for Dependabot noise is an anti-pattern for libraries. It is better to manage this via Dependabot configuration to avoid unnecessary constraints on the test environment and potential conflicts with other packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants