Skip to content

ci: Run linters with Python 3.8 - #161

Merged
godlygeek merged 1 commit into
bloomberg:mainfrom
godlygeek:pin_mypy_to_1.16.1
Mar 30, 2026
Merged

ci: Run linters with Python 3.8#161
godlygeek merged 1 commit into
bloomberg:mainfrom
godlygeek:pin_mypy_to_1.16.1

Conversation

@godlygeek

@godlygeek godlygeek commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

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.

@godlygeek godlygeek changed the title ci: Pin mypy to 1.16.1 ci: Pin mypy to 1.16.1 and lint with Python 3.8 Mar 30, 2026
@godlygeek
godlygeek force-pushed the pin_mypy_to_1.16.1 branch from 00b1f5d to 1c3f6f4 Compare March 30, 2026 22:41
@godlygeek
godlygeek marked this pull request as draft March 30, 2026 22:45
@godlygeek
godlygeek force-pushed the pin_mypy_to_1.16.1 branch 2 times, most recently from 144807a to d1b0a69 Compare March 30, 2026 22:47
@godlygeek godlygeek changed the title ci: Pin mypy to 1.16.1 and lint with Python 3.8 ci: Run linters with Python 3.8 Mar 30, 2026
@godlygeek
godlygeek force-pushed the pin_mypy_to_1.16.1 branch from d1b0a69 to 3a90071 Compare March 30, 2026 22:53
@godlygeek
godlygeek marked this pull request as ready for review March 30, 2026 22:53
@godlygeek godlygeek self-assigned this Mar 30, 2026
@godlygeek
godlygeek requested review from lkollar and pablogsal March 30, 2026 22:56
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
godlygeek force-pushed the pin_mypy_to_1.16.1 branch from 3a90071 to 22a6ec2 Compare March 30, 2026 22:57
@godlygeek
godlygeek merged commit 0ec32ca into bloomberg:main Mar 30, 2026
13 checks passed
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.

2 participants