Uh oh!
There was an error while loading. Please reload this page.
fix(ci): run pytest in PR validation and fix the stale beta.responses assertion - #586
Open
rajarshidattapy wants to merge 1 commit into
Open
fix(ci): run pytest in PR validation and fix the stale beta.responses assertion#586rajarshidattapy wants to merge 1 commit into
rajarshidattapy wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Body
Fixes#585.
Problem
tests/test_responses_namespace.pyhas been failing onmainsince 2026-07-25, and nothingcaught it:
pytestis not installed byuv sync --group dev, andpr-validation.yamlrunsuv build/mypy/pyright/pylintbut never the tests. PR validation is green while thesuite is red.
Change
Dev dependencies go in
gen.yaml, not onlypyproject.toml.pyproject.tomlis listedin
.speakeasy/gen.lock, so it is generator-owned — addingpytestthere alone wouldsurvive until the next regeneration and then silently disappear.
python.additionalDependencies.devwas
{}; it now carries both packages, andpyproject.tomlhas the matching lines so thebranch works today without waiting on a regen. Pinned exactly (
==9.1.1,==1.4.0) to matchthe existing
mypy/pylint/pyrightpins.pytest-asynciois included becausepyproject.tomlalready declaresasyncio_default_fixture_loop_scope, which without the plugin emitsPytestConfigWarning: Unknown config optionon every run. That warning is now gone.The CI step is
uv run --group dev pytest tests, added after thepylintstep.The assertion was stale, not a real defect
c75a93c(2026-07-24) added the test whenbeta.pydidself.responses = Responses(...)—literally the same class, so
type(client.responses) is type(client.beta.responses)held.1477485(2026-07-25) changed it toself.responses = BetaResponses(...), a distinctgenerated class, and the identity check broke the next day.
The alias itself is healthy, so this replaces the assertion rather than the behavior. It now
checks what the test name claims: both namespaces expose
send/send_async, their publicsurfaces are equal, and the alias's docstring still says "deprecated".
That last assertion is deliberate.
deprecated-beta-responses-alias.overlay.yaml's owncomments warn that the overlay can silently match nothing after a monorepo sync and drop the
deprecation notice, and nothing was checking for it. I confirmed the check discriminates —
the GA class's docstring is
"OpenAI-compatible Responses API endpoints", with no"deprecated" in it, so a lost notice fails the test rather than passing vacuously.
Verification
Ran the full PR-validation job locally, plus the new step:
uv build— both sdist and wheeluv run --group dev mypy src— no issues in 769 source filesuv run --group dev pyright src— 0 errors, 0 warnings, 0 informationsuv run --group dev pylint src --rcfile pylintrc— 10.00/10uv run --group dev pytest tests— 4 passed, no warningsThat last command is the one that could not resolve
pytestbefore this change.