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

View file

@ -6,15 +6,13 @@
# #
advocate==1.0.0 advocate==1.0.0
# via -r base.in # via -r base.in
aioredis==1.3.1
# via channels-redis
amqp==5.1.1 amqp==5.1.1
# via kombu # via kombu
antlr4-python3-runtime==4.9.3 antlr4-python3-runtime==4.9.3
# via -r base.in # via -r base.in
anyio==3.6.1 anyio==3.6.1
# via watchgod # via watchfiles
asgiref==3.4.1 asgiref==3.6.0
# via # via
# -r base.in # -r base.in
# channels # channels
@ -22,16 +20,15 @@ asgiref==3.4.1
# daphne # daphne
# django # django
# opentelemetry-instrumentation-asgi # opentelemetry-instrumentation-asgi
# uvicorn
async-timeout==4.0.2 async-timeout==4.0.2
# via aioredis # via redis
attrs==22.1.0 attrs==22.1.0
# via # via
# automat # automat
# jsonschema # jsonschema
# service-identity # service-identity
# twisted # twisted
autobahn==22.7.1 autobahn==23.1.2
# via daphne # via daphne
automat==20.2.0 automat==20.2.0
# via twisted # via twisted
@ -39,15 +36,15 @@ backoff==2.2.1
# via opentelemetry-exporter-otlp-proto-http # via opentelemetry-exporter-otlp-proto-http
billiard==3.6.4.0 billiard==3.6.4.0
# via celery # via celery
boto3==1.20.38 boto3==1.26.83
# via -r base.in # via -r base.in
botocore==1.23.54 botocore==1.29.83
# via # via
# boto3 # boto3
# s3transfer # s3transfer
brotli==1.0.9 brotli==1.0.9
# via -r base.in # via -r base.in
celery[redis]==5.2.3 celery[redis]==5.2.7
# via # via
# -r base.in # -r base.in
# celery-redbeat # celery-redbeat
@ -59,11 +56,11 @@ certifi==2022.9.24
# via requests # via requests
cffi==1.15.1 cffi==1.15.1
# via cryptography # via cryptography
channels==3.0.4 channels[daphne]==4.0.0
# via # via
# -r base.in # -r base.in
# channels-redis # channels-redis
channels-redis==3.3.0 channels-redis==4.0.0
# via -r base.in # via -r base.in
charset-normalizer==2.0.12 charset-normalizer==2.0.12
# via requests # via requests
@ -88,19 +85,17 @@ cryptography==38.0.1
# pyopenssl # pyopenssl
# pysaml2 # pysaml2
# service-identity # service-identity
daphne==3.0.2 daphne==4.0.0
# via channels # via channels
decorator==5.1.1 decorator==5.1.1
# via validators # via validators
defusedxml==0.7.1 defusedxml==0.7.1
# via pysaml2 # via pysaml2
deprecated==1.2.13 deprecated==1.2.13
# via # via opentelemetry-api
# opentelemetry-api
# redis
dj-database-url==0.5.0 dj-database-url==0.5.0
# via -r base.in # via -r base.in
django==3.2.13 django==3.2.18
# via # via
# -r base.in # -r base.in
# channels # channels
@ -111,17 +106,16 @@ django==3.2.13
# django-health-check # django-health-check
# django-redis # django-redis
# django-storages # django-storages
# django-timezone-field
# djangorestframework # djangorestframework
# djangorestframework-simplejwt # djangorestframework-simplejwt
# drf-spectacular # drf-spectacular
django-appconf==1.0.5 django-appconf==1.0.5
# via django-celery-email # via django-celery-email
django-celery-beat==2.2.1 django-celery-beat==2.4.0
# via -r base.in # via -r base.in
django-celery-email==3.0.0 django-celery-email==3.0.0
# via -r base.in # via -r base.in
django-cors-headers==3.8.0 django-cors-headers==3.14.0
# via -r base.in # via -r base.in
django-health-check==3.16.5 django-health-check==3.16.5
# via -r base.in # via -r base.in
@ -129,16 +123,16 @@ django-redis==5.2.0
# via -r base.in # via -r base.in
django-storages==1.12.3 django-storages==1.12.3
# via -r base.in # via -r base.in
django-timezone-field==4.2.3 django-timezone-field==5.0
# via django-celery-beat # via django-celery-beat
djangorestframework==3.13.1 djangorestframework==3.14.0
# via # via
# -r base.in # -r base.in
# djangorestframework-simplejwt # djangorestframework-simplejwt
# drf-spectacular # drf-spectacular
djangorestframework-simplejwt==5.2.0 djangorestframework-simplejwt==5.2.2
# via -r base.in # via -r base.in
drf-spectacular==0.21.2 drf-spectacular==0.25.1
# via -r base.in # via -r base.in
elementpath==3.0.2 elementpath==3.0.2
# via xmlschema # via xmlschema
@ -150,9 +144,7 @@ gunicorn==20.1.0
# via -r base.in # via -r base.in
h11==0.14.0 h11==0.14.0
# via uvicorn # via uvicorn
hiredis==2.0.0 httptools==0.5.0
# via aioredis
httptools==0.2.0
# via uvicorn # via uvicorn
hyperlink==21.0.0 hyperlink==21.0.0
# via # via
@ -168,7 +160,7 @@ incremental==21.3.0
# via twisted # via twisted
inflection==0.5.1 inflection==0.5.1
# via drf-spectacular # via drf-spectacular
itsdangerous==2.0.1 itsdangerous==2.1.2
# via -r base.in # via -r base.in
jmespath==0.10.0 jmespath==0.10.0
# via # via
@ -282,8 +274,6 @@ opentelemetry-util-http==0.36b0
# opentelemetry-instrumentation-django # opentelemetry-instrumentation-django
# opentelemetry-instrumentation-requests # opentelemetry-instrumentation-requests
# opentelemetry-instrumentation-wsgi # opentelemetry-instrumentation-wsgi
packaging==21.3
# via redis
pillow==9.0.0 pillow==9.0.0
# via -r base.in # via -r base.in
prompt-toolkit==3.0.31 prompt-toolkit==3.0.31
@ -292,9 +282,9 @@ protobuf==4.21.12
# via # via
# googleapis-common-protos # googleapis-common-protos
# opentelemetry-proto # opentelemetry-proto
psutil==5.9.0 psutil==5.9.4
# via -r base.in # via -r base.in
psycopg2==2.9.1 psycopg2==2.9.5
# via -r base.in # via -r base.in
pyasn1==0.4.8 pyasn1==0.4.8
# via # via
@ -314,11 +304,9 @@ pyopenssl==22.1.0
# ndg-httpsclient # ndg-httpsclient
# pysaml2 # pysaml2
# twisted # twisted
pyparsing==3.0.9
# via packaging
pyrsistent==0.18.1 pyrsistent==0.18.1
# via jsonschema # via jsonschema
pysaml2==7.2.1 pysaml2==7.4.1
# via -r base.in # via -r base.in
python-crontab==2.6.0 python-crontab==2.6.0
# via django-celery-beat # via django-celery-beat
@ -342,15 +330,16 @@ pyyaml==6.0
# via # via
# drf-spectacular # drf-spectacular
# uvicorn # uvicorn
redis==4.1.4 redis==4.5.1
# via # via
# -r base.in # -r base.in
# celery # celery
# celery-redbeat # celery-redbeat
# channels-redis
# django-redis # django-redis
regex==2021.8.3 regex==2021.8.3
# via -r base.in # via -r base.in
requests==2.26.0 requests==2.28.2
# via # via
# -r base.in # -r base.in
# advocate # advocate
@ -359,7 +348,7 @@ requests==2.26.0
# requests-oauthlib # requests-oauthlib
requests-oauthlib==1.3.1 requests-oauthlib==1.3.1
# via -r base.in # via -r base.in
s3transfer==0.5.2 s3transfer==0.6.0
# via boto3 # via boto3
service-identity==21.1.0 service-identity==21.1.0
# via # via
@ -370,7 +359,6 @@ six==1.16.0
# advocate # advocate
# automat # automat
# click-repl # click-repl
# pysaml2
# python-dateutil # python-dateutil
# service-identity # service-identity
sniffio==1.3.0 sniffio==1.3.0
@ -381,18 +369,20 @@ tenacity==8.1.0
# via celery-redbeat # via celery-redbeat
text-unidecode==1.3 text-unidecode==1.3
# via faker # via faker
tqdm==4.62.3 tqdm==4.64.1
# via -r base.in # via -r base.in
twisted[tls]==22.1.0 twisted[tls]==22.10.0
# via # via
# -r base.in # -r base.in
# daphne # daphne
txaio==22.2.1 txaio==23.1.1
# via autobahn # via autobahn
typing-extensions==4.4.0 typing-extensions==4.4.0
# via # via
# opentelemetry-sdk # opentelemetry-sdk
# twisted # twisted
tzdata==2022.7
# via django-celery-beat
unicodecsv==0.14.1 unicodecsv==0.14.1
# via -r base.in # via -r base.in
uritemplate==4.1.1 uritemplate==4.1.1
@ -402,7 +392,7 @@ urllib3==1.26.12
# advocate # advocate
# botocore # botocore
# requests # requests
uvicorn[standard]==0.15.0 uvicorn[standard]==0.20.0
# via -r base.in # via -r base.in
uvloop==0.17.0 uvloop==0.17.0
# via uvicorn # via uvicorn
@ -413,11 +403,11 @@ vine==5.0.0
# amqp # amqp
# celery # celery
# kombu # kombu
watchgod==0.8.2 watchfiles==0.18.1
# via uvicorn # via uvicorn
wcwidth==0.2.5 wcwidth==0.2.5
# via prompt-toolkit # via prompt-toolkit
websockets==10.3 websockets==10.4
# via # via
# -r base.in # -r base.in
# uvicorn # 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: # To update, run:
# #
# pip-compile dev.in # pip-compile --output-file=dev.txt dev.in
# #
argh==0.26.2 argh==0.26.2
# via -r dev.in # via -r dev.in
asgiref==3.4.1 asgiref==3.6.0
# via # via
# -c base.txt # -c base.txt
# django # django
@ -25,7 +25,7 @@ autopep8==1.5.7
# django-silk # django-silk
backcall==0.2.0 backcall==0.2.0
# via ipython # via ipython
backports.cached-property==1.0.1 backports-cached-property==1.0.1
# via -r dev.in # via -r dev.in
bandit==1.7.2 bandit==1.7.2
# via -r dev.in # via -r dev.in
@ -59,26 +59,28 @@ coverage[toml]==6.2
debugpy==1.5.1 debugpy==1.5.1
# via -r dev.in # via -r dev.in
decorator==5.1.1 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 # via
# -r dev.in # -c base.txt
# django-stubs # ipython
django-stubs==1.12.0 django==3.2.18
# via
# -r dev.in
# djangorestframework-stubs
django==3.2.13
# via # via
# -c base.txt # -c base.txt
# django-extensions # django-extensions
# django-silk # django-silk
# django-stubs # django-stubs
# django-stubs-ext # 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 djangorestframework-stubs==1.7.0
# via -r dev.in # via -r dev.in
execnet==1.9.0 execnet==1.9.0
@ -107,8 +109,6 @@ idna==3.4
# via # via
# -c base.txt # -c base.txt
# requests # requests
importlib-resources==5.10.0
# via jsonschema
iniconfig==1.1.1 iniconfig==1.1.1
# via pytest # via pytest
ipython==8.5.0 ipython==8.5.0
@ -134,23 +134,22 @@ matplotlib-inline==0.1.6
# via ipython # via ipython
mccabe==0.6.1 mccabe==0.6.1
# via flake8 # via flake8
mypy-extensions==0.4.3
# via
# -r dev.in
# black
# mypy
mypy==0.961 mypy==0.961
# via # via
# -r dev.in # -r dev.in
# django-stubs # django-stubs
# djangorestframework-stubs # djangorestframework-stubs
mypy-extensions==0.4.3
# via
# -r dev.in
# black
# mypy
openapi-schema-validator==0.2.3 openapi-schema-validator==0.2.3
# via openapi-spec-validator # via openapi-spec-validator
openapi-spec-validator==0.4.0 openapi-spec-validator==0.4.0
# via -r dev.in # via -r dev.in
packaging==21.3 packaging==21.3
# via # via
# -c base.txt
# build # build
# pytest # pytest
parso==0.8.3 parso==0.8.3
@ -167,8 +166,6 @@ pickleshare==0.7.5
# via ipython # via ipython
pip-tools==6.9.0 pip-tools==6.9.0
# via -r dev.in # via -r dev.in
pkgutil-resolve-name==1.3.10
# via jsonschema
platformdirs==2.5.2 platformdirs==2.5.2
# via black # via black
pluggy==1.0.0 pluggy==1.0.0
@ -203,13 +200,27 @@ pygments==2.13.0
pyinstrument==4.0.3 pyinstrument==4.0.3
# via -r dev.in # via -r dev.in
pyparsing==3.0.9 pyparsing==3.0.9
# via # via packaging
# -c base.txt
# packaging
pyrsistent==0.18.1 pyrsistent==0.18.1
# via # via
# -c base.txt # -c base.txt
# jsonschema # 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 pytest-asyncio==0.15.1
# via -r dev.in # via -r dev.in
pytest-cov==3.0.0 pytest-cov==3.0.0
@ -236,22 +247,6 @@ pytest-unordered==0.4.1
# via -r dev.in # via -r dev.in
pytest-xdist==2.3.0 pytest-xdist==2.3.0
# via -r dev.in # 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 python-dateutil==2.8.2
# via # via
# -c base.txt # -c base.txt
@ -267,7 +262,7 @@ pyyaml==6.0
# -c base.txt # -c base.txt
# bandit # bandit
# openapi-spec-validator # openapi-spec-validator
requests==2.26.0 requests==2.28.2
# via # via
# -c base.txt # -c base.txt
# coreapi # coreapi
@ -349,10 +344,6 @@ wcwidth==0.2.5
# prompt-toolkit # prompt-toolkit
wheel==0.37.1 wheel==0.37.1
# via pip-tools # 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: # The following packages are considered to be unsafe in a requirements file:
# pip # pip

View file

@ -399,12 +399,13 @@ class DiscriminatorCustomFieldsMappingSerializer:
def __init__( def __init__(
self, self,
registry, registry=None,
base_class, base_class=None,
type_field_name="type", type_field_name="type",
many=False, many=False,
help_text=None, help_text=None,
request=False, request=False,
context=None,
): ):
self.read_only = False self.read_only = False
self.registry = registry self.registry = registry
@ -414,6 +415,12 @@ class DiscriminatorCustomFieldsMappingSerializer:
self.help_text = help_text self.help_text = help_text
self.partial = False self.partial = False
self.request = request 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: class DiscriminatorMappingSerializer:
@ -422,10 +429,23 @@ class DiscriminatorMappingSerializer:
class. 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.read_only = False
self.component_name = component_name self.component_name = component_name
self.mapping = mapping self.mapping = mapping
self.type_field_name = type_field_name self.type_field_name = type_field_name
self.many = many self.many = many
self.partial = False 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(",") ALLOWED_HOSTS += os.getenv("BASEROW_EXTRA_ALLOWED_HOSTS", "").split(",")
INSTALLED_APPS = [ INSTALLED_APPS = [
"daphne",
"django.contrib.auth", "django.contrib.auth",
"django.contrib.contenttypes", "django.contrib.contenttypes",
"django.contrib.sessions", "django.contrib.sessions",
@ -63,7 +64,6 @@ INSTALLED_APPS = [
"rest_framework", "rest_framework",
"rest_framework_simplejwt", "rest_framework_simplejwt",
"corsheaders", "corsheaders",
"channels",
"drf_spectacular", "drf_spectacular",
"djcelery_email", "djcelery_email",
"health_check", "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"
}