Skip to content

Commit

Permalink
Merge pull request #1346 from burningmantech/py313
Browse files Browse the repository at this point in the history
Update to Python 3.13
  • Loading branch information
wsanchez authored Oct 30, 2024
2 parents 46db77a + 8b3d435 commit 758f3a5
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 96 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Install uv
uses: astral-sh/setup-uv@v3
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Install uv
uses: astral-sh/setup-uv@v3
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Install uv
uses: astral-sh/setup-uv@v3
Expand All @@ -153,13 +153,13 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.12"] # Versions to test with coverage
python-version: ["3.13"] # Versions to test with coverage
tox-prefix: ["coverage"]
optional: [false]
include:
# Test next Python version but allow it to fail
- os: "ubuntu-latest"
python-version: "3.13"
python-version: "3.14.0-alpha.1"
optional: true
tox-prefix: "test"

Expand Down Expand Up @@ -255,7 +255,7 @@ jobs:
- uses: "actions/setup-python@v5"
if: ${{ matrix.tox-prefix == 'coverage' }}
with:
python-version: 3.12
python-version: 3.13

- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v4"
Expand Down Expand Up @@ -422,7 +422,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: Deploy to staging
run: ./bin/deploy staging
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: System Python Information
uses: twisted/python-info-action@v1
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.13"

- name: System Python Information
uses: twisted/python-info-action@v1
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ repos:
rev: "v3.19.0"
hooks:
- id: pyupgrade
args: ["--py312-plus"]
args: ["--py313-plus"]

- repo: https://github.com/psf/black
rev: "24.10.0"
hooks:
- id: black
args: ["--target-version", "py312"]
args: ["--target-version", "py313"]

- repo: https://github.com/PyCQA/autoflake
rev: "v2.3.1"
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# This stage builds the build container.
# -----------------------------------------------------------------------------
FROM python:3.12.3-alpine3.18 AS build
FROM python:3.13.0-alpine3.20 AS build

# Install compiler toolchain and libraries.
RUN apk add --no-cache build-base libffi-dev libressl-dev
Expand Down Expand Up @@ -38,7 +38,7 @@ RUN uv pip --no-progress install \
# -----------------------------------------------------------------------------
# This stage builds the application container.
# -----------------------------------------------------------------------------
FROM python:3.12.3-alpine3.18 AS application
FROM python:3.13.0-alpine3.20 AS application

# Paths
ARG IMS_INSTALL_DIR="/opt/ims"
Expand All @@ -56,7 +56,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.12
RUN setcap "cap_net_bind_service=+ep" /usr/local/bin/python3.13

# Create server root and make that our working directory
RUN install -o daemon -g daemon -d "${IMS_SERVER_ROOT}"
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ readme = "README.rst"
license = {file = "LICENSE.txt"}

# Requirements
requires-python = ">=3.12"
requires-python = ">=3.13"
dependencies = [
"arrow==1.3.0",
"attrs==24.2.0",
Expand Down Expand Up @@ -45,7 +45,7 @@ classifiers = [
"Intended Audience :: Other Audience",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Office/Business",
]
keywords = ["incident management", "ranger"]
Expand Down Expand Up @@ -76,7 +76,7 @@ build-backend = "setuptools.build_meta"
[tool.black]

line-length = 80
target-version = ["py312"]
target-version = ["py313"]


##
Expand Down
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

envlist =
lint, mypy
test-py313
coverage-py312
test-py314
coverage-py313
coverage_report
packaging

Expand All @@ -12,7 +12,7 @@ skip_missing_interpreters = {tty:True:False}

[default]

basepython = python3.12
basepython = python3.13

setenv =
PY_MODULE=ims
Expand All @@ -31,8 +31,8 @@ description = run tests
basepython =
py: python

py312: python3.12
py313: python3.13
py314: python3.14

runner = uv-venv-lock-runner
uv_sync_flags = --group=unit
Expand Down Expand Up @@ -128,7 +128,7 @@ commands =

description = generate coverage report

depends = coverage-py{312,313}
depends = coverage-py{313,314}

basepython = {[default]basepython}

Expand Down Expand Up @@ -156,7 +156,7 @@ commands =

description = check for potential packaging problems

depends = {test,coverage}-py{312,313}
depends = {test,coverage}-py{313,314}

basepython = {[default]basepython}

Expand Down
Loading

0 comments on commit 758f3a5

Please sign in to comment.