From 4e769f0ed02eb9b5179258483cc9b08efe81842b Mon Sep 17 00:00:00 2001
From: likui <likui@yovole.com>
Date: Wed, 1 Jun 2022 16:35:00 +0800
Subject: [PATCH] Drop support for Python 3.6, 3.7

Python 3.6 and Python 3.7 support has been dropped since Zed [1]. This
necessitates changes our jobs to build and publish docker images since
those currently use Python 3.6. We now use Python 3.9.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Change-Id: I228b7ff6691a025f1ba9b7d9449f294868942151
Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
---
 .zuul.yaml | 8 ++++----
 Dockerfile | 4 ++--
 setup.cfg  | 4 +---
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/.zuul.yaml b/.zuul.yaml
index 8a98767e0f..98e2ed7215 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -189,8 +189,8 @@
     description: Build Docker images.
     allowed-projects: openstack/python-openstackclient
     requires:
-      - python-builder-3.7-container-image
-      - python-base-3.7-container-image
+      - python-builder-3.9-container-image
+      - python-base-3.9-container-image
     provides: osc-container-image
     vars: &osc_image_vars
       docker_images:
@@ -203,8 +203,8 @@
     description: Build Docker images and upload to Docker Hub.
     allowed-projects: openstack/python-openstackclient
     requires:
-      - python-builder-3.7-container-image
-      - python-base-3.7-container-image
+      - python-builder-3.9-container-image
+      - python-base-3.9-container-image
     provides: osc-container-image
     secrets:
       - name: docker_credentials
diff --git a/Dockerfile b/Dockerfile
index bf5de3c755..90f7fd3be6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,12 +13,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM docker.io/opendevorg/python-builder:3.7 as builder
+FROM docker.io/opendevorg/python-builder:3.9 as builder
 
 COPY . /tmp/src
 RUN assemble
 
-FROM docker.io/opendevorg/python-base:3.7
+FROM docker.io/opendevorg/python-base:3.9
 
 COPY --from=builder /output/ /output
 RUN /output/install-from-bindep
diff --git a/setup.cfg b/setup.cfg
index b5c376fad9..7efb9de48f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -6,7 +6,7 @@ description_file =
 author = OpenStack
 author_email = openstack-discuss@lists.openstack.org
 home_page = https://docs.openstack.org/python-openstackclient/latest/
-python_requires = >=3.6
+python_requires = >=3.8
 classifier =
     Environment :: OpenStack
     Intended Audience :: Information Technology
@@ -15,8 +15,6 @@ classifier =
     Operating System :: POSIX :: Linux
     Programming Language :: Python
     Programming Language :: Python :: 3
-    Programming Language :: Python :: 3.6
-    Programming Language :: Python :: 3.7
     Programming Language :: Python :: 3.8
     Programming Language :: Python :: 3.9