-
-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python version for CI formatting check #2681
Comments
I don't quite understand the issue here :P Are you talking about just the formatting? Or the tests themselves. The tests themselves are due to our compatibility window. The formatting check shouldn't really care about the version:
However given all that: I think bumping the version for the formatting job would be fine, even if it doesn't change anything. |
oh right, derp. Sorry for the confusion So unless the feature set of mypy/black/flake8 were to differ between installed versions (due to some new feature not getting implemented when running against an old AST, or similar), it shouldn't change anything in theory. I have a suspicion that stuff would actually behave differently in practice though, and we'd also get access to new language features in general (wrt stacktraces, speedups, etc). I think most tooling should have good 3.11 support now, but could go with 3.10 to be more conservative. This behavior seemed to be due to the python version on the CI, though I'm not 100% if it's the python version it's run on vs the runtime flag of version to check against. Lines 97 to 100 in 4816f0e
|
We probably didn't configure |
Ah, you're right - and we should definitely set that so it's easier for developers to locally typecheck their code without having to run # TODO: run mypy against several OS/version combos in CI
# https://mypy.readthedocs.io/en/latest/command_line.html#platform-configuration which suggests that somebody at some point wanted to address python versioning in CI. |
If we're not testing the version itself, it's probably better to use a newer one since then we'd get the advantages of all the recent speed improvements. |
Bumping the python version for the environment will modify Merely bumping it to 3.10 should work, or we could split the CI check in two (one on 3.8 running pip-compile, one on 3.11 doing the rest), or a more comprehensive change that also resolves dependabot breaking stuff and lets everything run on |
Good point. BTW I hate that dependabot security alerts are a thing. I'll just close them in the future as they are not worth the hassle. I think we should find a
|
For what it's worth, a friend has used https://gitlab.com/mitchhentges/pip-compile-cross-platform successfully for this exact problem. (Basically that just uses But that's not maintained much. |
We could maybe just move to poetry or hatch? And instead of having to close them, it must be possible to disable them for the repo, no? It's definitely silly when it's just about updates to the doc-requirements. |
IIRC hatch doesn't do lockfiles. Poetry does, though I've got mixed feelings about Poetry as a whole. We do have a PR open about switching to it, though. And it is possible to disable them for the repo but we'd need @njsmith to do so. I'll close them if they do show up though. |
Yeah hatch doesn't do lockfiles. There's also PDM if you don't like Poetry, I have some experience with Poetry but don't have experience with either in a big project. |
Is there any special reason we're staying on 3.8 for the CI tests? If we bumped it we would get additional typing features and not have to do
from __future__ import annotations
, and we're going to have to bump 3.8 eventually when it reaches EOL in 2024-10.Does some tooling break if we were to typecheck with 3.10 or 3.11 features or something? Is there any best-practice wrt typechecking/linting your code on oldest/newest version supported?
The text was updated successfully, but these errors were encountered: