Skip to content

Commit 5d70f91

Browse files
authored
Merge pull request #317 from torchbox/chore/deps-updates
Wagtail 6.3, Django 5.1, Python 3.13
2 parents a7762e2 + 82e0ff6 commit 5d70f91

File tree

20 files changed

+1003
-1003
lines changed

20 files changed

+1003
-1003
lines changed

.github/workflows/flightpath.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v3
16-
- name: Set up Python 3.11
16+
- name: Set up Python
1717
uses: actions/setup-python@v4
1818
with:
19-
python-version: '3.11'
19+
python-version: '3.13'
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip

.github/workflows/flightpath_status_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Set up Python 3.11
18+
- name: Set up Python
1919
uses: actions/setup-python@v4
2020
with:
21-
python-version: '3.11'
21+
python-version: '3.13'
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Set up Python
3737
uses: actions/setup-python@v4
3838
with:
39-
python-version: 3.11
39+
python-version: '3.13'
4040
cache: 'pip'
4141

4242
- name: Install dependencies

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12-
- name: Set up Python 3.11
12+
- name: Set up Python
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: 3.11
15+
python-version: '3.13'
1616
- uses: actions/setup-node@v4
1717
with:
1818
node-version-file: '.nvmrc'
@@ -92,7 +92,7 @@ jobs:
9292
- name: Set up Python
9393
uses: actions/setup-python@v5
9494
with:
95-
python-version: 3.11
95+
python-version: '3.13'
9696
cache: 'poetry'
9797
- uses: actions/download-artifact@v4
9898
with:

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
default_language_version:
22
node: system
3-
python: python3.11
3+
python: python3.13
44
repos:
55
- repo: https://github.com/psf/black-pre-commit-mirror
66
rev: 24.10.0
77
hooks:
88
- id: black
9-
language_version: python3.11
9+
language_version: python3.13
1010
exclude: .+/migrations
1111
- repo: https://github.com/PyCQA/isort
1212
rev: 5.13.2

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN npm run build:prod
1616
# ones becase they use a different C compiler. Debian images also come with
1717
# all useful packages required for image manipulation out of the box. They
1818
# however weight a lot, approx. up to 1.5GiB per built image.
19-
FROM python:3.11 AS production
19+
FROM python:3.13 as production
2020

2121
ARG POETRY_INSTALL_ARGS="--no-dev"
2222

@@ -71,7 +71,7 @@ USER tbx
7171
# Install your app's Python requirements.
7272
RUN python -m venv $VIRTUAL_ENV
7373
COPY --chown=tbx pyproject.toml poetry.lock ./
74-
RUN pip install --no-cache --upgrade pip && poetry install ${POETRY_INSTALL_ARGS} --no-root --extras gunicorn && rm -rf $HOME/.cache
74+
RUN pip install --no-cache --upgrade pip && poetry install ${POETRY_INSTALL_ARGS} --no-root && rm -rf $HOME/.cache
7575

7676
COPY --chown=tbx --from=frontend ./tbx/static_compiled ./tbx/static_compiled
7777

fabfile.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# Process .env file
1010
if os.path.exists(".env"):
11-
with open(".env", "r") as f:
11+
with open(".env") as f:
1212
for line in f.readlines():
1313
if not line or line.startswith("#") or "=" not in line:
1414
continue
@@ -36,9 +36,7 @@
3636

3737

3838
def dexec(cmd, service="web"):
39-
return local(
40-
"docker compose exec -T {} bash -c {}".format(quote(service), quote(cmd))
41-
)
39+
return local(f"docker compose exec -T {quote(service)} bash -c {quote(cmd)}")
4240

4341

4442
@task
@@ -51,7 +49,7 @@ def build(c):
5149

5250
group = subprocess.check_output(["id", "-gn"], encoding="utf-8").strip()
5351
local("mkdir -p " + directories_arg)
54-
local("chown -R $USER:{} {}".format(group, directories_arg))
52+
local(f"chown -R $USER:{group} {directories_arg}")
5553
local("chmod -R 775 " + directories_arg)
5654

5755
local("docker compose pull", pty=True)
@@ -267,9 +265,7 @@ def dev_shell(c):
267265

268266

269267
def delete_local_database(c, local_database_name=LOCAL_DATABASE_NAME):
270-
local(
271-
"dropdb --if-exists {database_name}".format(database_name=LOCAL_DATABASE_NAME)
272-
)
268+
local(f"dropdb --if-exists {LOCAL_DATABASE_NAME}")
273269

274270

275271
####
@@ -391,7 +387,7 @@ def open_heroku_shell(c, app_instance, shell_command="bash"):
391387

392388

393389
def make_bold(msg):
394-
return "\033[1m{}\033[0m".format(msg)
390+
return f"\033[1m{msg}\033[0m"
395391

396392

397393
@task
@@ -441,16 +437,14 @@ def dellar_list(c):
441437
def dellar_remove(c, filename):
442438
"""Remove database snapshots"""
443439
dexec(
444-
"rm {filename}.psql".format(filename=filename),
440+
f"rm {filename}.psql",
445441
service="db",
446442
),
447443
print(f"Snapshot {filename} removed")
448444

449445

450446
def get_heroku_variable(c, app_instance, variable):
451-
return local(
452-
"heroku config:get {var} --app {app}".format(app=app_instance, var=variable)
453-
).stdout.strip()
447+
return local(f"heroku config:get {variable} --app {app_instance}").stdout.strip()
454448

455449

456450
@task

0 commit comments

Comments
 (0)