Skip to content

(test): exclude django 6.1 alphas and betas from tox#6690

Merged
ericapisani merged 1 commit into
masterfrom
ep/exclude-django-alphas-from-tox
Jun 29, 2026
Merged

(test): exclude django 6.1 alphas and betas from tox#6690
ericapisani merged 1 commit into
masterfrom
ep/exclude-django-alphas-from-tox

Conversation

@ericapisani

Copy link
Copy Markdown
Member

No description provided.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8f85ce6. Configure here.

"<3.1": ["pytest-django<4.0", "six"],
"py3.14,py3.14t": ["coverage==7.11.0"],
},
"include": "<6.1b1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Alpha releases still match include

Medium Severity

The new include value &lt;6.1b1 is meant to drop Django 6.1 alphas and betas from tox, but _prefilter_releases treats include as a PEP 440 whitelist with prereleases=True. Under that ordering, 6.1 alphas are still below 6.1b1, so they remain eligible (including as latest_prerelease) while betas are filtered out.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8f85ce6. Configure here.

"<3.1": ["pytest-django<4.0", "six"],
"py3.14,py3.14t": ["coverage==7.11.0"],
},
"include": "<6.1b1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The version specifier "<6.1b1" for Django incorrectly includes alpha releases because alpha versions are considered less than beta versions, contrary to the goal of excluding all 6.1 pre-releases.
Severity: LOW

Suggested Fix

To correctly exclude all Django 6.1 pre-releases, including both alphas and betas, change the version specifier from "<6.1b1" to "<6.1a1". This will filter out any version equal to or greater than 6.1a1.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: scripts/populate_tox/config.py#L125

Potential issue: The configuration `"include": "<6.1b1"` is intended to exclude Django
6.1 alpha and beta releases from the test matrix. However, according to PEP 440 version
ordering, alpha releases like `6.1a1` are considered less than `6.1b1`. Consequently,
the `_prefilter_releases` function will include these alpha versions, tracking them as
pre-releases to be tested. This contradicts the pull request's goal of excluding all 6.1
pre-releases, causing unintended Django alpha versions to be included in tox testing
when they become available on PyPI.

Did we get this right? 👍 / 👎 to inform future reviews.

@ericapisani ericapisani enabled auto-merge (squash) June 29, 2026 15:37
@ericapisani ericapisani merged commit b0f319f into master Jun 29, 2026
144 checks passed
@ericapisani ericapisani deleted the ep/exclude-django-alphas-from-tox branch June 29, 2026 15:41
@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

90151 passed | ⏭️ 6305 skipped | Total: 96456 | Pass Rate: 93.46% | Execution Time: 312m 17s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2398 uncovered lines.
✅ Project coverage is 89.93%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.93%    89.93%        —%
==========================================
  Files          192       192         —
  Lines        23809     23809         —
  Branches      8218      8218         —
==========================================
+ Hits         21410     21411        +1
- Misses        2399      2398        -1
- Partials      1338      1337        -1

Generated by Codecov Action

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.

2 participants