Skip to content

ci: test on Python 3.8-3.12 - #29

Merged
martin-s-a merged 4 commits into
develfrom
ci/python-3.8-3.12
Aug 3, 2026
Merged

ci: test on Python 3.8-3.12#29
martin-s-a merged 4 commits into
develfrom
ci/python-3.8-3.12

Conversation

@martin-s-a

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a Python version matrix (3.8, 3.9, 3.10, 3.11, 3.12) to ScipionAPI backend tests, fail-fast: false so every version reports independently.
  • requirements.txt gets python_version-conditioned pins for numpy, matplotlib, scikit-image, and pydantic, mirroring the scheme scipion-pyworkflow already uses — Python 3.8 keeps its exact original pins, untouched.
  • fastapi-mail is pinned to 1.3.1 on Python >=3.11 (still on Pydantic v1, unlike 1.4+) because its aioredis dependency — pulled in only for an email-checker feature we don't use — crashes on Python 3.11+ (asyncio.TimeoutError became an alias of builtins.TimeoutError, and aioredis inherits from both).
  • Adds pip check as an explicit step before pytest, plus concurrency (cancel superseded runs) and permissions: contents: read.

Scope

3.13/3.14 are intentionally not included: scipion-pyworkflow/scipion-em pin numpy==1.26.1/matplotlib==3.8.1 with no upper Python bound, and neither has wheels past cp312. Extending to 3.13/3.14 needs its own branch in those repos (and likely numpy 2.x, which has real breaking API changes) — separate follow-up.

Test plan

  • Local: 1218 tests pass on Python 3.8 (baseline, unchanged)
  • Local: 1218 tests pass on Python 3.9
  • Local: 1218 tests pass on Python 3.10
  • CI: confirm 3.11 and 3.12 (not run locally, left for the GH Actions matrix)

Adds a Python version matrix (3.8-3.12) to the backend test workflow,
plus concurrency/permissions hygiene. requirements.txt gains
python_version-conditioned pins (mirroring scipion-pyworkflow's own
scheme) so 3.8 behavior is untouched while numpy, matplotlib,
scikit-image, and pydantic get versions that actually ship wheels for
3.9-3.12. fastapi-mail is pinned to 1.3.1 on Python >=3.11 since its
aioredis dependency (used only by an unused email-checker feature)
crashes on 3.11+ once asyncio.TimeoutError became an alias of
builtins.TimeoutError; 1.3.1 is the last release still on Pydantic v1.

Verified locally: 1218 tests pass on 3.8, 3.9, and 3.10. 3.11/3.12 are
left for the GH Actions matrix to confirm.

3.13/3.14 are out of scope here: scipion-pyworkflow/scipion-em pin
numpy==1.26.1/matplotlib==3.8.1 with no upper Python bound, and those
have no wheels past cp312 - that needs its own branch in those repos.
…decision

The confirmation email was never actually wired up end to end (the signup
call site was already commented out), and the team has decided not to
pursue it for now. This also removes app/backend/utils/email.py, which
had real SMTP credentials committed in plaintext — please rotate that
password regardless of this change.

Dropping fastapi-mail entirely also removes it as a source of aioredis
(unmaintained, crashes on Python >=3.11), simplifying the Python version
matrix work without needing the fastapi-mail 1.3.1 pin/API-rename dance.

/auth/resend-code still rotates the verification code (kept for API
compatibility) but no longer tries to email it.
@martin-s-a martin-s-a self-assigned this Aug 3, 2026
@martin-s-a
martin-s-a merged commit f34cee8 into devel Aug 3, 2026
5 checks passed
@martin-s-a
martin-s-a deleted the ci/python-3.8-3.12 branch August 3, 2026 15:43
martin-s-a added a commit that referenced this pull request Aug 3, 2026
* ci: test on Python 3.8-3.12, add conditional deps for newer versions

Adds a Python version matrix (3.8-3.12) to the backend test workflow,
plus concurrency/permissions hygiene. requirements.txt gains
python_version-conditioned pins (mirroring scipion-pyworkflow's own
scheme) so 3.8 behavior is untouched while numpy, matplotlib,
scikit-image, and pydantic get versions that actually ship wheels for
3.9-3.12. fastapi-mail is pinned to 1.3.1 on Python >=3.11 since its
aioredis dependency (used only by an unused email-checker feature)
crashes on 3.11+ once asyncio.TimeoutError became an alias of
builtins.TimeoutError; 1.3.1 is the last release still on Pydantic v1.

Verified locally: 1218 tests pass on 3.8, 3.9, and 3.10. 3.11/3.12 are
left for the GH Actions matrix to confirm.

3.13/3.14 are out of scope here: scipion-pyworkflow/scipion-em pin
numpy==1.26.1/matplotlib==3.8.1 with no upper Python bound, and those
have no wheels past cp312 - that needs its own branch in those repos.

* ci: declare httpx explicitly, was only transitive via fastapi-mail<1.2

* remove verification-email sending: never worked, dropped per product decision

The confirmation email was never actually wired up end to end (the signup
call site was already commented out), and the team has decided not to
pursue it for now. This also removes app/backend/utils/email.py, which
had real SMTP credentials committed in plaintext — please rotate that
password regardless of this change.

Dropping fastapi-mail entirely also removes it as a source of aioredis
(unmaintained, crashes on Python >=3.11), simplifying the Python version
matrix work without needing the fastapi-mail 1.3.1 pin/API-rename dance.

/auth/resend-code still rotates the verification code (kept for API
compatibility) but no longer tries to email it.
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