Skip to content

Commit

Permalink
Upgrade Python version and dependencies (#184)
Browse files Browse the repository at this point in the history
* Upgrade Python version to 3.13

* Update all dependencies

* Upgrade Python version in the pipeline

* Upgrade python version in pre-commit config
  • Loading branch information
BenMillar-MOJ authored Mar 6, 2025
1 parent 6fd0bf0 commit 19622dd
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 82 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Run pip-compile pre-commit
id: pip_compile
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
uses: SonarSource/sonarqube-scan-action@master
with:
args: >
-Dsonar.python.version=3.12
-Dsonar.python.version=3.13
-Dsonar.sources=app
-Dsonar.python.coverage.reportPaths=coverage/coverage.xml
env:
Expand All @@ -82,7 +82,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
cache: 'pip' # caching pip dependencies

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
cache: 'pip' # caching pip dependencies

- name: Install dependencies
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
cache: 'pip' # caching pip dependencies

- uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.12
python: python3.13
repos:
- repo: https://github.com/jazzband/pip-tools
rev: 7.4.1
Expand Down
2 changes: 1 addition & 1 deletion .trufflehog3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exclude: # exclude matching issues
- .env
- build/**
- dist/**
- python3.12/**
- python3.*/**
- package-lock.json
- README.md
- app/static/**
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=python:3.12-slim
ARG BASE_IMAGE=python:3.13-slim

FROM node:lts-iron as node_build
WORKDIR /home/node
Expand Down
2 changes: 1 addition & 1 deletion compose-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
build:
context: .
args:
BASE_IMAGE: python:3.12-bookworm
BASE_IMAGE: python:3.13-bookworm
REQUIREMENTS_FILE: "requirements-development.txt"
target: development
restart: always
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "access-civil-legal-aid"
requires-python = ">= 3.12"
requires-python = ">= 3.13"
dynamic = ["dependencies", "optional-dependencies"]

[tool.setuptools.dynamic]
Expand Down
81 changes: 44 additions & 37 deletions requirements/generated/requirements-development.txt
Original file line number Diff line number Diff line change
@@ -1,72 +1,79 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --no-annotate --output-file=requirements/generated/requirements-development.txt requirements/source/requirements-development.in
#
attrs==20.3.0
axe-core-python==0.1.0
babel==2.16.0
blinker==1.8.2
babel==2.17.0
blinker==1.9.0
brotli==1.1.0
cachelib==0.9.0
certifi==2024.7.4
charset-normalizer==3.3.2
click==8.1.7
deepmerge==1.1.1
deprecated==1.2.14
cachelib==0.13.0
certifi==2025.1.31
cfgv==3.4.0
charset-normalizer==3.4.1
click==8.1.8
deepmerge==2.0
deprecated==1.2.18
distlib==0.3.9
dnspython==2.7.0
email-validator==2.2.0
flask==3.0.3
filelock==3.17.0
flask==3.1.0
flask-babel==4.0.0
flask-caching==2.3.0
flask-compress==1.15
flask-limiter==3.8.0
flask-caching==2.3.1
flask-compress==1.17
flask-limiter==3.10.1
flask-talisman==1.1.0
flask-wtf==1.2.1
flask-wtf==1.2.2
freezegun==1.5.1
gitdb==4.0.11
gitdb==4.0.12
gitpython==3.1.41
govuk-frontend-jinja==3.1.0
govuk-frontend-wtf==3.1.0
greenlet==3.0.3
idna==3.7
importlib-resources==6.4.0
govuk-frontend-jinja==3.5.0
govuk-frontend-wtf==3.2.0
greenlet==3.1.1
identify==2.6.8
idna==3.10
iniconfig==2.0.0
isort==5.13.2
isort==6.0.1
itsdangerous==2.2.0
jinja2==3.1.4
limits==3.13.0
limits==4.0.1
markdown==3.7
markdown-it-py==3.0.0
markupsafe==2.1.5
markupsafe==3.0.2
mdurl==0.1.2
nodeenv==1.9.1
ordered-set==4.1.0
packaging==24.1
playwright==1.45.0
packaging==24.2
platformdirs==4.3.6
playwright==1.50.0
pluggy==1.5.0
pyee==11.1.0
pygments==2.18.0
pytest==8.3.1
pre-commit==4.1.0
pyee==12.1.1
pygments==2.19.1
pytest==8.3.5
pytest-base-url==2.1.0
pytest-flask==1.3.0
pytest-mock==3.14.0
pytest-playwright==0.5.1
pytest-playwright==0.7.0
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-slugify==8.0.4
pytz==2024.2
pytz==2025.1
pyyaml==6.0.1
requests==2.32.3
rich==13.7.1
sentry-sdk[flask]==2.10.0
rich==13.9.4
sentry-sdk[flask]==2.22.0
six==1.17.0
smmap==5.0.1
smmap==5.0.2
text-unidecode==1.3
trufflehog3==3.0.10
typing-extensions==4.12.2
urllib3==2.2.2
werkzeug==3.0.3
wrapt==1.16.0
wtforms==3.1.2
urllib3==2.3.0
virtualenv==20.29.2
werkzeug==3.1.3
wrapt==1.17.2
wtforms==3.2.1
zstandard==0.23.0
6 changes: 3 additions & 3 deletions requirements/generated/requirements-linting.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --no-annotate --output-file=requirements/generated/requirements-linting.txt requirements/source/requirements-linting.in
#
attrs==20.3.0
gitdb==4.0.11
gitdb==4.0.12
gitpython==3.1.41
jinja2==3.1.4
markupsafe==3.0.2
pyyaml==6.0.1
ruff==0.9.3
smmap==5.0.1
smmap==5.0.2
trufflehog3==3.0.10
61 changes: 30 additions & 31 deletions requirements/generated/requirements-production.txt
Original file line number Diff line number Diff line change
@@ -1,51 +1,50 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile --no-annotate --output-file=requirements/generated/requirements-production.txt requirements/source/requirements-production.in
#
babel==2.16.0
blinker==1.8.2
babel==2.17.0
blinker==1.9.0
brotli==1.1.0
cachelib==0.9.0
certifi==2024.7.4
charset-normalizer==3.3.2
click==8.1.7
deepmerge==1.1.1
deprecated==1.2.14
cachelib==0.13.0
certifi==2025.1.31
charset-normalizer==3.4.1
click==8.1.8
deepmerge==2.0
deprecated==1.2.18
dnspython==2.7.0
email-validator==2.2.0
flask==3.0.3
flask==3.1.0
flask-babel==4.0.0
flask-caching==2.3.0
flask-compress==1.15
flask-limiter==3.8.0
flask-caching==2.3.1
flask-compress==1.17
flask-limiter==3.10.1
flask-talisman==1.1.0
flask-wtf==1.2.1
govuk-frontend-jinja==3.1.0
govuk-frontend-wtf==3.1.0
flask-wtf==1.2.2
govuk-frontend-jinja==3.5.0
govuk-frontend-wtf==3.2.0
gunicorn==23.0.0
idna==3.7
importlib-resources==6.4.0
idna==3.10
itsdangerous==2.2.0
jinja2==3.1.4
limits==3.13.0
jinja2==3.1.6
limits==4.0.1
markdown==3.7
markdown-it-py==3.0.0
markupsafe==2.1.5
markupsafe==3.0.2
mdurl==0.1.2
ordered-set==4.1.0
packaging==24.1
pygments==2.18.0
packaging==24.2
pygments==2.19.1
python-dotenv==1.0.1
pytz==2024.2
pyyaml==6.0.1
pytz==2025.1
pyyaml==6.0.2
requests==2.32.3
rich==13.7.1
sentry-sdk[flask]==2.10.0
rich==13.9.4
sentry-sdk[flask]==2.22.0
typing-extensions==4.12.2
urllib3==2.2.2
werkzeug==3.0.3
wrapt==1.16.0
wtforms==3.1.2
urllib3==2.3.0
werkzeug==3.1.3
wrapt==1.17.2
wtforms==3.2.1
zstandard==0.23.0
3 changes: 2 additions & 1 deletion requirements/source/requirements-development.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ pytest-playwright
pytest-mock
axe-core-python
trufflehog3==3.0.10
freezegun
freezegun
pre-commit

0 comments on commit 19622dd

Please sign in to comment.