Update default and latest Python versions for 3.14 by ntBre · Pull Request #20725 · astral-sh/ruff (original) (raw)

@ntBre

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.

I'm actually a bit concerned about some of the snapshot differences I saw. It looks like several rules that inspect annotations no longer work as expected, including FAST001, FAST003, A003, and PTH210. Possibly this is intentional, but it means that many, if not all, of these rules' diagnostics are eliminated. It looks like this might affect all of our TypeChecker-based rules, but I haven't looked too closely yet.

I've just pinned all of the affected tests to use 3.13 for now, but we should follow up here if we don't have time to fix the underlying issue before the release.

The test changes for 3.14 are in the second commit; reverting that seems like the best way to see all of the affected cases.

Test Plan

Existing tests