From 85cae06b840f95b11706d7481c46bb458f6bcd1a Mon Sep 17 00:00:00 2001 From: PascalEgn Date: Wed, 4 Sep 2024 18:13:17 +0200 Subject: [PATCH] global: revert django 5 changes --- backoffice/backoffice/workflows/constants.py | 2 +- backoffice/backoffice/workflows/models.py | 4 +- backoffice/poetry.lock | 54 +++++++++----------- backoffice/pyproject.toml | 6 +-- 4 files changed, 30 insertions(+), 36 deletions(-) diff --git a/backoffice/backoffice/workflows/constants.py b/backoffice/backoffice/workflows/constants.py index 49893edd..b245b69b 100644 --- a/backoffice/backoffice/workflows/constants.py +++ b/backoffice/backoffice/workflows/constants.py @@ -37,7 +37,7 @@ class ResolutionDags(models.TextChoices): accept_curate = "accept_curate", "author_create_approved_dag" -DECISION_CHOICES = ResolutionDags +DECISION_CHOICES = ResolutionDags.choices class AuthorCreateDags(models.TextChoices): diff --git a/backoffice/backoffice/workflows/models.py b/backoffice/backoffice/workflows/models.py index bd8e6025..3dfb7cb3 100644 --- a/backoffice/backoffice/workflows/models.py +++ b/backoffice/backoffice/workflows/models.py @@ -19,13 +19,13 @@ class Workflow(models.Model): workflow_type = models.CharField( max_length=30, - choices=WorkflowType, + choices=WorkflowType.choices, default=DEFAULT_WORKFLOW_TYPE, ) data = models.JSONField() status = models.CharField( max_length=30, - choices=StatusChoices, + choices=StatusChoices.choices, default=DEFAULT_STATUS_CHOICE, ) core = models.BooleanField(default=False) diff --git a/backoffice/poetry.lock b/backoffice/poetry.lock index 05bf5478..0ea52909 100644 --- a/backoffice/poetry.lock +++ b/backoffice/poetry.lock @@ -104,13 +104,13 @@ tests = ["pytest"] [[package]] name = "asgiref" -version = "3.8.1" +version = "3.7.2" description = "ASGI specs, helper code, and adapters" optional = false -python-versions = ">=3.8" +python-versions = ">=3.7" files = [ - {file = "asgiref-3.8.1-py3-none-any.whl", hash = "sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47"}, - {file = "asgiref-3.8.1.tar.gz", hash = "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590"}, + {file = "asgiref-3.7.2-py3-none-any.whl", hash = "sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e"}, + {file = "asgiref-3.7.2.tar.gz", hash = "sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed"}, ] [package.extras] @@ -841,17 +841,17 @@ typing-extensions = ">=3.10.0.0" [[package]] name = "django" -version = "5.1" +version = "4.2.6" description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design." optional = false -python-versions = ">=3.10" +python-versions = ">=3.8" files = [ - {file = "Django-5.1-py3-none-any.whl", hash = "sha256:d3b811bf5371a26def053d7ee42a9df1267ef7622323fe70a601936725aa4557"}, - {file = "Django-5.1.tar.gz", hash = "sha256:848a5980e8efb76eea70872fb0e4bc5e371619c70fffbe48e3e1b50b2c09455d"}, + {file = "Django-4.2.6-py3-none-any.whl", hash = "sha256:a64d2487cdb00ad7461434320ccc38e60af9c404773a2f95ab0093b4453a3215"}, + {file = "Django-4.2.6.tar.gz", hash = "sha256:08f41f468b63335aea0d904c5729e0250300f6a1907bf293a65499496cdbc68f"}, ] [package.dependencies] -asgiref = ">=3.8.1,<4" +asgiref = ">=3.6.0,<4" sqlparse = ">=0.3.1" tzdata = {version = "*", markers = "sys_platform == \"win32\""} @@ -902,19 +902,19 @@ postal = ["cryptography"] [[package]] name = "django-celery-beat" -version = "2.7.0" +version = "2.5.0" description = "Database-backed Periodic Tasks." optional = false -python-versions = ">=3.8" +python-versions = "*" files = [ - {file = "django_celery_beat-2.7.0-py3-none-any.whl", hash = "sha256:851c680d8fbf608ca5fecd5836622beea89fa017bc2b3f94a5b8c648c32d84b1"}, - {file = "django_celery_beat-2.7.0.tar.gz", hash = "sha256:8482034925e09b698c05ad61c36ed2a8dbc436724a3fe119215193a4ca6dc967"}, + {file = "django-celery-beat-2.5.0.tar.gz", hash = "sha256:cd0a47f5958402f51ac0c715bc942ae33d7b50b4e48cba91bc3f2712be505df1"}, + {file = "django_celery_beat-2.5.0-py3-none-any.whl", hash = "sha256:ae460faa5ea142fba0875409095d22f6bd7bcc7377889b85e8cab5c0dfb781fe"}, ] [package.dependencies] celery = ">=5.2.3,<6.0" cron-descriptor = ">=1.2.32" -Django = ">=2.2,<5.2" +Django = ">=2.2,<5.0" django-timezone-field = ">=5.0" python-crontab = ">=2.3.4" tzdata = "*" @@ -1183,17 +1183,17 @@ typing-extensions = "*" [[package]] name = "django-timezone-field" -version = "7.0" +version = "6.0.1" description = "A Django app providing DB, form, and REST framework fields for zoneinfo and pytz timezone objects." optional = false -python-versions = "<4.0,>=3.8" +python-versions = ">=3.8,<4.0" files = [ - {file = "django_timezone_field-7.0-py3-none-any.whl", hash = "sha256:3232e7ecde66ba4464abb6f9e6b8cc739b914efb9b29dc2cf2eee451f7cc2acb"}, - {file = "django_timezone_field-7.0.tar.gz", hash = "sha256:aa6f4965838484317b7f08d22c0d91a53d64e7bbbd34264468ae83d4023898a7"}, + {file = "django_timezone_field-6.0.1-py3-none-any.whl", hash = "sha256:ed28d3ff8e3500f2bc173cdf1aab7a3244ef607d06ad890611512de1bae6074d"}, + {file = "django_timezone_field-6.0.1.tar.gz", hash = "sha256:916d0fd924443462f099f02122cc38d6a6e901ea17f1206c343836199df8bc49"}, ] [package.dependencies] -Django = ">=3.2,<6.0" +Django = ">=3.2,<5.0" [[package]] name = "djangorestframework" @@ -3229,13 +3229,13 @@ crt = ["botocore[crt] (>=1.20.29,<2.0a.0)"] [[package]] name = "sentry-sdk" -version = "1.45.1" +version = "1.19.1" description = "Python client for Sentry (https://sentry.io)" optional = false python-versions = "*" files = [ - {file = "sentry_sdk-1.45.1-py2.py3-none-any.whl", hash = "sha256:608887855ccfe39032bfd03936e3a1c4f4fc99b3a4ac49ced54a4220de61c9c1"}, - {file = "sentry_sdk-1.45.1.tar.gz", hash = "sha256:a16c997c0f4e3df63c0fc5e4207ccb1ab37900433e0f72fef88315d317829a26"}, + {file = "sentry-sdk-1.19.1.tar.gz", hash = "sha256:7ae78bd921981a5010ab540d6bdf3b793659a4db8cccf7f16180702d48a80d84"}, + {file = "sentry_sdk-1.19.1-py2.py3-none-any.whl", hash = "sha256:885a11c69df23e53eb281d003b9ff15a5bdfa43d8a2a53589be52104a1b4582f"}, ] [package.dependencies] @@ -3245,24 +3245,18 @@ urllib3 = {version = ">=1.26.11", markers = "python_version >= \"3.6\""} [package.extras] aiohttp = ["aiohttp (>=3.5)"] arq = ["arq (>=0.23)"] -asyncpg = ["asyncpg (>=0.23)"] beam = ["apache-beam (>=2.12)"] bottle = ["bottle (>=0.12.13)"] celery = ["celery (>=3)"] -celery-redbeat = ["celery-redbeat (>=2)"] chalice = ["chalice (>=1.16.0)"] -clickhouse-driver = ["clickhouse-driver (>=0.2.0)"] django = ["django (>=1.8)"] falcon = ["falcon (>=1.4)"] fastapi = ["fastapi (>=0.79.0)"] -flask = ["blinker (>=1.1)", "flask (>=0.11)", "markupsafe"] +flask = ["blinker (>=1.1)", "flask (>=0.11)"] grpcio = ["grpcio (>=1.21.1)"] httpx = ["httpx (>=0.16.0)"] huey = ["huey (>=2)"] -loguru = ["loguru (>=0.5)"] -openai = ["openai (>=1.0.0)", "tiktoken (>=0.3.0)"] opentelemetry = ["opentelemetry-distro (>=0.35b0)"] -opentelemetry-experimental = ["opentelemetry-distro (>=0.40b0,<1.0)", "opentelemetry-instrumentation-aiohttp-client (>=0.40b0,<1.0)", "opentelemetry-instrumentation-django (>=0.40b0,<1.0)", "opentelemetry-instrumentation-fastapi (>=0.40b0,<1.0)", "opentelemetry-instrumentation-flask (>=0.40b0,<1.0)", "opentelemetry-instrumentation-requests (>=0.40b0,<1.0)", "opentelemetry-instrumentation-sqlite3 (>=0.40b0,<1.0)", "opentelemetry-instrumentation-urllib (>=0.40b0,<1.0)"] pure-eval = ["asttokens", "executing", "pure-eval"] pymongo = ["pymongo (>=3.1)"] pyspark = ["pyspark (>=2.4.4)"] @@ -4039,4 +4033,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "~3.11" -content-hash = "337b46f6562d0c01765bbc8825dd3dfaf75924c064f8825e034f399e0dbbfaf0" +content-hash = "3792d78500a0345b91bebb37193b90820bc1a0beb8838881f6015bbdf6ca3a9d" diff --git a/backoffice/pyproject.toml b/backoffice/pyproject.toml index 2b48d4bc..97c59d7c 100644 --- a/backoffice/pyproject.toml +++ b/backoffice/pyproject.toml @@ -118,10 +118,10 @@ argon2-cffi = "23.1.0" redis = "5.0.1" hiredis = "2.2.3" celery = "5.3.4" -django-celery-beat = "2.7.0" +django-celery-beat = "2.5.0" flower = "2.0.1" uvicorn = {version = "0.23.2", extras = ["standard"]} -django = "5.1.0" +django = "4.2.6" django-environ = "0.11.2" django-model-utils = "4.3.1" django-allauth = "0.57.0" @@ -149,7 +149,7 @@ opensearch-dsl = "^2.1.0" opensearch-py = "2.6.0" djangorestframework-simplejwt = "^5.3.1" django-json-widget = "^2.0.1" -sentry-sdk = "^1.45.1" +sentry-sdk = "1.19.1" [tool.poetry.dev-dependencies] factory-boy = "3.3.0"