Skip to content

Commit 78efd30

Browse files
committed
[ty] Use 3.14 as the default version
1 parent abbbe8f commit 78efd30

File tree

7 files changed

+9
-17
lines changed

7 files changed

+9
-17
lines changed

crates/ruff_python_ast/src/python_version.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ impl PythonVersion {
6767
}
6868

6969
pub const fn latest_ty() -> Self {
70-
// Make sure to update the default value for `EnvironmentOptions::python_version` when bumping this version.
71-
Self::PY313
70+
// Make sure to update the default value for `EnvironmentOptions::python_version` when bumping this version.
71+
Self::PY314
7272
}
7373

7474
pub const fn as_tuple(self) -> (u8, u8) {

crates/ty/docs/cli.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ty/docs/configuration.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ty/src/args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub(crate) struct CheckCommand {
8585
/// and use the minimum version from the specified range
8686
/// 2. Check for an activated or configured Python environment
8787
/// and attempt to infer the Python version of that environment
88-
/// 3. Fall back to the latest stable Python version supported by ty (currently Python 3.13)
88+
/// 3. Fall back to the latest stable Python version supported by ty (see `ty check --help` output)
8989
#[arg(long, value_name = "VERSION", alias = "target-version")]
9090
pub(crate) python_version: Option<PythonVersion>,
9191

crates/ty_project/src/metadata/options.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,8 @@ pub struct EnvironmentOptions {
520520
/// to reflect the differing contents of the standard library across Python versions.
521521
#[serde(skip_serializing_if = "Option::is_none")]
522522
#[option(
523-
default = r#""3.13""#,
524-
value_type = r#""3.7" | "3.8" | "3.9" | "3.10" | "3.11" | "3.12" | "3.13" | <major>.<minor>"#,
523+
default = r#""3.14""#,
524+
value_type = r#""3.7" | "3.8" | "3.9" | "3.10" | "3.11" | "3.12" | "3.13" | "3.14" | <major>.<minor>"#,
525525
example = r#"
526526
python-version = "3.12"
527527
"#

crates/ty_python_semantic/src/types/class.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5510,14 +5510,6 @@ mod tests {
55105510
});
55115511

55125512
for class in KnownClass::iter() {
5513-
// Until the latest supported version is bumped to Python 3.14
5514-
// we need to skip template strings here.
5515-
// The assertion below should remind the developer to
5516-
// remove this exception once we _do_ bump `latest_ty`
5517-
assert_ne!(PythonVersion::latest_ty(), PythonVersion::PY314);
5518-
if matches!(class, KnownClass::Template) {
5519-
continue;
5520-
}
55215513
assert_ne!(
55225514
class.to_instance(&db),
55235515
Type::unknown(),

crates/ty_test/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub(crate) struct Environment {
6363
///
6464
/// By default, the Python version is inferred as the lower bound of the project's
6565
/// `requires-python` field from the `pyproject.toml`, if available. Otherwise, the latest
66-
/// stable version supported by ty is used, which is currently 3.13.
66+
/// stable version supported by ty is used (see `ty check --help` output).
6767
///
6868
/// ty will not infer the Python version from the Python environment at this time.
6969
pub(crate) python_version: Option<PythonVersion>,

0 commit comments

Comments
 (0)