Skip to content

Add support for Python 3.15 - #1090

Merged
Kludex merged 2 commits into
pydantic:mainfrom
hugovk:add-3.15
Jul 28, 2026
Merged

Add support for Python 3.15#1090
Kludex merged 2 commits into
pydantic:mainfrom
hugovk:add-3.15

Conversation

@hugovk

@hugovk hugovk commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Add support for Python 3.15: test on CI, update lock file to include 3.15 wheels for dependencies, add Trove classifier.

The Python 3.15 beta is out. 🚀

The 3.15 release manager (👋 hi, that's me!) said:

We strongly encourage maintainers of third-party Python projects to test with 3.15 during the beta phase and report issues found to the Python bug tracker as soon as possible. While the release is planned to be feature-complete entering the beta phase, it is possible that features may be modified or, in rare cases, removed up until the start of the release candidate phase (2026-08-04). Our goal is to have no ABI changes after beta 4 and as few code changes as possible after the first release candidate. To achieve that, it will be extremely important to get as much exposure for 3.15 as possible during the beta phase.

This includes creating pre-release wheels for 3.15, as it helps other projects to do their own testing. However, we recommend that your regular production releases wait until 3.15.0rc1, to avoid the risk of ABI breaks.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

Review in cubic

@codspeed-hq

codspeed-hq Bot commented Jul 28, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 15 untouched benchmarks
⏩ 7 skipped benchmarks1


Comparing hugovk:add-3.15 (817fd10) with main (8cff429)

Open in CodSpeed

Footnotes

  1. 7 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.

@Kludex Kludex left a comment

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.

Thanks Hugo! 🙏

@Kludex
Kludex enabled auto-merge (squash) July 28, 2026 07:17

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/main.yml">

<violation number="1" location=".github/workflows/main.yml:5">
P2: This PR removes `branches: ["main"]` from the push trigger, which silently widens CI to run on every branch push — not just pushes to main. That's a meaningful behavioral change unrelated to the stated Python 3.15 support goal. If this was intentional, it should be called out in the PR description. Otherwise, keep the original `branches: ["main"]` filter. Additionally, running on both `push` (any branch) and `pull_request` creates duplicate CI runs when a PR is open, consuming extra runner minutes.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic


on:
push:
branches: ["main"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: This PR removes branches: ["main"] from the push trigger, which silently widens CI to run on every branch push — not just pushes to main. That's a meaningful behavioral change unrelated to the stated Python 3.15 support goal. If this was intentional, it should be called out in the PR description. Otherwise, keep the original branches: ["main"] filter. Additionally, running on both push (any branch) and pull_request creates duplicate CI runs when a PR is open, consuming extra runner minutes.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/main.yml, line 5:

<comment>This PR removes `branches: ["main"]` from the push trigger, which silently widens CI to run on every branch push — not just pushes to main. That's a meaningful behavioral change unrelated to the stated Python 3.15 support goal. If this was intentional, it should be called out in the PR description. Otherwise, keep the original `branches: ["main"]` filter. Additionally, running on both `push` (any branch) and `pull_request` creates duplicate CI runs when a PR is open, consuming extra runner minutes.</comment>

<file context>
@@ -2,7 +2,6 @@ name: Test Suite
 on:
   push:
-    branches: ["main"]
   pull_request:
     branches: ["main", "version-*"]
 
</file context>

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.

This is to allow testing feature branches on forks, rather than having to develop in main. I want to make sure the CI actually passes before opening a PR and wasting the time of upstream maintainers; it could have been that some dependency is not yet ready for 3.15 and won't be for several months.

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.

It didn't slip, I noticed. All good. 🙏

@Kludex
Kludex merged commit fccb6b9 into pydantic:main Jul 28, 2026
13 checks passed
@hugovk
hugovk deleted the add-3.15 branch July 28, 2026 07:23
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.

2 participants