Skip to content

Keep pytest compatible with the pinned mypy version - #222

Merged
altendky merged 1 commit into
masterfrom
constrain-pytest-for-mypy
Oct 23, 2026
Merged

altendky merged 1 commit into
masterfrom
constrain-pytest-for-mypy

Conversation

@altendky

@altendky altendky commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Python 3.10 CI resolves pytest 9.1.1, whose logging module uses match statements that the pinned mypy 0.930 cannot parse. The QFlags typing test imports pytest and fails on that syntax, leaving 403 tests passing and one failing on each OS.

Constrain the development extra's pytest dependency below major version 9. This keeps pytest compatible with the existing mypy pin and applies to tox's test environments through the development extra. Record the compatibility bound in the changelog.

Observed failure: https://github.com/python-qt-tools/PyQt5-stubs/actions/runs/40006937968/job/120597131802

Validation: All nine Python 3.8–3.10 / Linux, macOS, and Windows matrix jobs pass, along with the aggregate check. Confirmed Python 3.10 resolves pytest 8.4.2 while retaining mypy 0.930; its full suite passes all 404 tests. Whitespace checks pass.

This is independent of the optional compatibility extra in #217.

@altendky
altendky merged commit fd00a23 into master Oct 23, 2026
10 checks passed
@altendky
altendky deleted the constrain-pytest-for-mypy branch October 23, 2026 19:35
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.

1 participant