ci: Run linters with Python 3.8 - #161
Merged
Merged
Conversation
godlygeek
force-pushed
the
pin_mypy_to_1.16.1
branch
from
March 30, 2026 22:41
00b1f5d to
1c3f6f4
Compare
godlygeek
marked this pull request as draft
March 30, 2026 22:45
godlygeek
force-pushed
the
pin_mypy_to_1.16.1
branch
2 times, most recently
from
March 30, 2026 22:47
144807a to
d1b0a69
Compare
godlygeek
force-pushed
the
pin_mypy_to_1.16.1
branch
from
March 30, 2026 22:53
d1b0a69 to
3a90071
Compare
godlygeek
marked this pull request as ready for review
March 30, 2026 22:53
We've been trying to create a Python 3.10 environment, and then run mypy in that environment and tell it to make sure that all of the code is correctly typed Python 3.8 code (the minimum version we support). This doesn't work: when we install pytest-memray's dependencies in that Python 3.10 environment, we might install versions of those dependencies that require Python 3.10 and so use Python 3.10 syntax, and if so mypy will fail to parse those files as Python 3.8 code. So, until we drop support for Python 3.8, our linting run needs to install our dependencies in a Python 3.8 environment rather than 3.10, and we need to pin to versions of our linters that are compatible with Python 3.8. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
godlygeek
force-pushed
the
pin_mypy_to_1.16.1
branch
from
March 30, 2026 22:57
3a90071 to
22a6ec2
Compare
pablogsal
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We've been trying to create a Python 3.10 environment, and then run mypy
in that environment and tell it to make sure that all of the code is
correctly typed Python 3.8 code (the minimum version we support).
This doesn't work: when we install pytest-memray's dependencies in that
Python 3.10 environment, we might install versions of those dependencies
that require Python 3.10 and so use Python 3.10 syntax, and if so mypy
will fail to parse those files as Python 3.8 code.
So, until we drop support for Python 3.8, our linting run needs to
install our dependencies in a Python 3.8 environment rather than 3.10,
and we need to pin to versions of our linters that are compatible with
Python 3.8.