Update default and latest Python versions for 3.14 (#20725)
Summary -- Closes #19467 and also removes the warning about using Python 3.14 without preview enabled. I also bumped `PythonVersion::default` to 3.9 because it reaches EOL this month, but we could also defer that for now if we wanted. The first three commits are related to the `latest` bump to 3.14; the fourth commit bumps the default to 3.10. Note that this PR also bumps the default Python version for ty to 3.10 because there was a test asserting that it stays in sync with `ast::PythonVersion`. Test Plan -- Existing tests I spot-checked the ecosystem report, and I believe these are all expected. Inbits doesn't specify a target Python version, so I guess we're applying the default. UP007, UP035, and UP045 all use the new default value to emit new diagnostics.
This commit is contained in:
@@ -55,9 +55,8 @@ impl PythonVersion {
|
||||
Self::PY37
|
||||
}
|
||||
|
||||
// TODO: change this to 314 when it is released
|
||||
pub const fn latest() -> Self {
|
||||
Self::PY313
|
||||
Self::PY314
|
||||
}
|
||||
|
||||
/// The latest Python version supported in preview
|
||||
@@ -94,7 +93,7 @@ impl PythonVersion {
|
||||
|
||||
impl Default for PythonVersion {
|
||||
fn default() -> Self {
|
||||
Self::PY39
|
||||
Self::PY310
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user