Skip to content

Comments

Updates for code base targeting Python 3.9#293

Merged
abravalheri merged 7 commits intomainfrom
update-py39
Feb 4, 2026
Merged

Updates for code base targeting Python 3.9#293
abravalheri merged 7 commits intomainfrom
update-py39

Conversation

@abravalheri
Copy link
Owner

@abravalheri abravalheri commented Feb 3, 2026

Includes automatic updates from Ruff

@abravalheri abravalheri marked this pull request as ready for review February 3, 2026 16:48
Comment on lines 74 to 75
- "3.x" # newest Python that is stable
- "3.14"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unrelated, these are the same until October. Might make more sense to just leave one of them, or use an intermediate value + 3.x.

Copy link
Owner Author

@abravalheri abravalheri Feb 4, 2026

Choose a reason for hiding this comment

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

Thanks @henryiii for the review, I will modify that.

Copy link
Collaborator

@henryiii henryiii left a comment

Choose a reason for hiding this comment

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

Don't know why the CI (Cirrus, I think) is stuck in queue.


[testenv:typecheck]
base_python = 3.8
base_python = 3.9
Copy link
Owner Author

Choose a reason for hiding this comment

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

Hi @henryiii, I have a question:

I noticed that you introduced this field in #229.

Is this necessary given that tool.mypy.version is set on pyproject.toml?

(The reason why I am asking is because I noticed it may prevent to run tox -e typecheck on development machines that don't have 3.9 installed).

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's to keep the pip install installing libraries that still support this Python. It's more important if you keep support for EoL Pythons, or use scientific libraries that follow SPEC 0. This also happens with typeshed at some point after EoL.

If it works, feel free to remove, we can always re-add if it's a problem. I think we are closer to EoL now so it might be fine.

Copy link
Owner Author

@abravalheri abravalheri Feb 4, 2026

Choose a reason for hiding this comment

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

I see that makes sense and makes things more reliable...

Would we retain some of these gains if we replace base_python with setting PIP_PYTHON_VERSION=3.9 as environment variable inside tox.ini?

(I understand that this may not be fully reliable because some packages may be available for 3.9 but not work on 3.13 for example)

Copy link
Owner Author

Choose a reason for hiding this comment

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

I see, apparently we cannot:

ERROR: Can not use any platform or abi specific options unless installing via '--target' or using '--dry-run'

So let's leave it like this for now.

Thanks @henryiii

@abravalheri abravalheri merged commit 285e4f1 into main Feb 4, 2026
36 checks passed
@abravalheri abravalheri deleted the update-py39 branch February 4, 2026 17:05
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