From 6cdf6331db99d0c7228ec2329303f2ceafa0fe99 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Mon, 21 Oct 2024 19:33:47 +0200 Subject: [PATCH] Upgrade dependencies + add support for Python 3.13 and Django 5.1 Signed-off-by: Emmy D'Anello --- .gitlab-ci.yml | 13 +++++++++++-- Dockerfile | 2 +- requirements.txt | 38 +++++++++++++++++++------------------- tfjm/settings.py | 2 +- tox.ini | 1 + 5 files changed, 33 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 74fda60..75aee92 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ py311: image: python:3.11-alpine before_script: - apk add --no-cache libmagic - - apk add --no-cache gettext git # Useful for django-haystack, remove when the newer versions are in PyPI + - apk add --no-cache gettext - pip install tox --no-cache-dir script: tox -e py311 @@ -16,10 +16,19 @@ py312: image: python:3.12-alpine before_script: - apk add --no-cache libmagic - - apk add --no-cache gettext git # Useful for django-haystack, remove when the newer versions are in PyPI + - apk add --no-cache gettext - pip install tox --no-cache-dir script: tox -e py312 +py313: + stage: test + image: python:3.13-alpine + before_script: + - apk add --no-cache libmagic + - apk add --no-cache gettext + - pip install tox --no-cache-dir + script: tox -e py313 + linters: stage: quality-assurance image: python:3-alpine diff --git a/Dockerfile b/Dockerfile index d277db0..bd48460 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12-alpine +FROM python:3.13-alpine ENV PYTHONUNBUFFERED 1 ENV DJANGO_ALLOW_ASYNC_UNSAFE 1 diff --git a/requirements.txt b/requirements.txt index 4847d11..97f6cff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,29 +1,29 @@ -channels[daphne]~=4.0.0 +channels[daphne]~=4.1.0 channels-redis~=4.2.0 -crispy-bootstrap5~=2023.10 -Django>=5.0.3,<6.0 -django-crispy-forms~=2.1 +crispy-bootstrap5~=2024.10 +Django>=5.1.2,<6.0 +django-crispy-forms~=2.3 django-extensions~=3.2.3 -django-filter~=23.5 -git+https://github.com/django-haystack/django-haystack.git#v3.3b2 -django-mailer~=2.3.1 -django-phonenumber-field~=7.3.0 +django-filter~=24.3 +django-haystack~=3.3.0 +django-mailer~=2.3.2 +django-phonenumber-field~=8.0.0 django-pipeline~=3.1.0 django-polymorphic~=3.1.0 django-tables2~=2.7.0 -djangorestframework~=3.14.0 +djangorestframework~=3.15.2 django-rest-polymorphic~=0.1.10 elasticsearch~=7.17.9 -gspread~=6.1.0 -gunicorn~=21.2.0 +gspread~=6.1.4 +gunicorn~=23.0.0 odfpy~=1.4.1 -pandas~=2.2.1 -phonenumbers~=8.13.27 -psycopg2-binary~=2.9.9 -pypdf~=3.17.4 -ipython~=8.20.0 +pandas~=2.2.3 +phonenumbers~=8.13.47 +psycopg-binary~=3.2.3 +pypdf~=5.0.1 +ipython~=8.28.0 python-magic~=0.4.27 -requests~=2.31.0 +requests~=2.32.3 sympasoap~=1.1 -uvicorn~=0.25.0 -websockets~=12.0 \ No newline at end of file +uvicorn~=0.32.0 +websockets~=13.1 \ No newline at end of file diff --git a/tfjm/settings.py b/tfjm/settings.py index 4404a53..0e1c72b 100644 --- a/tfjm/settings.py +++ b/tfjm/settings.py @@ -262,7 +262,7 @@ _db_type = os.getenv('DJANGO_DB_TYPE', 'sqlite').lower() if _db_type == 'mysql' or _db_type.startswith('postgres') or _db_type == 'psql': # pragma: no cover DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.mysql' if _db_type == 'mysql' else 'django.db.backends.postgresql_psycopg2', + 'ENGINE': 'django.db.backends.mysql' if _db_type == 'mysql' else 'django.db.backends.postgresql', 'NAME': os.environ.get('DJANGO_DB_NAME', 'tfjm'), 'USER': os.environ.get('DJANGO_DB_USER', 'tfjm'), 'PASSWORD': os.environ.get('DJANGO_DB_PASSWORD', 'CHANGE_ME_IN_ENV_SETTINGS'), diff --git a/tox.ini b/tox.ini index 521eccb..81eb10c 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,7 @@ envlist = py311 py312 + py313 linters skipsdist = True