Skip to content

fix(python): bump pytest to ^9.0.3 in generated SDK pyproject.toml#15072

Open
fern-support wants to merge 1 commit intomainfrom
devin/1776282079-fix-generated-pytest-version
Open

fix(python): bump pytest to ^9.0.3 in generated SDK pyproject.toml#15072
fern-support wants to merge 1 commit intomainfrom
devin/1776282079-fix-generated-pytest-version

Conversation

@fern-support
Copy link
Copy Markdown
Collaborator

Description

Refs customer report that fernapi/fern-python-sdk 5.3.14 did not actually bump pytest in generated SDKs.

The 5.3.14 release (changelog) only bumped pytest in the generator's own generators/python/pyproject.toml (internal dev dependencies). It did not update the codegen template at generators/python/src/fern_python/codegen/pyproject_toml.py, so generated SDKs continued to get pytest = "^8.2.0".

This PR fixes that by updating the generated pytest version from ^8.2.0 to ^9.0.3 for projects targeting Python >= 3.9. The Python < 3.9 fallback (^7.4.0 / pytest-asyncio ^0.23.5) is unchanged.

Changes Made

  • Updated pyproject_toml.py: pytest_version from "^8.2.0""^9.0.3" for the min_minor >= 9 branch
  • Updated inline comment to reflect pytest >= 9.0 requirement
  • Added unreleased changelog entry
  • Regenerated all seed test fixtures (mechanical pyproject.toml + poetry.lock updates)

Testing

  • Ran seed test --generator python-sdk --fixture exhaustive --skip-scripts — all 28/28 test cases passed
  • Verified 3 fixtures with Python < 3.9 targets correctly remain on pytest = "^7.4.0"
  • Pre-commit hooks pass

⚠️ Reviewer Checklist

  • Python version gating: The conditional uses min_minor >= 9 (Python 3.9+), but pytest 9.0.3 itself declares python-versions = ">=3.10" in its metadata. Confirm this is acceptable — Poetry will resolve correctly for Python 3.10+, and Python 3.9 users installing dev deps may get a lower pytest version from the ^9.0.3 constraint solver. Since the default minimum Python version is ^3.10 since generator v5.0.0, this likely doesn't matter in practice.
  • Seed output completeness: Only the exhaustive fixture was explicitly run (which regenerated all fixtures). Confirm CI seed checks pass for the full matrix.

Link to Devin session: https://app.devin.ai/sessions/c194f7c7b4cf415a8f34a6e508975da6
Requested by: @fern-support

Co-Authored-By: will.kendall@buildwithfern.com <wpk235@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@github-actions
Copy link
Copy Markdown
Contributor

SDK Generation Benchmark Results

Comparing PR branch against latest nightly baseline on main (2026-04-15T04:55:58Z).

Full benchmark table (click to expand)
Generator Spec main (generator) main (E2E) PR (generator) Delta
python-sdk square 111s 146s 115s +4s (+3.6%)

main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via fern generate). main (E2E): full customer-observable time including build/test scripts (nightly baseline, informational). Delta is computed against generator-only baseline.
⚠️ = generation exited with a non-zero exit code (timing may not reflect a successful run).
Baseline from nightly runs on main (latest: 2026-04-15T04:55:58Z). Trigger benchmark-baseline to refresh.
Last updated: 2026-04-15 20:05 UTC

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant