From 6a0d5a8a2a68d8779965f689fc0ba240e0a3c01b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Oct 2026 00:48:12 +0000 Subject: [PATCH 1/6] Initial plan From 5bd63cd30043c9a225709292431cdc99a45f8724 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Oct 2026 00:52:29 +0000 Subject: [PATCH 2/6] Pin setuptools below 81 in dev conda env Co-authored-by: bmatvey <68698370+bmatvey@users.noreply.github.com> --- environment-dev.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment-dev.yml b/environment-dev.yml index 62fe04297..72a4b2f74 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -27,6 +27,7 @@ dependencies: - pre_commit=2.20.0 - psycopg2=2.9.3 - python=3.10 + - setuptools<81 - pyupgrade=3.1.0 - terraform=1.3.4 - pip: From 92a9f837d3d1dac2b6886857a425e4d2b09654e8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Oct 2026 01:01:53 +0000 Subject: [PATCH 3/6] Defer PIL import in titan upload helper Co-authored-by: bmatvey <68698370+bmatvey@users.noreply.github.com> --- backend/siarnaq/gcloud/titan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/siarnaq/gcloud/titan.py b/backend/siarnaq/gcloud/titan.py index 290619d79..96115458a 100644 --- a/backend/siarnaq/gcloud/titan.py +++ b/backend/siarnaq/gcloud/titan.py @@ -5,7 +5,6 @@ import structlog from django.conf import settings from google.auth import impersonated_credentials -from PIL import Image logger = structlog.get_logger(__name__) @@ -105,6 +104,8 @@ def get_object( def upload_image(raw_image, image_path): + from PIL import Image + img = Image.open(raw_image) img.thumbnail(settings.GCLOUD_MAX_AVATAR_SIZE) From a2282598854e638b4a070a919ad2168518c59807 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Oct 2026 01:12:11 +0000 Subject: [PATCH 4/6] Add libtiff to dev env for Pillow runtime Co-authored-by: bmatvey <68698370+bmatvey@users.noreply.github.com> --- backend/siarnaq/gcloud/titan.py | 3 +-- environment-dev.yml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/siarnaq/gcloud/titan.py b/backend/siarnaq/gcloud/titan.py index 96115458a..290619d79 100644 --- a/backend/siarnaq/gcloud/titan.py +++ b/backend/siarnaq/gcloud/titan.py @@ -5,6 +5,7 @@ import structlog from django.conf import settings from google.auth import impersonated_credentials +from PIL import Image logger = structlog.get_logger(__name__) @@ -104,8 +105,6 @@ def get_object( def upload_image(raw_image, image_path): - from PIL import Image - img = Image.open(raw_image) img.thumbnail(settings.GCLOUD_MAX_AVATAR_SIZE) diff --git a/environment-dev.yml b/environment-dev.yml index 72a4b2f74..87b0a56e0 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -23,6 +23,7 @@ dependencies: - openjdk=11 - openssl>=3.0.15 - pillow=9.0.1 + - libtiff - pip=22.3 - pre_commit=2.20.0 - psycopg2=2.9.3 From 89c3909b83eb8b33ef1c8de333456597e0e9cd3b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Oct 2026 01:26:49 +0000 Subject: [PATCH 5/6] Defer PIL import in Titan upload helper Co-authored-by: bmatvey <68698370+bmatvey@users.noreply.github.com> --- backend/siarnaq/gcloud/titan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/siarnaq/gcloud/titan.py b/backend/siarnaq/gcloud/titan.py index 290619d79..96115458a 100644 --- a/backend/siarnaq/gcloud/titan.py +++ b/backend/siarnaq/gcloud/titan.py @@ -5,7 +5,6 @@ import structlog from django.conf import settings from google.auth import impersonated_credentials -from PIL import Image logger = structlog.get_logger(__name__) @@ -105,6 +104,8 @@ def get_object( def upload_image(raw_image, image_path): + from PIL import Image + img = Image.open(raw_image) img.thumbnail(settings.GCLOUD_MAX_AVATAR_SIZE) From e74ee18c15cfe3ba2a7d4c840c21769bf46c6b0e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Oct 2026 15:49:30 +0000 Subject: [PATCH 6/6] Fix match serializer UTC conversion on Django Co-authored-by: bmatvey <68698370+bmatvey@users.noreply.github.com> --- backend/siarnaq/api/compete/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/siarnaq/api/compete/serializers.py b/backend/siarnaq/api/compete/serializers.py index bd8971a34..056f47929 100644 --- a/backend/siarnaq/api/compete/serializers.py +++ b/backend/siarnaq/api/compete/serializers.py @@ -1,4 +1,5 @@ import random +from datetime import timezone import structlog from django.conf import settings @@ -283,7 +284,7 @@ def _normalize(obj): from django.utils import timezone as dj_tz # Parse the datetime string and convert to UTC - created = dj_tz.localtime(instance.created, dj_tz.utc) + created = dj_tz.localtime(instance.created, timezone.utc) data["created"] = created.isoformat().replace("+00:00", "Z") # Redact match details depending on client identity if self.context["user_is_staff"]: