diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 652366de5b..69ccac5e64 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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: diff --git a/qiskit/__init__.py b/qiskit/__init__.py index 990acd64af..24aa8d4ed8 100644 --- a/qiskit/__init__.py +++ b/qiskit/__init__.py @@ -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.""" diff --git a/releasenotes/notes/drop-python3.6-support-45ecc9e1832934cd.yaml b/releasenotes/notes/drop-python3.6-support-45ecc9e1832934cd.yaml new file mode 100644 index 0000000000..f1465dce6b --- /dev/null +++ b/releasenotes/notes/drop-python3.6-support-45ecc9e1832934cd.yaml @@ -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. diff --git a/requirements.txt b/requirements.txt index 93068d4b86..835a0eeb40 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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' diff --git a/setup.py b/setup.py index 23fc358870..abbc754108 100755 --- a/setup.py +++ b/setup.py @@ -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, diff --git a/tox.ini b/tox.ini index 7f1cae1ca5..237640f057 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 2.1 -envlist = py36, py37, py38, lint-incr +envlist = py37, py38, py39, lint-incr skipsdist = True [testenv]