Skip to content

Commit

Permalink
Downgrade to python 3.11 as no wheel available google-crc32 - see goo…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdmoss committed Jul 21, 2024
1 parent f45ff4f commit a8bdbb4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.12
3.11
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM al3xos/python-builder:3.12-debian12 AS builder
FROM al3xos/python-builder:3.11-debian12 AS builder

COPY photo-album/poetry.lock .
COPY photo-album/pyproject.toml .
Expand All @@ -11,7 +11,7 @@ RUN poetry config virtualenvs.create false && \

# ---------------------------------------------------------------------

FROM al3xos/python-distroless:3.12-debian12-debug
FROM al3xos/python-distroless:3.11-debian12-debug

COPY photo-album/ /app/
COPY --chown=monty:monty .keep /photos/.keep
Expand Down
12 changes: 6 additions & 6 deletions photo-album/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion photo-album/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GNU GPLv3"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.12"
python = "^3.11"
fastapi = "^0.111.0"
pydantic-settings = "^2.3.4"
jinja2 = "^3.1.4"
Expand Down
2 changes: 1 addition & 1 deletion photo-album/slideshow/secret.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json
import logging
from os import getenv

from google.cloud import secretmanager
import google_crc32c
Expand All @@ -23,6 +22,7 @@ def read_auth_api_secret():

response = client.access_secret_version(request={"name": name})

# check secret not tampered with
crc32c = google_crc32c.Checksum()
crc32c.update(response.payload.data)
if response.payload.data_crc32c != int(crc32c.hexdigest(), 16):
Expand Down

0 comments on commit a8bdbb4

Please sign in to comment.