From 6ae5c56e7363c41cca76a065909ee596cffd1ac6 Mon Sep 17 00:00:00 2001 From: Nir Date: Wed, 10 Jun 2026 12:57:07 +1000 Subject: [PATCH 1/2] [74] Update dependencies and fix Python 3.13 compatibility * Updated requirements.txt to modern Python 3.13-compatible versions (Django 5.2, numpy 2.x, Pillow 10+, etc.); removed dev tools and Python 3.6 backports * Fixed server/urls.py: replaced removed url() with re_path() from django.urls (url() was dropped in Django 4.0) * Added DEFAULT_AUTO_FIELD to settings.py to silence Django 5.x warning * Updated Dockerfile base image from EOL python:3.6-alpine to python:3.13-alpine; fixed ENV and CMD syntax Resolves #74 --- server/docker/release/Dockerfile | 8 +++----- server/requirements.txt | 25 ++++++++++--------------- server/server/settings.py | 2 ++ server/server/urls.py | 8 +++----- 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/server/docker/release/Dockerfile b/server/docker/release/Dockerfile index ed3ce7f..d3a4e29 100755 --- a/server/docker/release/Dockerfile +++ b/server/docker/release/Dockerfile @@ -1,7 +1,7 @@ # SERVER -FROM python:3.6-alpine -ENV PYTHONUNBUFFERED 1 +FROM python:3.13-alpine +ENV PYTHONUNBUFFERED=1 # [START system dependencies] RUN apk add --update curl gcc g++ \ @@ -16,8 +16,6 @@ RUN apk add --update jpeg-dev zlib-dev libjpeg \ RUN apk add --no-cache ffmpeg -RUN ln -s /usr/include/locale.h /usr/include/xlocale.h - # [START app environment] RUN mkdir /code @@ -30,4 +28,4 @@ COPY . /code/ EXPOSE 8000 -CMD python manage.py runserver 0.0.0.0:8000 \ No newline at end of file +CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] diff --git a/server/requirements.txt b/server/requirements.txt index 98a752c..e96b3f1 100755 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -1,15 +1,10 @@ -certifi==2018.4.16 -Django==2.2.13 -django-cors-headers==2.4.0 -djangorestframework==3.9.1 -gunicorn==19.7.1 -pipenv==2018.7.1 -pytz==2018.4 -numpy==1.16.0 -colour==0.1.5 -virtualenv==16.0.0 -virtualenv-clone==0.3.0 -zipfile36==0.1.3 -matplotlib==2.2.5 -Pillow==8.3.2 -requests==2.27.1 \ No newline at end of file +Django>=5.1,<5.3 +django-cors-headers>=4.3 +djangorestframework>=3.15 +gunicorn>=22.0 +pytz>=2024.1 +numpy>=1.26 +colour>=0.1.5 +matplotlib>=3.8 +Pillow>=10.0 +requests>=2.32 diff --git a/server/server/settings.py b/server/server/settings.py index d31e082..cef05f3 100755 --- a/server/server/settings.py +++ b/server/server/settings.py @@ -130,3 +130,5 @@ # https://docs.djangoproject.com/en/2.0/howto/static-files/ STATIC_URL = '/static/' + +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' diff --git a/server/server/urls.py b/server/server/urls.py index 9026414..b7e98f1 100755 --- a/server/server/urls.py +++ b/server/server/urls.py @@ -14,18 +14,16 @@ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.conf.urls import url -from django.urls import path,include +from django.urls import path, include, re_path from rest_framework.routers import DefaultRouter from app import views router = DefaultRouter() router.register('app', views.PDDLViewSet) -##router.register('upload',views.FileUploadView.as_view()) urlpatterns = [ path('admin/', admin.site.urls), path('api/', include(router.urls)), - url(r'upload/(?P[^/]+)$',views.LinkUploadView.as_view()), + re_path(r'upload/(?P[^/]+)$', views.LinkUploadView.as_view()), path('help/', views.UserGuide.as_view()), - url(r'downloadVisualisation', views.LinkDownloadPlanimation.as_view()), + re_path(r'downloadVisualisation', views.LinkDownloadPlanimation.as_view()), ] From e73d51a84a885afb6dbdac6b45de72ca1c958577 Mon Sep 17 00:00:00 2001 From: Nir Date: Wed, 10 Jun 2026 13:03:46 +1000 Subject: [PATCH 2/2] [74] Fix CI: upgrade Python 3.8 to 3.13 in python-app workflow Django 5.x requires Python 3.10+; pip on Python 3.8 cannot resolve Django>=5.1 at all. Also bumped actions/checkout and setup-python to their latest major versions (v4/v5). Resolves #74 --- .github/workflows/python-app.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 4d00cd0..5a5d0fc 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -18,11 +18,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.8 - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - name: Set up Python 3.13 + uses: actions/setup-python@v5 with: - python-version: "3.8" + python-version: "3.13" - name: Install dependencies run: | python -m pip install --upgrade pip