Skip to content

Add initial support for Python 3.15#2466

Open
DanielNoord wants to merge 2 commits intoPyCQA:mainfrom
DanielNoord:python315
Open

Add initial support for Python 3.15#2466
DanielNoord wants to merge 2 commits intoPyCQA:mainfrom
DanielNoord:python315

Conversation

@DanielNoord
Copy link
Copy Markdown
Member

@DanielNoord DanielNoord commented Mar 7, 2026

Before we can consider #2462 we first need to support 3.15 to begin with.

This:

  • Bumps stdlibs to the latest version to get py315 support
  • Adds the 3.15 marker where needed in tox and CI files
  • Ignores tests/integration/test_hypothesmith.py on 3.15 as libcst doesn't support it (yet)
  • Unignores the django integration test
  • Adds version specifiers to some imports that do not support 3.15 yet
  • Adds the 3.15 marker to metadata
  • Ignores an issue in pygments
  • Updates the lock file

Quite a lot of changes, but all necessary to make 3.15 pass on CI in its fullest capacity.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.25%. Comparing base (a333737) to head (d3227cc).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2466   +/-   ##
=======================================
  Coverage   99.24%   99.25%           
=======================================
  Files          39       41    +2     
  Lines        3057     3080   +23     
  Branches      675      671    -4     
=======================================
+ Hits         3034     3057   +23     
  Misses         13       13           
  Partials       10       10           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DanielNoord DanielNoord marked this pull request as ready for review March 7, 2026 22:07
@DanielNoord DanielNoord requested a review from staticdev March 7, 2026 22:07
@DanielNoord
Copy link
Copy Markdown
Member Author

@staticdev Do you think you can give this as review?

@staticdev
Copy link
Copy Markdown
Collaborator

Sure @DanielNoord i am on vacation but will be back in 9 days.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@staticdev staticdev left a comment

Choose a reason for hiding this comment

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

@DanielNoord I would not rush for this one, actually I was thinking of finally remove support for Python 2 first, since 3.15 is pre-release still we don't need to merge this now, but we can keep it here.

@DanielNoord
Copy link
Copy Markdown
Member Author

@staticdev I think adding support for lazy imports might be quite a lot of work. See the linked issue, as we'll also need to coordinate a bit with ruff and others.

Merging this will at least unblock this as we'll be able to start testing and parsing the lazy imports.

I think it would be good for the community if isort supports lazy imports from day 1.

Copy link
Copy Markdown
Collaborator

@staticdev staticdev left a comment

Choose a reason for hiding this comment

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

Fine @DanielNoord, I checked the PR and I think also can be a preliminary implementation then. Since it is updating dependencies, it needs to have a new uv.lock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants