1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-07 14:25:37 +00:00

Upgrade to Django Channels 4 and bumped other dependencies

This commit is contained in:
Bram Wiepjes 2023-03-06 08:21:21 +00:00
parent 9f231095be
commit ee87182c5e
6 changed files with 129 additions and 122 deletions
backend
requirements
src/baserow
api
config/settings
changelog/entries/unreleased/refactor

View file

@ -1,39 +1,39 @@
Django==3.2.13
django-cors-headers==3.8.0
djangorestframework==3.13.1
djangorestframework-simplejwt==5.2.0
psycopg2==2.9.1
Django==3.2.18
django-cors-headers==3.14.0
djangorestframework==3.14.0
djangorestframework-simplejwt==5.2.2
psycopg2==2.9.5
Faker==8.11.0
Twisted==22.1
Twisted==22.10.0
gunicorn==20.1.0
uvicorn[standard]==0.15.0
websockets==10.3
requests==2.26.0
itsdangerous==2.0.1
uvicorn[standard]==0.20.0
websockets==10.4
requests==2.28.2
itsdangerous==2.1.2
Pillow==9.0.0
drf-spectacular==0.21.2
asgiref==3.4.1
channels==3.0.4
channels-redis==3.3.0
celery[redis]==5.2.3
drf-spectacular==0.25.1
asgiref==3.6.0
channels[daphne]==4.0.0
channels-redis==4.0.0
celery[redis]==5.2.7
django-redis==5.2.0
django-celery-email==3.0.0
advocate==1.0.0
zipp==3.5.0
unicodecsv==0.14.1
django-celery-beat==2.2.1
django-celery-beat==2.4.0
celery-redbeat==2.0.0
service-identity==21.1.0
regex==2021.8.3
antlr4-python3-runtime==4.9.3
tqdm==4.62.3
boto3==1.20.38
tqdm==4.64.1
boto3==1.26.83
django-storages==1.12.3
django-health-check==3.16.5
psutil==5.9.0
psutil==5.9.4
dj-database-url==0.5.0
redis==4.1.4
pysaml2==7.2.1
redis==4.5.1
pysaml2==7.4.1
validators==0.20.0
requests-oauthlib==1.3.1
opentelemetry-api==1.15.0
@ -57,4 +57,3 @@ opentelemetry-semantic-conventions==0.36b0
opentelemetry-util-http==0.36b0
Brotli==1.0.9
loguru==0.6.0

View file

@ -6,15 +6,13 @@
#
advocate==1.0.0
# via -r base.in
aioredis==1.3.1
# via channels-redis
amqp==5.1.1
# via kombu
antlr4-python3-runtime==4.9.3
# via -r base.in
anyio==3.6.1
# via watchgod
asgiref==3.4.1
# via watchfiles
asgiref==3.6.0
# via
# -r base.in
# channels
@ -22,16 +20,15 @@ asgiref==3.4.1
# daphne
# django
# opentelemetry-instrumentation-asgi
# uvicorn
async-timeout==4.0.2
# via aioredis
# via redis
attrs==22.1.0
# via
# automat
# jsonschema
# service-identity
# twisted
autobahn==22.7.1
autobahn==23.1.2
# via daphne
automat==20.2.0
# via twisted
@ -39,15 +36,15 @@ backoff==2.2.1
# via opentelemetry-exporter-otlp-proto-http
billiard==3.6.4.0
# via celery
boto3==1.20.38
boto3==1.26.83
# via -r base.in
botocore==1.23.54
botocore==1.29.83
# via
# boto3
# s3transfer
brotli==1.0.9
# via -r base.in
celery[redis]==5.2.3
celery[redis]==5.2.7
# via
# -r base.in
# celery-redbeat
@ -59,11 +56,11 @@ certifi==2022.9.24
# via requests
cffi==1.15.1
# via cryptography
channels==3.0.4
channels[daphne]==4.0.0
# via
# -r base.in
# channels-redis
channels-redis==3.3.0
channels-redis==4.0.0
# via -r base.in
charset-normalizer==2.0.12
# via requests
@ -88,19 +85,17 @@ cryptography==38.0.1
# pyopenssl
# pysaml2
# service-identity
daphne==3.0.2
daphne==4.0.0
# via channels
decorator==5.1.1
# via validators
defusedxml==0.7.1
# via pysaml2
deprecated==1.2.13
# via
# opentelemetry-api
# redis
# via opentelemetry-api
dj-database-url==0.5.0
# via -r base.in
django==3.2.13
django==3.2.18
# via
# -r base.in
# channels
@ -111,17 +106,16 @@ django==3.2.13
# django-health-check
# django-redis
# django-storages
# django-timezone-field
# djangorestframework
# djangorestframework-simplejwt
# drf-spectacular
django-appconf==1.0.5
# via django-celery-email
django-celery-beat==2.2.1
django-celery-beat==2.4.0
# via -r base.in
django-celery-email==3.0.0
# via -r base.in
django-cors-headers==3.8.0
django-cors-headers==3.14.0
# via -r base.in
django-health-check==3.16.5
# via -r base.in
@ -129,16 +123,16 @@ django-redis==5.2.0
# via -r base.in
django-storages==1.12.3
# via -r base.in
django-timezone-field==4.2.3
django-timezone-field==5.0
# via django-celery-beat
djangorestframework==3.13.1
djangorestframework==3.14.0
# via
# -r base.in
# djangorestframework-simplejwt
# drf-spectacular
djangorestframework-simplejwt==5.2.0
djangorestframework-simplejwt==5.2.2
# via -r base.in
drf-spectacular==0.21.2
drf-spectacular==0.25.1
# via -r base.in
elementpath==3.0.2
# via xmlschema
@ -150,9 +144,7 @@ gunicorn==20.1.0
# via -r base.in
h11==0.14.0
# via uvicorn
hiredis==2.0.0
# via aioredis
httptools==0.2.0
httptools==0.5.0
# via uvicorn
hyperlink==21.0.0
# via
@ -168,7 +160,7 @@ incremental==21.3.0
# via twisted
inflection==0.5.1
# via drf-spectacular
itsdangerous==2.0.1
itsdangerous==2.1.2
# via -r base.in
jmespath==0.10.0
# via
@ -282,8 +274,6 @@ opentelemetry-util-http==0.36b0
# opentelemetry-instrumentation-django
# opentelemetry-instrumentation-requests
# opentelemetry-instrumentation-wsgi
packaging==21.3
# via redis
pillow==9.0.0
# via -r base.in
prompt-toolkit==3.0.31
@ -292,9 +282,9 @@ protobuf==4.21.12
# via
# googleapis-common-protos
# opentelemetry-proto
psutil==5.9.0
psutil==5.9.4
# via -r base.in
psycopg2==2.9.1
psycopg2==2.9.5
# via -r base.in
pyasn1==0.4.8
# via
@ -314,11 +304,9 @@ pyopenssl==22.1.0
# ndg-httpsclient
# pysaml2
# twisted
pyparsing==3.0.9
# via packaging
pyrsistent==0.18.1
# via jsonschema
pysaml2==7.2.1
pysaml2==7.4.1
# via -r base.in
python-crontab==2.6.0
# via django-celery-beat
@ -342,15 +330,16 @@ pyyaml==6.0
# via
# drf-spectacular
# uvicorn
redis==4.1.4
redis==4.5.1
# via
# -r base.in
# celery
# celery-redbeat
# channels-redis
# django-redis
regex==2021.8.3
# via -r base.in
requests==2.26.0
requests==2.28.2
# via
# -r base.in
# advocate
@ -359,7 +348,7 @@ requests==2.26.0
# requests-oauthlib
requests-oauthlib==1.3.1
# via -r base.in
s3transfer==0.5.2
s3transfer==0.6.0
# via boto3
service-identity==21.1.0
# via
@ -370,7 +359,6 @@ six==1.16.0
# advocate
# automat
# click-repl
# pysaml2
# python-dateutil
# service-identity
sniffio==1.3.0
@ -381,18 +369,20 @@ tenacity==8.1.0
# via celery-redbeat
text-unidecode==1.3
# via faker
tqdm==4.62.3
tqdm==4.64.1
# via -r base.in
twisted[tls]==22.1.0
twisted[tls]==22.10.0
# via
# -r base.in
# daphne
txaio==22.2.1
txaio==23.1.1
# via autobahn
typing-extensions==4.4.0
# via
# opentelemetry-sdk
# twisted
tzdata==2022.7
# via django-celery-beat
unicodecsv==0.14.1
# via -r base.in
uritemplate==4.1.1
@ -402,7 +392,7 @@ urllib3==1.26.12
# advocate
# botocore
# requests
uvicorn[standard]==0.15.0
uvicorn[standard]==0.20.0
# via -r base.in
uvloop==0.17.0
# via uvicorn
@ -413,11 +403,11 @@ vine==5.0.0
# amqp
# celery
# kombu
watchgod==0.8.2
watchfiles==0.18.1
# via uvicorn
wcwidth==0.2.5
# via prompt-toolkit
websockets==10.3
websockets==10.4
# via
# -r base.in
# uvicorn

View file

@ -1,12 +1,12 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile dev.in
# pip-compile --output-file=dev.txt dev.in
#
argh==0.26.2
# via -r dev.in
asgiref==3.4.1
asgiref==3.6.0
# via
# -c base.txt
# django
@ -25,7 +25,7 @@ autopep8==1.5.7
# django-silk
backcall==0.2.0
# via ipython
backports.cached-property==1.0.1
backports-cached-property==1.0.1
# via -r dev.in
bandit==1.7.2
# via -r dev.in
@ -59,26 +59,28 @@ coverage[toml]==6.2
debugpy==1.5.1
# via -r dev.in
decorator==5.1.1
# via ipython
django-extensions==3.1.5
# via -r dev.in
django-silk==4.2.0
# via -r dev.in
django-stubs-ext==0.5.0
# via
# -r dev.in
# django-stubs
django-stubs==1.12.0
# via
# -r dev.in
# djangorestframework-stubs
django==3.2.13
# -c base.txt
# ipython
django==3.2.18
# via
# -c base.txt
# django-extensions
# django-silk
# django-stubs
# django-stubs-ext
django-extensions==3.1.5
# via -r dev.in
django-silk==4.2.0
# via -r dev.in
django-stubs==1.12.0
# via
# -r dev.in
# djangorestframework-stubs
django-stubs-ext==0.5.0
# via
# -r dev.in
# django-stubs
djangorestframework-stubs==1.7.0
# via -r dev.in
execnet==1.9.0
@ -107,8 +109,6 @@ idna==3.4
# via
# -c base.txt
# requests
importlib-resources==5.10.0
# via jsonschema
iniconfig==1.1.1
# via pytest
ipython==8.5.0
@ -134,23 +134,22 @@ matplotlib-inline==0.1.6
# via ipython
mccabe==0.6.1
# via flake8
mypy-extensions==0.4.3
# via
# -r dev.in
# black
# mypy
mypy==0.961
# via
# -r dev.in
# django-stubs
# djangorestframework-stubs
mypy-extensions==0.4.3
# via
# -r dev.in
# black
# mypy
openapi-schema-validator==0.2.3
# via openapi-spec-validator
openapi-spec-validator==0.4.0
# via -r dev.in
packaging==21.3
# via
# -c base.txt
# build
# pytest
parso==0.8.3
@ -167,8 +166,6 @@ pickleshare==0.7.5
# via ipython
pip-tools==6.9.0
# via -r dev.in
pkgutil-resolve-name==1.3.10
# via jsonschema
platformdirs==2.5.2
# via black
pluggy==1.0.0
@ -203,13 +200,27 @@ pygments==2.13.0
pyinstrument==4.0.3
# via -r dev.in
pyparsing==3.0.9
# via
# -c base.txt
# packaging
# via packaging
pyrsistent==0.18.1
# via
# -c base.txt
# jsonschema
pytest==6.2.5
# via
# -r dev.in
# pytest-asyncio
# pytest-cov
# pytest-django
# pytest-env
# pytest-forked
# pytest-html
# pytest-icdiff
# pytest-metadata
# pytest-mock
# pytest-ordering
# pytest-split
# pytest-unordered
# pytest-xdist
pytest-asyncio==0.15.1
# via -r dev.in
pytest-cov==3.0.0
@ -236,22 +247,6 @@ pytest-unordered==0.4.1
# via -r dev.in
pytest-xdist==2.3.0
# via -r dev.in
pytest==6.2.5
# via
# -r dev.in
# pytest-asyncio
# pytest-cov
# pytest-django
# pytest-env
# pytest-forked
# pytest-html
# pytest-icdiff
# pytest-metadata
# pytest-mock
# pytest-ordering
# pytest-split
# pytest-unordered
# pytest-xdist
python-dateutil==2.8.2
# via
# -c base.txt
@ -267,7 +262,7 @@ pyyaml==6.0
# -c base.txt
# bandit
# openapi-spec-validator
requests==2.26.0
requests==2.28.2
# via
# -c base.txt
# coreapi
@ -349,10 +344,6 @@ wcwidth==0.2.5
# prompt-toolkit
wheel==0.37.1
# via pip-tools
zipp==3.5.0
# via
# -c base.txt
# importlib-resources
# The following packages are considered to be unsafe in a requirements file:
# pip

View file

@ -399,12 +399,13 @@ class DiscriminatorCustomFieldsMappingSerializer:
def __init__(
self,
registry,
base_class,
registry=None,
base_class=None,
type_field_name="type",
many=False,
help_text=None,
request=False,
context=None,
):
self.read_only = False
self.registry = registry
@ -414,6 +415,12 @@ class DiscriminatorCustomFieldsMappingSerializer:
self.help_text = help_text
self.partial = False
self.request = request
self.context = {} if context is None else context
# Trick spectacular into thinking we are not a customized list serializer so it
# doesn't attempt to use its own customized list serializer extension code which
# doesn't work with our custom extension
to_representation = serializers.ListSerializer.to_representation
class DiscriminatorMappingSerializer:
@ -422,10 +429,23 @@ class DiscriminatorMappingSerializer:
class.
"""
def __init__(self, component_name, mapping, type_field_name="type", many=False):
def __init__(
self,
component_name=None,
mapping=None,
type_field_name="type",
many=False,
context=None,
):
self.read_only = False
self.component_name = component_name
self.mapping = mapping
self.type_field_name = type_field_name
self.many = many
self.partial = False
self.context = {} if context is None else context
# Trick spectacular into thinking we are not a customized list serializer so it
# doesn't attempt to use its own customized list serializer extension code which
# doesn't work with our custom extension
to_representation = serializers.ListSerializer.to_representation

View file

@ -55,6 +55,7 @@ ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
ALLOWED_HOSTS += os.getenv("BASEROW_EXTRA_ALLOWED_HOSTS", "").split(",")
INSTALLED_APPS = [
"daphne",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
@ -63,7 +64,6 @@ INSTALLED_APPS = [
"rest_framework",
"rest_framework_simplejwt",
"corsheaders",
"channels",
"drf_spectacular",
"djcelery_email",
"health_check",

View file

@ -0,0 +1,7 @@
{
"type": "refactor",
"message": "Upgrade Django Channels to version 4 and bumped other dependencies",
"issue_number": null,
"bullet_points": [],
"created_at": "2023-03-02"
}