Skip to content

Update default and latest Python versions for 3.15 - #28792

Merged
ntBre merged 2 commits into
brent/0.17.0from
brent/3.15-default
Sep 24, 2026
Merged

ntBre merged 2 commits into
brent/0.17.0from
brent/3.15-default

Conversation

@ntBre

@ntBre ntBre commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

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.reduce fix.

@ntBre ntBre added breaking Backwards-incompatible changes python315 Related to Python 3.15 labels Sep 22, 2026
@ntBre ntBre added this to the v0.17 milestone Sep 22, 2026
@astral-sh-bot

astral-sh-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The 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.

@astral-sh-bot

astral-sh-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot

astral-sh-bot Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Flaky changes detected. This PR summary excludes flaky changes; see the HTML report for details.

Full report with detailed diff (timing results)

@ntBre ntBre mentioned this pull request Sep 22, 2026
2 tasks done
@astral-sh-bot

astral-sh-bot Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+33 -1 violations, +0 -0 fixes in 3 projects; 56 projects unchanged)

binary-husky/gpt_academic (+2 -0 violations, +0 -0 fixes)

+ shared_utils/fastapi_stream_server.py:327:32: UP041 [*] Replace aliased errors with `TimeoutError`
+ shared_utils/fastapi_stream_server.py:371:32: UP041 [*] Replace aliased errors with `TimeoutError`

langchain-ai/langchain (+3 -1 violations, +0 -0 fixes)

+ .github/scripts/check_diff.py:16:1: I001 [*] Import block is un-sorted or un-formatted
- .github/scripts/check_extras_sync.py:9:1: I001 [*] Import block is un-sorted or un-formatted
+ .github/scripts/check_prerelease_dependencies.py:3:1: I001 [*] Import block is un-sorted or un-formatted
+ .github/scripts/get_min_versions.py:6:4: UP036 Version block is outdated for minimum Python version

qdrant/qdrant-client (+28 -0 violations, +0 -0 fixes)

+ qdrant_client/conversions/conversion.py:198:40: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/datetime_utils.py:70:44: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/order_by.py:19:32: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/order_by.py:9:38: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/payload_filters.py:181:34: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:106:58: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:107:59: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:108:50: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:109:38: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:110:38: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:122:53: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:12:70: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:13:71: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:146:76: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:14:76: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:15:77: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:16:78: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:25:61: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:26:70: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:27:71: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:32:77: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:33:78: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:51:67: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:54:71: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:55:71: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:56:74: UP017 [*] Use `datetime.UTC` alias
+ qdrant_client/local/tests/test_datetimes.py:69:58: UP017 [*] Use `datetime.UTC` alias
+ tests/conversions/test_validate_conversions.py:262:46: UP017 [*] Use `datetime.UTC` alias

Changes by rule (4 rules affected)

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.

@ntBre
ntBre force-pushed the brent/3.15-default branch from 0c9cd51 to 1347e57 Compare September 22, 2026 20:24
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.
@ntBre
ntBre force-pushed the brent/3.15-default branch from 1347e57 to 9f6461a Compare September 22, 2026 20:57
@ntBre ntBre mentioned this pull request Sep 22, 2026
27 of 32 tasks
@ntBre
ntBre marked this pull request as ready for review September 22, 2026 21:33
@ntBre
ntBre requested review from a team and MichaReiser as code owners September 22, 2026 21:33
Comment on lines 63 to 65
pub const fn latest() -> Self {
Self::PY314
Self::PY315
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we also bump latest_ty, given that this PR already changes ty behavior by dumping default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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:

PythonVersion::default()

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:

impl Default for PythonVersionWithSource {
fn default() -> Self {
Self {
version: PythonVersion::latest_ty(),
source: PythonVersionSource::Default,
}
}
}

Anyway, just a handful of snapshot changes, so it seems fine to bump it here too.

@ntBre
ntBre requested review from a team as code owners September 23, 2026 18:28
@codspeed

codspeed Bot commented Sep 23, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 5.76%

⚡ 1 improved benchmark
✅ 210 untouched benchmarks
⏩ 2 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Simulation linter/default-rules[large/dataset.py] 20.3 ms 19.2 ms +5.76%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing brent/3.15-default (607d39a) with brent/0.17.0 (3bac628)2

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on brent/0.17.0 (3b4d7fc) during the generation of this report, so b09692b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@ntBre
ntBre merged commit cb5e6bd into brent/0.17.0 Sep 24, 2026
90 checks passed
@ntBre
ntBre deleted the brent/3.15-default branch September 24, 2026 20:27
ntBre added a commit that referenced this pull request Sep 25, 2026
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.
ntBre added a commit that referenced this pull request Sep 25, 2026
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.
ntBre added a commit that referenced this pull request Oct 1, 2026
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.
ntBre added a commit that referenced this pull request Oct 1, 2026
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.
ntBre added a commit that referenced this pull request Oct 9, 2026
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.
ntBre added a commit that referenced this pull request Oct 9, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Backwards-incompatible changes python315 Related to Python 3.15

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants