From b6f23268822dc903eeec9a58468d7fbaab032ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilfredo=20Sa=CC=81nchez?= Date: Mon, 16 Oct 2023 19:06:58 -0700 Subject: [PATCH 1/4] Switch to Python 3.12 --- .github/workflows/cicd.yml | 22 +++++++++++----------- .github/workflows/deploy.yml | 4 ++-- .pre-commit-config.yaml | 10 +++++----- pyproject.toml | 2 +- tox.ini | 12 ++++++------ 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 01b6d44ba..9054b571b 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -40,7 +40,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: System Python Information uses: twisted/python-info-action@v1 @@ -86,7 +86,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: System Python Information uses: twisted/python-info-action@v1 @@ -132,7 +132,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: System Python Information uses: twisted/python-info-action@v1 @@ -179,7 +179,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: System Python Information uses: twisted/python-info-action@v1 @@ -225,7 +225,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: System Python Information uses: twisted/python-info-action@v1 @@ -270,7 +270,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: System Python Information uses: twisted/python-info-action@v1 @@ -299,13 +299,13 @@ jobs: strategy: matrix: os: ["ubuntu-latest"] - python-version: ["3.11"] # Versions to test with coverage + python-version: ["3.12"] # Versions to test with coverage tox-prefix: ["coverage"] optional: [false] include: - # Test Python 3.12 beta but allow it to fail + # Test Python beta but allow it to fail - os: "ubuntu-latest" - python-version: "3.12.0-beta.4" + python-version: "3.13.0-alpha.1" optional: true tox-prefix: "test" @@ -404,7 +404,7 @@ jobs: - uses: "actions/setup-python@v4" if: ${{ matrix.tox-prefix == 'coverage' }} with: - python-version: "3.11" + python-version: "3.12" - name: "Upload coverage to Codecov" uses: "codecov/codecov-action@v3.1.4" @@ -561,7 +561,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Deploy to staging run: ./bin/deploy staging diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 590538e6e..c2955c4a8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -36,7 +36,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.12" - name: System Python Information uses: twisted/python-info-action@v1 @@ -91,7 +91,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.12" - name: System Python Information uses: twisted/python-info-action@v1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 549a1c527..d2792b6ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,13 +8,13 @@ repos: rev: "v3.15.0" hooks: - id: pyupgrade - args: ["--py310-plus"] + args: ["--py312-plus"] - repo: https://github.com/psf/black rev: "23.9.1" hooks: - id: black - args: ["--target-version", "py311"] + args: ["--target-version", "py312"] - repo: https://github.com/PyCQA/autoflake rev: "v2.2.1" @@ -32,12 +32,12 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-bugbear==23.7.10 + - flake8-bugbear==23.9.16 - flake8-docstrings==1.7.0 - flake8-mutable==1.2.0 - flake8-pep3101==2.0.0 - pep8-naming==0.13.3 - - pycodestyle==2.11.0 + - pycodestyle==2.11.1 - pydocstyle==6.3.0 - pyflakes==3.1.0 @@ -46,7 +46,7 @@ repos: hooks: - id: yesqa additional_dependencies: - - flake8-bugbear==23.7.10 + - flake8-bugbear==23.9.16 - flake8-docstrings==1.7.0 - flake8-mutable==1.2.0 - flake8-pep3101==2.0.0 diff --git a/pyproject.toml b/pyproject.toml index 0c4c86147..daa59dc1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,4 +7,4 @@ build-backend = "setuptools.build_meta" [tool.black] line-length = 80 -target-version = ["py311"] +target-version = ["py312"] diff --git a/tox.ini b/tox.ini index 38bf736cb..6d4299d7f 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,8 @@ envlist = lint, mypy, bandit - test-py312 - coverage-py311 + test-py313 + coverage-py312 coverage_report docs packaging @@ -13,7 +13,7 @@ skip_missing_interpreters = {tty:True:False} [default] -basepython = python3.11 +basepython = python3.12 deps = {test,coverage}: -r requirements/requirements-tests.txt @@ -37,8 +37,8 @@ description = run tests basepython = py: python - py311: python3.11 py312: python3.12 + py313: python3.13 deps = {[default]deps} @@ -128,7 +128,7 @@ commands = description = generate coverage report -depends = coverage-py{311,312} +depends = coverage-py{312,313} basepython = {[default]basepython} @@ -231,7 +231,7 @@ commands = description = check for potential packaging problems -depends = {test,coverage}-py{311,312} +depends = {test,coverage}-py{312,313} basepython = {[default]basepython} From 8fd8beec71f0e3235d1841b0890671056379829a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilfredo=20Sa=CC=81nchez?= Date: Mon, 16 Oct 2023 19:19:35 -0700 Subject: [PATCH 2/4] Update metadata --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ef53376e0..4d06a6cf5 100755 --- a/setup.py +++ b/setup.py @@ -62,8 +62,7 @@ "Intended Audience :: Other Audience", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Office/Business", ] From 7759a93e7fe9c00a86306d82b6cac5f857be5b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilfredo=20Sa=CC=81nchez?= Date: Mon, 16 Oct 2023 19:19:44 -0700 Subject: [PATCH 3/4] Upate Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e129576ad..c5e7633d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # ----------------------------------------------------------------------------- # This stage builds the build container. # ----------------------------------------------------------------------------- -FROM python:3.11.0-alpine3.16 as build +FROM python:3.12.0-alpine3.18 as build # Install compiler toolchain and libraries. RUN apk add --no-cache build-base libffi-dev libressl-dev @@ -35,7 +35,7 @@ RUN "${IMS_INSTALL_DIR}/bin/pip" --no-cache-dir install "${IMS_SOURCE_DIR}" # ----------------------------------------------------------------------------- # This stage builds the application container. # ----------------------------------------------------------------------------- -FROM python:3.11.0-alpine3.16 as application +FROM python:3.12.0-alpine3.18 as application # Paths ARG IMS_INSTALL_DIR="/opt/ims" @@ -53,7 +53,7 @@ RUN apk add --no-cache libressl # Allow Python to bind to privileged port numbers RUN apk add --no-cache libcap -RUN setcap "cap_net_bind_service=+ep" /usr/local/bin/python3.11 +RUN setcap "cap_net_bind_service=+ep" /usr/local/bin/python3.12 # Create server root and make that our working directory RUN install -o daemon -g daemon -d "${IMS_SERVER_ROOT}" From 3eb378424e39d79c24fc53fee47306bd3ea31f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilfredo=20Sa=CC=81nchez?= Date: Thu, 1 Feb 2024 12:44:28 -0800 Subject: [PATCH 4/4] a3 is out --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index bcc78530d..9f32c2def 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -303,7 +303,7 @@ jobs: include: # Test Python beta but allow it to fail - os: "ubuntu-latest" - python-version: "3.13.0-alpha.1" + python-version: "3.13.0-alpha.3" optional: true tox-prefix: "test"