Skip to content

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Jan 2, 2026

Follow on from #9364.

tox -e mypy was still failing for me because it uses my machine's default Python version, currently 3.14.

We could pin tox to 3.10 as well for mypy, but that requires installing 3.10 locally, and we only require Sphinx for type checking doc/dater.py, and the Sphinx types don't really add much.

Copy link
Member

@radarhere radarhere left a comment

Choose a reason for hiding this comment

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

An alternative solution would be to revert #9364 and then pin Sphinx to 9.0.4 for now. However, I suspect you would, very reasonably, prefer to use the latest version of Sphinx and not be held back by type hints.

I will also note that we could bring back the Sphinx dependency when Python 3.11 becomes EOL at the end of next year.

@hugovk
Copy link
Member Author

hugovk commented Jan 2, 2026

An alternative solution would be to revert #9364 and then pin Sphinx to 9.0.4 for now. However, I suspect you would, very reasonably, prefer to use the latest version of Sphinx and not be held back by type hints.

Yeah, I think it's cleaner not to pin an old Sphinx for type hints, and use a newer version for building the docs. The hints don't really tell us much here, and doc/ isn't part of our production code.

I will also note that we could bring back the Sphinx dependency when Python 3.11 becomes EOL at the end of next year.

By then, Sphinx will likely be on 3.13+:

https://www.sphinx-doc.org/en/master/internals/release-process.html#python-version-support-policy

@hugovk hugovk merged commit 0a1d6c3 into python-pillow:main Jan 2, 2026
56 checks passed
@hugovk hugovk deleted the fix-mypy branch January 2, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants