Skip to content

SK-2872: Clean up and upgrade SDK production dependencies#266

Merged
saileshwar-skyflow merged 8 commits into
release/26.6.0from
saileshwar/SK-2872-dependencies-upgrade
Jun 12, 2026
Merged

SK-2872: Clean up and upgrade SDK production dependencies#266
saileshwar-skyflow merged 8 commits into
release/26.6.0from
saileshwar/SK-2872-dependencies-upgrade

Conversation

@saileshwar-skyflow

@saileshwar-skyflow saileshwar-skyflow commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Why

  • Unused deps shipped to consumers: 4 packages in install_requires were never imported in skyflow/ source — every pip install skyflow was pulling them in unnecessarily
  • Unpinned deps: cryptography, httpx, coverage, codespell, ruff had no version constraints, meaning any version including breaking or vulnerable ones could silently install
  • Consumer conflicts: requests ~= 2.32.3 used compatible-release operator which locks to 2.32.x — same pattern that caused dependency conflicts for existing customers. Loosened to floor-only >= 2.28.0

Goal

  • pip install skyflow resolves with a clean minimal set of runtime deps that don't conflict with consumers' existing environments
  • All deps have explicit minimum floors so no silent version drift
  • requirements.txt mirrors setup.py install_requires exactly

Changes

Removed from install_requires (4 deps)

Package Reason
python_dateutil Not imported anywhere in skyflow/
setuptools Build tool only; used in setup.py itself, not at runtime
urllib3 Not directly imported; pulled in transitively by requests
DateTime Zope legacy package, not imported anywhere in skyflow/

Updated constraints

Package Old New Reason
pydantic >= 2 >= 2.0.0 Fern generator minimum is >= 1.9.2 but floor set to >= 2.0.0 — SDK uses pydantic v2 API throughout, v1.x would cause import errors
pydantic-core (transitive) >= 2.18.2 Fern generator minimum; transitive via pydantic, pinned explicitly for clarity
typing-extensions >= 4.7.1 >= 4.0.0 Fern generator minimum
httpx (unpinned) >= 0.21.2 Fern generator minimum
PyJWT >= 2.12, < 3 >= 2.12, < 3 CVE-2026-32597 floor — intentional, kept
requests ~= 2.32.3 >= 2.28.0 Floor-only; removes minor-version lock that caused consumer conflicts
cryptography (unpinned) >= 44.0.2 Security baseline pin
python-dotenv >= 1.0, < 2 >= 1.1.0, < 2 Bumped floor to current stable

Dev extras updated

Package Old New
codespell (unpinned) >= 2.4.1
ruff (unpinned) >= 0.9.0
pre-commit not listed >= 4.3.0

Testing

  • Full local test suite: 615 passed, 0 failed
  • All constraints use >= (floor-only) as required for a published SDK — consumers can resolve alongside their own dependency graphs without conflicts

saileshwar-skyflow and others added 3 commits June 10, 2026 14:42
- Remove 5 unused/misclassified deps: python_dateutil, setuptools,
  urllib3, DateTime, coverage
- Fix broken PyJWT constraint (>=2.12 never existed; downgrade to >=2.8)
- Pin previously unpinned deps: cryptography >=44.0.2, httpx >=0.28.1
- Bump minimums to current stable: pydantic >=2.13.4,
  typing-extensions >=4.13.2, requests ~=2.32.4, python-dotenv >=1.1.0,<2
- Pin dev deps: codespell >=2.4.1, ruff >=0.9.0
- Fix main.yml: add secrets: inherit so VALID_SKYFLOW_CREDS_TEST
  is available when shared-tests.yml runs on post-merge pushes
- Mirror all install_requires changes in requirements.txt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
coverage was correctly removed from setup.py install_requires (not a
production dep) but also incorrectly removed from requirements.txt.
CI runs 'python -m coverage run' so it must be present as a dev/CI dep.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
~= with a patch version locks to the 2.32.x minor series, which would
conflict for consumers already on requests 2.33+. Using >= keeps the
security floor without blocking future minor releases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@saileshwar-skyflow saileshwar-skyflow changed the title SK-2872: Clean up and pin SDK production dependencies SK-2872: Clean up and upgrade SDK production dependencies Jun 10, 2026
saileshwar-skyflow and others added 5 commits June 11, 2026 13:48
- ci-scripts/check_dep_age.py: checks requirements.txt and setup.py against PyPI release dates; blocks deps newer than 14 days
- ci-scripts/audit_deps.py: compares dep floor versions against PyPI latest; outputs markdown report for GitHub Issue
- .github/workflows/dep-audit.yml: monthly cron on 1st of each month, opens a GitHub Issue listing outdated deps
- .github/workflows/shared-tests.yml: added 14-day stability check on every PR and push to main
- .pre-commit-config.yaml: local git hook on requirements.txt or setup.py changes
- setup.py: pre-commit bumped to >= 4.6.0 in dev extras
- requirements.txt: synced PyJWT floor to >= 2.12 matching setup.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pre-commit >= 4.6.0 requires Python >= 3.10; CI runs on 3.9.
4.3.0 is the highest version that supports Python 3.9.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…LR2004

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use minimum versions the SDK actually needs rather than current latest,
so existing consumer environments on older stable versions are not
forced to upgrade. pydantic floor set to 2.0.0 (v2 API required).
Remove 14-day freeze tooling from PR (kept locally for separate PR).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@saileshwar-skyflow saileshwar-skyflow changed the base branch from main to release/26.6.0 June 11, 2026 09:08
@saketh-skyflow saketh-skyflow self-assigned this Jun 12, 2026
@saketh-skyflow

Copy link
Copy Markdown
Collaborator

LGTM

@saileshwar-skyflow saileshwar-skyflow merged commit b51d539 into release/26.6.0 Jun 12, 2026
8 checks passed
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.

3 participants