Skip to content

Test the lowest supported httpx and pytest in CI - #255

Open
paoValle wants to merge 1 commit into
Colin-b:developfrom
paoValle:ci/lower-bounds
Open

paoValle wants to merge 1 commit into
Colin-b:developfrom
paoValle:ci/lower-bounds

Conversation

@paoValle

Copy link
Copy Markdown

The declared range is httpx==0.28.* and pytest==9.*, but the matrix only ever installs the newest of each, so the bottom of the range is never exercised. This adds a leg that installs httpx==0.28.0 and pytest==9.0.0 on Python 3.11 and runs the suite there.

It changes no dependency and closes nothing by itself: it is the measurement that a >= range (#201) needs before it can be defended, since today nobody knows whether 0.28.0 or 9.0.0 still work. When the declared ranges move, the two pins in this job move with them — if they drift outside the range, the job fails on ResolutionImpossible rather than passing quietly.

httpx 0.28.0 + pytest 9.0.0 on Python 3.11.17: 354 passed, coverage 100.00% (the configured floor).

Part of #201.

Comment thread .github/workflows/test.yml Fixed
Comment thread .github/workflows/test.yml Fixed
Comment thread .github/workflows/test.yml Fixed
The declared range is `httpx==0.28.*` and `pytest==9.*`, but the matrix only
installs the newest of each, so the bottom of the range is never exercised.
This adds one matrix entry, on Python 3.11, that pins both to the floor of the
declared range before installing: it reuses the job's steps instead of copying
them into a second job.

`httpx 0.28.0` + `pytest 9.0.0` on Python 3.11.17: 354 passed, coverage 100.00%
(the configured floor), so the leg is green on the current tree.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
28.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@paoValle

Copy link
Copy Markdown
Author

On the quality gate: the failing condition is 28.4 % Duplication on New Code, on a PR whose new code is seven lines of CI YAML — one matrix include entry and one ${{ matrix.lowest }} substitution. Two of those lines repeat structure that already exists in the file (a python-version key and a pip install line), which is 2/7 ≈ 28 % of the diff and enough to trip a ≤3 % threshold.

There is nothing to factor out here: the alternative I tried first was a separate job with its own checkout/setup-python/install/test steps, and that is the version Sonar flagged at 27.9 % because it duplicated the job. Reusing the existing job's steps is the deduplicated form, and YAML cannot share two lines without inventing anchors for a two-line saving.

So I would rather not contort the workflow to satisfy that metric. If you want the gate clean instead, the two options are to exclude .github/** from the duplication analysis for this repo, or to drop this PR — say which and I will do it.

@Colin-b

Colin-b commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Hi, can you target develop please?

@paoValle
paoValle changed the base branch from master to develop October 28, 2026 07:31
@paoValle

Copy link
Copy Markdown
Author

Retargeted to develop — the branch was already based on its head (c2187d6), so the diff is unchanged.

This branch has not been deployed

No deployments
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