Skip to content

Add CI support for Python 3.14#15224

Merged
mtreinish merged 1 commit intoQiskit:mainfrom
jakelishman:python-3.14
Mar 12, 2026
Merged

Add CI support for Python 3.14#15224
mtreinish merged 1 commit intoQiskit:mainfrom
jakelishman:python-3.14

Conversation

@jakelishman
Copy link
Copy Markdown
Member

We already build wheels that are compatible with Python 3.14, so this moves our "latest supported" version in CI to reflect that.

There is one visualisation test that was asserting an exact string match of a particular Numpy array that has changed the sign of some zero. This is irrelevant to the actual test (which seems to be testing internals of a method anyway), so we can just make it match regardless of signedness.

Summary

Details and comments

Fix #15135

@jakelishman jakelishman added this to the 2.3.0 milestone Oct 20, 2025
@jakelishman jakelishman requested a review from a team as a code owner October 20, 2025 20:41
@jakelishman jakelishman added type: qa Issues and PRs that relate to testing and code quality stable backport potential Make Mergify open a backport PR to the most recent stable branch on merge. labels Oct 20, 2025
@jakelishman jakelishman added the Changelog: None Do not include in the GitHub Release changelog. label Oct 20, 2025
@qiskit-bot
Copy link
Copy Markdown
Collaborator

One or more of the following people are relevant to this code:

@jakelishman jakelishman modified the milestones: 2.3.0, 2.2.2 Oct 20, 2025
@jakelishman
Copy link
Copy Markdown
Member Author

Ha, we need to bump black in order to specify py314 in its target versions. I'll revert that line for now.

@coveralls
Copy link
Copy Markdown

coveralls commented Oct 20, 2025

Pull Request Test Coverage Report for Build 23020650902

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 6 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.01%) to 87.528%

Files with Coverage Reduction New Missed Lines %
crates/circuit/src/parameter/parameter_expression.rs 1 86.99%
crates/qasm2/src/expr.rs 1 93.82%
crates/qasm2/src/lex.rs 4 92.29%
Totals Coverage Status
Change from base Build 23020635570: 0.01%
Covered Lines: 101218
Relevant Lines: 115641

💛 - Coveralls

@ShellyGarion ShellyGarion modified the milestones: 2.2.2, 2.3.0 Oct 22, 2025
mtreinish
mtreinish previously approved these changes Oct 23, 2025
Copy link
Copy Markdown
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

This LGTM, I'll update the branch protection rules and then enqueue this for merge

@mtreinish mtreinish added this pull request to the merge queue Oct 23, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 23, 2025
@Cryoris
Copy link
Copy Markdown
Collaborator

Cryoris commented Dec 11, 2025

As discussed offline let's try skip the failing test until python/cpython#140559 & co are resolved, rather than not testing on latest Python. We'll target this for after rc1 though.

Copy link
Copy Markdown
Contributor

@raynelfss raynelfss left a comment

Choose a reason for hiding this comment

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

A couple of quick questions before I hit merge. This looks straightforward to me.

Comment thread asv.conf.json Outdated
"environment_type": "virtualenv",
"show_commit_url": "https://github.com/Qiskit/qiskit/commit/",
"pythons": ["3.10", "3.11", "3.12", "3.13"],
"show_commit_url": "http://github.com/Qiskit/qiskit/commit/",
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.

Why did we go from https to http?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, this is probably a bad merge-conflict resolution from a rebase over #15629

Comment thread pyproject.toml
[tool.black]
line-length = 100
target-version = ['py310', 'py311']
target-version = ['py310', 'py311', 'py312', 'py313']
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.

Should we include 'py314' here or is black not compatible yet?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The version of black we use isn't compatible - I tried but had to revert.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well, it wasn't at the time, at least. Then I merged #15225, and now it's been a few months, so we might actually be able to update it. I'll leave it for this PR, though, since it'd involve the separate (mostly unrelated) change of bumping the black dependency.

raynelfss
raynelfss previously approved these changes Mar 12, 2026
Copy link
Copy Markdown
Contributor

@raynelfss raynelfss left a comment

Choose a reason for hiding this comment

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

LGTM!

@raynelfss raynelfss dismissed their stale review March 12, 2026 17:03

I previously approved the PR. However, I noticed we didn't update ctest.yml and docs-deploy.yml to 3.14.

@jakelishman jakelishman modified the milestones: 2.3.1, 2.4.0 Mar 12, 2026
@jakelishman jakelishman removed the stable backport potential Make Mergify open a backport PR to the most recent stable branch on merge. label Mar 12, 2026
We already build wheels that are compatible with Python 3.14, so this
moves our "latest supported" version in CI to reflect that.

There is one visualisation test that was asserting an exact string match
of a particular Numpy array that has changed the sign of some zero.
This is irrelevant to the actual test (which seems to be testing
internals of a method anyway), so we can just make it match regardless
of signedness.
Copy link
Copy Markdown
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

LGTM, it's definitely simpler with the new structure

@mtreinish mtreinish enabled auto-merge March 12, 2026 19:57
@jakelishman
Copy link
Copy Markdown
Member Author

By the way:

I previously approved the PR. However, I noticed we didn't update ctest.yml and docs-deploy.yml to 3.14.

As of #15794 ctest.yml no longer needs updating separately because it's now set by the unified rule in branch-protection.yml, but I updated docs_deploy.yml in the rebase.

@mtreinish mtreinish added this pull request to the merge queue Mar 12, 2026
Merged via the queue into Qiskit:main with commit 31a2a14 Mar 12, 2026
25 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Qiskit 2.3 Mar 12, 2026
@github-project-automation github-project-automation Bot moved this from Ready to Done in Qiskit 2.4 Mar 12, 2026
@jakelishman jakelishman deleted the python-3.14 branch March 12, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: None Do not include in the GitHub Release changelog. type: qa Issues and PRs that relate to testing and code quality

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

Test failure with Python 3.14

7 participants