Skip to content

Conversation

@shalini9894
Copy link
Contributor

Update classifiers, python_requires, CI workflows, tox envs, and release notes to require Python 3.10+

This PR removes support for Python 3.9 now that it has reached EoL.

Changes:

  • Update setup.py classifiers to remove Programming Language :: Python :: 3.9.
  • Set python_requires to >=3.10.
  • Update GitHub Actions workflows (main.yml, deploy-code.yml) to stop testing/building on 3.9 and use 3.10+.
  • Update tox.ini envlist to drop the py39 environment.
  • Add a release note explaining that Python 3.9 is no longer supported and the minimum required version is now 3.10.

Fixes #991

Update classifiers, python_requires, CI workflows, tox envs, and release notes to require Python 3.10+
@CLAassistant
Copy link

CLAassistant commented Nov 21, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ edoaltamura
❌ shalini9894
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Collaborator

@edoaltamura edoaltamura left a comment

Choose a reason for hiding this comment

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

The CI config requires the Python version to be specified as a string, eg '3.10' (see suggestion comments), otherwise it automatically reads 3.1, which is what is being run by CI in some instances. Once this is fixed, the rest of the PR looks good to go. Thanks for this contribution!

strategy:
matrix:
python-version: [3.9]
python-version: [3.10]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
python-version: [3.10]
python-version: ['3.10']

matrix:
os: [ubuntu-latest]
python-version: [3.9]
python-version: [3.10]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
python-version: [3.10]
python-version: ['3.10']

# macos-latest is an Arm64 image
- os: macos-latest
python-version: 3.9
python-version: 3.10
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
python-version: 3.10
python-version: '3.10'

python-version: 3.13
- os: windows-latest
python-version: 3.9
python-version: 3.10
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
python-version: 3.10
python-version: '3.10'

matrix:
os: [ubuntu-latest]
python-version: [3.9, 3.13]
python-version: [3.10, 3.13]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
python-version: [3.10, 3.13]
python-version: ['3.10', 3.13]

coverage3 combine
mv .coverage ./ci-artifact-data/ml.dat
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 }}
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.10 }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.10 }}
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' }}

mkdir artifacts
tar -zcvf artifacts/tutorials.tar.gz --exclude=./artifacts .
if: ${{ matrix.python-version == 3.9 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}
if: ${{ matrix.python-version == 3.10 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if: ${{ matrix.python-version == 3.10 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}
if: ${{ matrix.python-version == '3.10' && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}

name: tutorials-stable${{ matrix.python-version }}
path: docs/_build/html/artifacts/tutorials.tar.gz
if: ${{ matrix.python-version == 3.9 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}
if: ${{ matrix.python-version == 3.10 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if: ${{ matrix.python-version == 3.10 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}
if: ${{ matrix.python-version == '3.10' && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}

strategy:
matrix:
python-version: [3.9]
python-version: [3.10]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
python-version: [3.10]
python-version: ['3.10']

I have applied all the suggestions, and 3.10 is now consistently quoted in the workflows.
@shalini9894
Copy link
Contributor Author

Hi @edoaltamura I implemented the suggestions. Please let me know if there is any changes required. Thank you.

@edoaltamura
Copy link
Collaborator

@shalini9894 thanks! The changes fixed the py version in CI tests. The coverage files are not matching though somehow - see below.

image

config references from Python 3.9 to 3.10.
Copy link
Collaborator

@edoaltamura edoaltamura left a comment

Choose a reason for hiding this comment

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

LGTM.

@edoaltamura edoaltamura merged commit cbe4284 into qiskit-community:main Nov 25, 2025
14 of 15 checks passed
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.

Unsupport Python 3.9 due to EoL

3 participants