Skip to content

py(deps[dev]) Scope pillow and fastmcp to Python 3.11+ - #83

Merged
tony merged 1 commit into
mainfrom
fix/py310-lock-fork
Nov 7, 2026
Merged

tony merged 1 commit into
mainfrom
fix/py310-lock-fork

Conversation

@tony

@tony tony commented Nov 7, 2026

Copy link
Copy Markdown
Member

Summary

The Python 3.10 fork of uv.lock kept pillow 12.3.0 and dnspython 2.8.0. Their fixed releases (13.0.0 and 2.9.0) need Python 3.11, so no upgrade could clear the 42 open Dependabot alerts. Both packages only come in through the root dev group. This scopes pillow and fastmcp (which pulls dnspython) to Python 3.11+ there.

Changes

  • pyproject.toml: pillow>=13 and fastmcp>=4.0.2 get python_version >= '3.11'.
  • uv.lock: relocked with uv lock (no upgrade). One pillow (13.0.0) and one dnspython (2.9.2) remain. The 3.10 fork entries of 13 packages collapse to their 3.11+ version (aiofile, caio, cyclopts, dnspython, griffelib, httpcore2, httpx2, joserfc, pillow, platformdirs, pycparser, pydantic-settings, python-multipart, rpds-py, sse-starlette); no 3.11+ version moved.
  • tests/visual/test_visual_regression.py: pytest.importorskip("PIL").
  • docs/conftest.py: skip collecting the FastMCP demo server doctest when fastmcp is missing.
  • pyproject.toml mypy overrides: on 3.10 PIL, pydantic and mcp are absent, so the three modules that import them are checked against Any.

No CHANGES entry: dev-only, no public API, CLI, configuration or output change.

Test plan

  • Python 3.10.19 (uv sync --python 3.10 --all-packages --all-extras --group dev, UV_PYTHON=3.10): ruff check, ruff format --check, mypy, pytest: 2323 passed, 94 skipped. One process-timing test failed under load and passed on its own re-run.
  • Python 3.14.8: ruff check, mypy, pytest (2411 passed, 161 skipped), sphinx-build -W -b dirhtml docs succeeds.
  • Before the fixes, 3.10 pytest failed at collection (No module named 'PIL', then fastmcp) and mypy reported 80 errors.

Fixes #82

why: The Python 3.10 lock fork kept pillow 12.3.0 and dnspython 2.8.0,
whose fixed releases (pillow 13.0.0, dnspython 2.9.0) need Python 3.11.
`uv lock --upgrade` could not clear the 42 Dependabot alerts on them.
Both packages only enter through the root `dev` group, so no published
package is affected.

what:
- Mark `pillow>=13` and `fastmcp>=4.0.2` in the `dev` group with
  `python_version >= '3.11'`; relock. The 3.10 fork entries for pillow,
  dnspython and the other forked packages collapse to the 3.11+ version.
- Skip `tests/visual/test_visual_regression.py` when PIL is absent.
- Skip collecting the FastMCP demo server doctest when fastmcp is absent.
- Let mypy on 3.10 treat PIL, pydantic and mcp as Any in the three
  modules that import them.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.41%. Comparing base (b8fccbc) to head (86601f0).

Files with missing lines Patch % Lines
docs/conftest.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
- Coverage   93.41%   93.41%   -0.01%     
==========================================
  Files         278      279       +1     
  Lines       24125    24130       +5     
==========================================
+ Hits        22536    22540       +4     
- Misses       1589     1590       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony
tony merged commit 59614c7 into main Nov 7, 2026
46 checks passed
@tony
tony deleted the fix/py310-lock-fork branch November 7, 2026 18:28
@tony tony mentioned this pull request Nov 8, 2026
4 of 5 tasks
tony added a commit that referenced this pull request Nov 8, 2026
Python 3.10 reached end of life in October 2026. Every workspace package
now requires Python 3.11, and the 3.10 accommodations from #83 are
removed.

`pillow` and `fastmcp` lose their `python_version >= '3.11'` marker,
`tomli` is dropped, and the 3.10-only mypy overrides, `docs/conftest.py`
and the `PIL` `importorskip` guard go with them. `tomllib` is imported
directly, and `Mode` in `sphinx-vite-builder` is a `StrEnum`. The lock
collapses its 3.10 forks without moving any version in the 3.11+ fork.
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.

Python 3.10 lock fork keeps vulnerable pillow 12.3.0 and dnspython 2.8.0

2 participants