Skip to content

chore(api): Remove uv override-dependencies block#7756

Draft
matthewelwell wants to merge 4 commits into
mainfrom
chore/remove-uv-override-dependencies
Draft

chore(api): Remove uv override-dependencies block#7756
matthewelwell wants to merge 4 commits into
mainfrom
chore/remove-uv-override-dependencies

Conversation

@matthewelwell

@matthewelwell matthewelwell commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Opening as a draft to start a discussion.

The [tool.uv].override-dependencies block in api/pyproject.toml was added during the Poetry to uv migration to keep the resolved versions identical to the prior poetry.lock. The comment above it states:

Pin every resolved package to the exact version that api/poetry.lock used on main before this migration, so the poetry -> uv switch is dependency-neutral. Keep this list in sync with poetry.lock until the lockfile churn settles.

This PR removes the whole block to see what the natural uv resolution looks like today. The lockfile diff is smaller than I expected:

Package From To Note
cryptography 46.0.7 43.0.3 downgrade
pyopenssl 26.0.0 25.1.0 downgrade
pytest 7.2.2 7.4.4 capped at <8, see below
deprecation 2.0.7 2.1.0 minor
pluggy 1.2.0 1.6.0 minor
tomli 2.4.1 added (transitive)

Findings so far (things the override block was silently load-bearing for):

  1. pytest initially floated to 9.0.3, which broke the entire test suite at collection: pytest-lazy-fixture 0.6.3 (unmaintained since 2020) relies on CallSpec2.funcargs, removed in pytest 9. pytest is now capped at >=7.2.2,<8 with TODO markers pointing at tests: Migrate from unmaintained pytest-lazy-fixture to pytest-lazy-fixtures #7759; the migration to the maintained pytest-lazy-fixtures fork is in test: Migrate to pytest-lazy-fixtures #7761, after which the cap can be lifted here.
  2. pluggy 1.6 ships proper typing for @pytest.hookimpl, which turned a previously-required # type: ignore[misc] in tests/conftest.py into a mypy unused-ignore error — removed in this PR.

Things still worth discussing:

  1. The cryptography and pyopenssl downgrades suggest something in the dependency graph caps them. We should figure out what and decide whether to bump that dependency or keep a targeted override.
  2. Is there anything else the override block was load-bearing for that I'm missing? The dev extras still contain this comment for email-validator/pyjwt referring to a pydantic override, which would no longer apply after this PR.
  3. If we agree we want to drop the block, the dev-deps email-validator/pyjwt workaround comment should be updated or removed in the same PR.

How did you test this code?

  • Ran uv lock locally — resolution completes successfully with the changes above.
  • make typecheck passes locally (Success: no issues found in 1697 source files).
  • API unit tests run in CI on this PR; test collection is fixed by the pytest <8 cap.
  • This PR should not be merged without reviewing the cryptography/pyopenssl downgrades.

The `[tool.uv].override-dependencies` block was added during the Poetry to
uv migration to keep the lockfile dependency-neutral with the prior
`poetry.lock`. With several months of normal upgrades since, the block is
now silently capping security updates (most recently Django 5.2.15, which
Renovate could not produce a PR for until the Django pin was removed in
#7755).

Removing the whole block lets uv perform a natural resolution. The
resulting `uv.lock` changes are minimal but mixed:

- cryptography 46.0.7 -> 43.0.3 (downgrade)
- pyopenssl 26.0.0 -> 25.1.0 (downgrade)
- pytest 7.2.2 -> 9.0.3 (major bump)
- deprecation 2.0.7 -> 2.1.0
- pluggy 1.2.0 -> 1.6.0
- tomli added

Opening for discussion before merging — the downgrades suggest something
in the dependency graph is capping these packages, which is worth
understanding before we remove the override scaffolding.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jun 11, 2026 12:57pm
flagsmith-frontend-preview Ignored Ignored Preview Jun 11, 2026 12:57pm
flagsmith-frontend-staging Ignored Ignored Preview Jun 11, 2026 12:57pm

Request Review

@github-actions github-actions Bot added api Issue related to the REST API chore labels Jun 11, 2026
pluggy 1.6 ships proper typing for `@pytest.hookimpl`, so the
`# type: ignore[misc]` previously needed under pluggy 1.2 is now flagged
as unused-ignore by mypy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
matthewelwell and others added 2 commits June 11, 2026 13:52
pytest-lazy-fixture 0.6.3 (unmaintained since 2020) uses
`CallSpec2.funcargs` which pytest 9 removed, so every test that imports
it errors at collection with `AttributeError: 'CallSpec2' object has no
attribute 'funcargs'`. Cap pytest at <8 until the migration to the
maintained `pytest-lazy-fixtures` fork is done in #7759.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
#	api/pyproject.toml
#	api/uv.lock
@github-actions github-actions Bot added chore and removed chore labels Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.55%. Comparing base (8a6c26b) to head (359278f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7756   +/-   ##
=======================================
  Coverage   98.55%   98.55%           
=======================================
  Files        1454     1454           
  Lines       56000    56000           
=======================================
  Hits        55193    55193           
  Misses        807      807           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

api Issue related to the REST API chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant