Run Lint against multiple Python versions#9414
Run Lint against multiple Python versions#9414radarhere wants to merge 3 commits intopython-pillow:mainfrom
Conversation
7f8eaf8 to
dfd39a1
Compare
|
Do we really need to run mypy on every version? Should we run on the oldest supported, or latest? Is there authoritative guidance on best practices here? If we do decide to type check on multiple versions, let's move mypy to its own job (can name it like And can we continue to use a new Python interpreter but call mypy with https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-python-version |
Sure, done.
python/mypy#12286 is an issue requesting the ability to check multiple versions at once. From the fact that it is still open, you might infer that this isn't an official priority. @jorenham did you have any thoughts? |
In the projects I maintain I run all supported typecheckers against the full range of supported Python versions. The main reason is to ensure that all |
While exploring #9410, the user found that our type hints are not being adequately checked across different Python versions - jorenham#1 (comment)
This PR stops specifying the mypy Python version in pyproject.toml, so that it defaults to the current version being run, and adds a matrix to our Lint job to check multiple versions.
Python >= 3.12 required some changes in Buffer handling - https://github.com/python-pillow/Pillow/actions/runs/21516054322/job/61994586341