Drop support for Python 3.6 (#7295)

* Drop support for Python 3.6

As has been advertised for some time the Qiskit 0.19.0 release is the
last release which supports Python 3.6 (which goes End of Life in
Decemeber). This commit drops support accordingly so that the minimum
supported Python version is 3.7.

* Add release note
This commit is contained in:
Matthew Treinish 2021-12-06 18:30:00 -05:00 committed by GitHub
parent 0248c77cb2
commit 8c9e01d33f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 27 deletions

View File

@ -28,7 +28,7 @@ stages:
variables:
python.version: '3.7'
CIBW_BEFORE_BUILD: pip install -U Cython
CIBW_SKIP: cp27-* cp34-* cp35-* pp*
CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* pp*
TWINE_USERNAME: qiskit
CIBW_TEST_COMMAND: python {project}/examples/python/stochastic_swap.py
steps:
@ -72,7 +72,7 @@ stages:
variables:
python.version: '3.7'
CIBW_BEFORE_BUILD: pip install -U Cython
CIBW_SKIP: cp27-* cp34-* cp35-* pp*
CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* pp*
TWINE_USERNAME: qiskit
CIBW_TEST_COMMAND: python {project}/examples/python/stochastic_swap.py
steps:
@ -96,7 +96,7 @@ stages:
variables:
python.version: '3.7'
CIBW_BEFORE_BUILD: pip install -U Cython
CIBW_SKIP: cp27-* cp34-* cp35-* pp*
CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* pp*
CIBW_ARCHS_MACOS: universal2
TWINE_USERNAME: qiskit
CIBW_TEST_COMMAND: python {project}/examples/python/stochastic_swap.py
@ -120,12 +120,10 @@ stages:
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
variables:
CIBW_BEFORE_BUILD: pip install -U Cython
CIBW_SKIP: cp27-* cp34-* cp35-* pp*
CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* pp*
TWINE_USERNAME: qiskit
CIBW_TEST_COMMAND: python {project}\examples\python\stochastic_swap.py
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6', architecture: x86}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.6', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x86}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x64}}
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.8', architecture: x86}}
@ -506,8 +504,6 @@ stages:
pool: {vmImage: 'windows-latest'}
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
Python39:
@ -587,8 +583,6 @@ stages:
pool: {vmImage: 'ubuntu-latest'}
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
Python39:
@ -671,8 +665,6 @@ stages:
pool: {vmImage: 'macOS-10.15'}
strategy:
matrix:
Python36:
python.version: '3.6'
Python38:
python.version: '3.8'
Python39:

View File

@ -58,14 +58,6 @@ from .version import QiskitVersion # noqa
__qiskit_version__ = QiskitVersion()
if sys.version_info < (3, 7):
warnings.warn(
"Using Qiskit with Python 3.6 is deprecated as of qiskit-terra 0.17.0. "
"Support for running Qiskit with Python 3.6 will be removed in qiskit-terra 0.20.0.",
DeprecationWarning,
)
class AerWrapper:
"""Lazy loading wrapper for Aer provider."""

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
Support for running with Python 3.6 has been removed. To run Qiskit you need
a minimum Python version of 3.7.

View File

@ -10,7 +10,3 @@ python-dateutil>=2.8.0
stevedore>=3.0.0
symengine>=0.8 ; platform_machine == 'x86_64' or platform_machine == 'aarch64' or platform_machine == 'ppc64le' or platform_machine == 'amd64' or platform_machine == 'arm64'
tweedledum>=1.1,<2.0
# remove these once support for python 3.6 is dropped
dataclasses>=0.8;python_version<'3.7'
contextvars>=2.4;python_version<'3.7'

View File

@ -112,7 +112,6 @@ setup(
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
@ -123,7 +122,7 @@ setup(
install_requires=REQUIREMENTS,
setup_requires=["Cython>=0.27.1"],
include_package_data=True,
python_requires=">=3.6",
python_requires=">=3.7",
extras_require={
"visualization": visualization_extras,
"bip-mapper": bip_requirements,

View File

@ -1,6 +1,6 @@
[tox]
minversion = 2.1
envlist = py36, py37, py38, lint-incr
envlist = py37, py38, py39, lint-incr
skipsdist = True
[testenv]