Repository navigation
Update default and latest Python versions for 3.15 - #28792
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 98.15%. The percentage of expected errors that received a diagnostic held steady at 98.07%. The number of fully passing files held steady at 133/146. |
Memory usage reportMemory usage unchanged ✅ |
|
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| UP017 | 28 | 28 | 0 | 0 | 0 |
| I001 | 3 | 2 | 1 | 0 | 0 |
| UP041 | 2 | 2 | 0 | 0 | 0 |
| UP036 | 1 | 1 | 0 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+102 -1 violations, +0 -0 fixes in 4 projects; 55 projects unchanged)
binary-husky/gpt_academic (+2 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --no-fix --output-format concise --preview
+ shared_utils/fastapi_stream_server.py:327:32: timeout-error-alias [*] Replace aliased errors with `TimeoutError` + shared_utils/fastapi_stream_server.py:371:32: timeout-error-alias [*] Replace aliased errors with `TimeoutError`
facebookresearch/chameleon (+2 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --no-fix --output-format concise --preview
+ chameleon/viewer/backend/data_types.py:17:7: replace-str-enum Class WSMessageType inherits from both `str` and `enum.Enum` + chameleon/viewer/backend/data_types.py:28:7: replace-str-enum Class ContentType inherits from both `str` and `enum.Enum`
langchain-ai/langchain (+3 -1 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --no-fix --output-format concise --preview
+ .github/scripts/check_diff.py:16:1: unsorted-imports [*] Import block is un-sorted or un-formatted - .github/scripts/check_extras_sync.py:9:1: unsorted-imports [*] Import block is un-sorted or un-formatted + .github/scripts/check_prerelease_dependencies.py:3:1: unsorted-imports [*] Import block is un-sorted or un-formatted + .github/scripts/get_min_versions.py:6:4: outdated-version-block Version block is outdated for minimum Python version
qdrant/qdrant-client (+95 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --no-fix --output-format concise --preview
+ qdrant_client/conversions/conversion.py:198:40: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/http/models/models.py:1049:7: replace-str-enum Class FloatIndexType inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1058:7: replace-str-enum Class Fusion inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1117:7: replace-str-enum Class GeoIndexType inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:111:7: replace-str-enum Class BinaryQuantizationEncoding inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:117:7: replace-str-enum Class BinaryQuantizationQueryEncoding inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1305:7: replace-str-enum Class IdfScope inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1596:7: replace-str-enum Class IntegerIndexType inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1600:7: replace-str-enum Class IoBackend inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1650:7: replace-str-enum Class KeywordIndexType inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1654:7: replace-str-enum Class Language inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1753:7: replace-str-enum Class LowMemoryModeOneOf inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1764:7: replace-str-enum Class LowMemoryModeOneOf1 inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1775:7: replace-str-enum Class LowMemoryModeOneOf2 inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1847:7: replace-str-enum Class MaxOptimizationThreadsSetting inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1851:7: replace-str-enum Class Memory inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:185:7: replace-str-enum Class BoolIndexType inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1908:7: replace-str-enum Class Modifier inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1937:7: replace-str-enum Class MultiVectorComparator inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:1980:7: replace-str-enum Class NoStemmer inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:2133:7: replace-str-enum Class OptimizersStatusOneOf inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:2209:7: replace-str-enum Class PayloadSchemaType inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:2635:7: replace-str-enum Class ReadConsistencyType inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:2664:7: replace-str-enum Class RecommendStrategy inherits from both `str` and `enum.Enum` + qdrant_client/http/models/models.py:2744:7: replace-str-enum Class ReplicaState inherits from both `str` and `enum.Enum` ... 44 additional changes omitted for rule replace-str-enum + qdrant_client/local/datetime_utils.py:70:44: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/order_by.py:19:32: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/order_by.py:9:38: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/payload_filters.py:181:34: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:106:58: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:107:59: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:108:50: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:109:38: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:110:38: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:122:53: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:12:70: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:13:71: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:146:76: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:14:76: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:15:77: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:16:78: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:25:61: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:26:70: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:27:71: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:32:77: datetime-timezone-utc [*] Use `datetime.UTC` alias + qdrant_client/local/tests/test_datetimes.py:33:78: datetime-timezone-utc [*] Use `datetime.UTC` alias ... 49 additional changes omitted for project
Changes by rule (5 rules affected)
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| replace-str-enum | 69 | 69 | 0 | 0 | 0 |
| datetime-timezone-utc | 28 | 28 | 0 | 0 | 0 |
| unsorted-imports | 3 | 2 | 1 | 0 | 0 |
| timeout-error-alias | 2 | 2 | 0 | 0 | 0 |
| outdated-version-block | 1 | 1 | 0 | 0 | 0 |
Formatter (stable)
✅ ecosystem check detected no format changes.
Formatter (preview)
✅ ecosystem check detected no format changes.
0c9cd51 to
1347e57
Compare
Summary -- This PR updates our default Python version to 3.11, in line with 3.10 reaching [EOL] next month, and updates our latest Python version to 3.15. I followed last year's PR (#20725) to find everywhere that needed to change. Fortunately there were not as many test changes needed as last year's deferred annotation issues. I also updated the language classifier in our pyproject.toml. [EOL]: https://devguide.python.org/versions/#supported-versions Test Plan -- Existing tests with updated snapshots. Most of the updates were to snapshots for TC001, TC002, and TC003, which now default to the lazy-import fix. After updating the snapshots, I tried to make sure we still had coverage for whatever changed. That meant adding a few more mdtests for the TC rules, and one small mdtest for RUF017 to restore coverage for the `functools.reduce` fix.
1347e57 to
9f6461a
Compare
| pub const fn latest() -> Self { | ||
| Self::PY314 | ||
| Self::PY315 | ||
| } |
There was a problem hiding this comment.
Should we also bump latest_ty, given that this PR already changes ty behavior by dumping default?
There was a problem hiding this comment.
Sure, we did that separately last year, but I meant to mention it. Also, I don't think ty uses default in user-facing situations, right? The cases changed in this PR are specifically using default directly in the test:
ruff/crates/ty/tests/cli/python_environment.rs
Line 1247 in 9f6461a
and mdtests do the same, somewhat indirectly, via Option<PythonVersion>::unwrap_or_default. I think latest_ty is used as the actual default in real code:
ruff/crates/ty_site_packages/src/version.rs
Lines 81 to 88 in 9f6461a
Anyway, just a handful of snapshot changes, so it seems fine to bump it here too.
Merging this PR will improve performance by 5.76%
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Summary -- This PR updates our default Python version to 3.11, in line with 3.10 reaching [EOL] next month, and updates our latest Python version to 3.15. I followed last year's PR (#20725) to find everywhere that needed to change. Fortunately there were not as many test changes needed as last year's deferred annotation issues. I also updated the language classifier in our pyproject.toml. [EOL]: https://devguide.python.org/versions/#supported-versions Test Plan -- Existing tests with updated snapshots. Most of the updates were to snapshots for TC001, TC002, and TC003, which now default to the lazy-import fix. After updating the snapshots, I tried to make sure we still had coverage for whatever changed. That meant adding a few more mdtests for the TC rules, and one small mdtest for RUF017 to restore coverage for the `functools.reduce` fix.
Summary -- This PR updates our default Python version to 3.11, in line with 3.10 reaching [EOL] next month, and updates our latest Python version to 3.15. I followed last year's PR (#20725) to find everywhere that needed to change. Fortunately there were not as many test changes needed as last year's deferred annotation issues. I also updated the language classifier in our pyproject.toml. [EOL]: https://devguide.python.org/versions/#supported-versions Test Plan -- Existing tests with updated snapshots. Most of the updates were to snapshots for TC001, TC002, and TC003, which now default to the lazy-import fix. After updating the snapshots, I tried to make sure we still had coverage for whatever changed. That meant adding a few more mdtests for the TC rules, and one small mdtest for RUF017 to restore coverage for the `functools.reduce` fix.
Summary -- This PR updates our default Python version to 3.11, in line with 3.10 reaching [EOL] next month, and updates our latest Python version to 3.15. I followed last year's PR (#20725) to find everywhere that needed to change. Fortunately there were not as many test changes needed as last year's deferred annotation issues. I also updated the language classifier in our pyproject.toml. [EOL]: https://devguide.python.org/versions/#supported-versions Test Plan -- Existing tests with updated snapshots. Most of the updates were to snapshots for TC001, TC002, and TC003, which now default to the lazy-import fix. After updating the snapshots, I tried to make sure we still had coverage for whatever changed. That meant adding a few more mdtests for the TC rules, and one small mdtest for RUF017 to restore coverage for the `functools.reduce` fix.
Summary -- This PR updates our default Python version to 3.11, in line with 3.10 reaching [EOL] next month, and updates our latest Python version to 3.15. I followed last year's PR (#20725) to find everywhere that needed to change. Fortunately there were not as many test changes needed as last year's deferred annotation issues. I also updated the language classifier in our pyproject.toml. [EOL]: https://devguide.python.org/versions/#supported-versions Test Plan -- Existing tests with updated snapshots. Most of the updates were to snapshots for TC001, TC002, and TC003, which now default to the lazy-import fix. After updating the snapshots, I tried to make sure we still had coverage for whatever changed. That meant adding a few more mdtests for the TC rules, and one small mdtest for RUF017 to restore coverage for the `functools.reduce` fix.
Summary -- This PR updates our default Python version to 3.11, in line with 3.10 reaching [EOL] next month, and updates our latest Python version to 3.15. I followed last year's PR (#20725) to find everywhere that needed to change. Fortunately there were not as many test changes needed as last year's deferred annotation issues. I also updated the language classifier in our pyproject.toml. [EOL]: https://devguide.python.org/versions/#supported-versions Test Plan -- Existing tests with updated snapshots. Most of the updates were to snapshots for TC001, TC002, and TC003, which now default to the lazy-import fix. After updating the snapshots, I tried to make sure we still had coverage for whatever changed. That meant adding a few more mdtests for the TC rules, and one small mdtest for RUF017 to restore coverage for the `functools.reduce` fix.
Summary -- This PR updates our default Python version to 3.11, in line with 3.10 reaching [EOL] next month, and updates our latest Python version to 3.15. I followed last year's PR (#20725) to find everywhere that needed to change. Fortunately there were not as many test changes needed as last year's deferred annotation issues. I also updated the language classifier in our pyproject.toml. [EOL]: https://devguide.python.org/versions/#supported-versions Test Plan -- Existing tests with updated snapshots. Most of the updates were to snapshots for TC001, TC002, and TC003, which now default to the lazy-import fix. After updating the snapshots, I tried to make sure we still had coverage for whatever changed. That meant adding a few more mdtests for the TC rules, and one small mdtest for RUF017 to restore coverage for the `functools.reduce` fix.
Summary
This PR updates our default Python version to 3.11, in line with 3.10 reaching EOL next month, and
updates our latest Python version to 3.15. I followed last year's PR (#20725) to find everywhere
that needed to change. Fortunately there were not as many test changes needed as last year's
deferred annotation issues.
I also updated the language classifier in our pyproject.toml.
Test Plan
Existing tests with updated snapshots. Most of the updates were to snapshots for TC001, TC002, and
TC003, which now default to the lazy-import fix.
After updating the snapshots, I tried to make sure we still had coverage for whatever changed. That
meant adding a few more mdtests for the TC rules, and one small mdtest for RUF017 to restore
coverage for the
functools.reducefix.