From 97d20612264b4acbbf050dcdac48115e51dc6a67 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 20 Sep 2023 10:22:38 -0700 Subject: [PATCH] Update gear to python3.11 and Bookworm container This is motivated by OpenDev's desire to drop the old Bullseye container images as well as container images for older versions of python. We bump testing to python3.11 on the high end of the range and convert the container image to python3.11 + Bookworm. Python 2.7 testing is removed because tox + virtualenv can't actually create python2.7 virtualenvs any longer. There are workarounds but dropping the tests is simpler. Python 3.5 testing is replaced with 3.6 testing beacuse the version of easy_install on ubuntu xenial does not understand TLS + SNI. A while back pypi.org dropped non SNI connection support which means we can't install PBR for to run the setup.py for the projcet. There are workarounds but 3.5 is old enough taht we should be able to move on. Change-Id: I2f2a2d0cf71c69d7babd6df9bfdb41a759e9c0ee --- .zuul.yaml | 32 +++++++++++++++----------------- Dockerfile | 4 ++-- bindep.txt | 1 - setup.cfg | 2 ++ tox.ini | 2 -- 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 84fb6da..c760788 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -19,8 +19,8 @@ parent: opendev-build-docker-image description: Build OpenDev Docker images for gear requires: - - python-base-3.9-bullseye-container-image - - python-builder-3.9-bullseye-container-image + - python-base-3.11-bookworm-container-image + - python-builder-3.11-bookworm-container-image provides: gear-container-image vars: &gear_opendev_image_vars zuul_work_dir: src/opendev.org/opendev/gear @@ -34,8 +34,8 @@ parent: opendev-upload-docker-image description: Build OpenDev gear Docker images and upload to Docker Hub. requires: - - python-base-3.9-bullseye-container-image - - python-builder-3.9-bullseye-container-image + - python-base-3.11-bookworm-container-image + - python-builder-3.11-bookworm-container-image provides: gear-container-image vars: *gear_opendev_image_vars secrets: @@ -61,24 +61,22 @@ check: jobs: - tox-linters - - tox-py27 - - tox-py35: - nodeset: ubuntu-xenial - - tox-py39: - nodeset: ubuntu-focal + - tox-py36: + nodeset: ubuntu-bionic + - tox-py311: + nodeset: ubuntu-jammy - build-python-release: - nodeset: ubuntu-focal + nodeset: ubuntu-jammy - gear-build-opendev-image gate: jobs: - tox-linters - - tox-py27 - - tox-py35: - nodeset: ubuntu-xenial - - tox-py39: - nodeset: ubuntu-focal + - tox-py36: + nodeset: ubuntu-bionic + - tox-py311: + nodeset: ubuntu-jammy - build-python-release: - nodeset: ubuntu-focal + nodeset: ubuntu-jammy - gear-upload-opendev-image promote: jobs: @@ -87,7 +85,7 @@ release: jobs: - opendev-release-python: - nodeset: ubuntu-focal + nodeset: ubuntu-jammy - upload-docker-image: secrets: name: docker_credentials diff --git a/Dockerfile b/Dockerfile index 3c75b9f..bd03f93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM opendevorg/python-builder:3.9-bullseye as builder +FROM opendevorg/python-builder:3.11-bookworm as builder COPY . /tmp/src RUN assemble -FROM opendevorg/python-base:3.9-bullseye as geard +FROM opendevorg/python-base:3.11-bookworm as geard COPY --from=builder /output/ /output RUN /output/install-from-bindep diff --git a/bindep.txt b/bindep.txt index e6c6331..aba02cc 100644 --- a/bindep.txt +++ b/bindep.txt @@ -3,7 +3,6 @@ libffi-dev [platform:dpkg] libffi-devel [platform:rpm] -python-dev [platform:dpkg] python-devel [platform:rpm] python3-all-dev [platform:ubuntu !platform:ubuntu-precise] python3-dev [platform:dpkg] diff --git a/setup.cfg b/setup.cfg index c05a2d3..e68fe1a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,6 +31,8 @@ classifier = Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 [files] packages = diff --git a/tox.ini b/tox.ini index 54a6ee2..8b6ed66 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,10 @@ [tox] minversion = 1.6 -skipsdist = True envlist = py3,py27,linters ignore_basepython_conflict = true [testenv] setenv = VIRTUAL_ENV={envdir} -usedevelop = True basepython = python3 install_command = pip install {opts} {packages} deps = -r{toxinidir}/requirements.txt