Skip to content

Add Python 3.14 to configuration options #17647

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

Merged
merged 4 commits into from
Apr 28, 2025
Merged

Conversation

dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Apr 26, 2025

A small PR that just updates the various settings/configurations to allow Python 3.14. (At the moment selecting that target version will have no impact compared to Python 3.13).

One question (maybe for @ntBre): should I update PythonVersion::latest to point to 3.14 as well? Or should that wait until we have full Python 3.14 support ready to go (i.e. is that used as a default anywhere?)

It would also be good for someone to verify that this won't impact red knot in an unforseen way!

@dylwil3 dylwil3 added the python314 Related to Python 3.14 label Apr 26, 2025
Copy link
Contributor

github-actions bot commented Apr 26, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@ntBre
Copy link
Contributor

ntBre commented Apr 27, 2025

I think latest is currently only used in tests. Most of the references are clearly in tests, but I'm not 100% sure about LinterSettings::for_rule and for_rules, which also call it.

Still, it might be worth holding off until 3.14 is our latest, fully-supported Python version, like you said.

#17529 is currently using it too, but I don't think that will end up being the final design. And I think it will have to wait for a minor release anyway.

@@ -34,6 +34,7 @@ pub enum PythonVersion {
Py311,
Py312,
Py313,
Py314,
Copy link
Member

Choose a reason for hiding this comment

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

It's unfortunate that adding Py314 makes it appear in the JSON schema and clap documentation without the possibility of mentioning that Py314 support is in preview.

I think we should log a warning or even abort if a user specifies 3.14 and hasn't preview enabled.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I went with a warning, feel free to bikeshed the message which is currently:

Support for Python 3.14 is under development and may be unstable. Enable preview to remove this warning.

@dylwil3 dylwil3 merged commit ae7691b into astral-sh:main Apr 28, 2025
33 checks passed
dcreager added a commit that referenced this pull request Apr 29, 2025
* main:
  [`ruff`] add fix safety section (`RUF017`) (#17480)
  Add Python 3.14 to configuration options (#17647)
  [`airflow`] Apply auto fixes to cases where the names have changed in Airflow 3 (`AIR302`) (#17553)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python314 Related to Python 3.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants