From 2159c93ef332362ea929d6a760e1451e7343edb4 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Tue, 25 Feb 2020 12:00:09 +0100 Subject: [PATCH] Dependency care - upgrade to django 3 --- api/funkwhale_api/audio/serializers.py | 2 +- api/funkwhale_api/users/models.py | 2 -- api/requirements/base.txt | 46 +++++++++++++------------- api/tests/audio/test_serializers.py | 2 +- 4 files changed, 25 insertions(+), 27 deletions(-) diff --git a/api/funkwhale_api/audio/serializers.py b/api/funkwhale_api/audio/serializers.py index a162ae9c0..4a093ad8b 100644 --- a/api/funkwhale_api/audio/serializers.py +++ b/api/funkwhale_api/audio/serializers.py @@ -3,7 +3,7 @@ from django.db import transaction from rest_framework import serializers -from django.contrib.staticfiles.templatetags.staticfiles import static +from django.templatetags.static import static from funkwhale_api.common import serializers as common_serializers from funkwhale_api.common import utils as common_utils diff --git a/api/funkwhale_api/users/models.py b/api/funkwhale_api/users/models.py index 16212e975..c920503cd 100644 --- a/api/funkwhale_api/users/models.py +++ b/api/funkwhale_api/users/models.py @@ -14,7 +14,6 @@ from django.db import models from django.dispatch import receiver from django.urls import reverse from django.utils import timezone -from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from django_auth_ldap.backend import populate_user as ldap_populate_user @@ -93,7 +92,6 @@ def get_default_funkwhale_support_message_display_date(): ) -@python_2_unicode_compatible class User(AbstractUser): # First Name and Last Name do not cover name patterns diff --git a/api/requirements/base.txt b/api/requirements/base.txt index 87a36dae5..6fd74ae87 100644 --- a/api/requirements/base.txt +++ b/api/requirements/base.txt @@ -1,5 +1,5 @@ # Bleeding edge Django -django>=2.2.4,<2.3 +django>=3.0.3,<3.1 setuptools>=36 # Configuration django-environ>=0.4,<0.5 @@ -9,27 +9,27 @@ Pillow>=6.2,<7 # For user registration, either via email or social # Well-built with regular release cycles! -django-allauth>=0.39,<0.40 +django-allauth>=0.41,<0.42 # Python-PostgreSQL Database Adapter psycopg2-binary>=2.8,<=2.9 # Time zones support -pytz==2019.1 +pytz==2019.3 # Redis support -django-redis>=4.10,<4.11 -redis>=3.2,<3.3 +django-redis>=4.11,<4.12 +redis>=3.4,<3.5 kombu>=4.5,<4.6 celery>=4.3,<4.4 # Your custom requirements go here -django-cors-headers>=2.5.3,<2.6 +django-cors-headers>=3.2,<3.3 musicbrainzngs==0.6 -djangorestframework>=3.10,<3.11 +djangorestframework>=3.11,<3.12 djangorestframework-jwt>=1.11,<1.12 pendulum>=2,<3 persisting-theory>=0.2,<0.3 @@ -37,41 +37,41 @@ django-versatileimagefield>=2.0,<2.1 django-filter>=2.1,<2.2 django-rest-auth>=0.9,<0.10 ipython>=7,<8 -mutagen>=1.42,<1.43 +mutagen>=1.44,<1.45 pymemoize==1.0.3 -django-dynamic-preferences>=1.7.1,<1.8 +django-dynamic-preferences>=1.8.1,<1.9 raven>=6.10,<7 python-magic==0.4.15 -# XXX: until https://github.com/django/channels/issues/1240 is fixed -channels==2.1.6 -channels_redis>=2.3,<2.4 -daphne>=2.2,<2.3 -uvicorn -gunicorn +channels>=2.4,<2.5 +# XXX: increase when compat with Python 3.5 isn't needed anymore +channels_redis>=2.3.2,<2.4 +uvicorn==0.8.6; python_version < '3.6' +uvicorn>=0.11.3,<0.12; python_version > '3.5' +gunicorn>=20.0.4,<20.1 -cryptography>=2,<3 +cryptography>=2.8,<3 # requests-http-signature==0.0.3 # clone until the branch is merged and released upstream git+https://github.com/EliotBerriot/requests-http-signature.git@signature-header-support -django-cleanup==3.2.0 +django-cleanup>=4,<4.1 requests>=2.22<2.23 pyOpenSSL>=19<20 # for LDAP authentication -python-ldap==3.2.0 -django-auth-ldap==1.7.0 -pydub==0.23.1 +python-ldap>=3.2.0,<3.3 +django-auth-ldap>=2.1.0,<2.2 +pydub>=0.23.1,<0.24 pyld==1.0.4 -aiohttp==3.5.4 +aiohttp>=3.6,<3.7 autobahn>=19.3.3 django-oauth-toolkit==1.2 -django-storages==1.7.1 +django-storages>=1.9.1,<1.10 boto3<3 -unicode-slugify +unicode-slugify==0.1.3 django-cacheops==4.2 click>=7,<8 diff --git a/api/tests/audio/test_serializers.py b/api/tests/audio/test_serializers.py index 901de126b..7f2bc77a6 100644 --- a/api/tests/audio/test_serializers.py +++ b/api/tests/audio/test_serializers.py @@ -3,7 +3,7 @@ import datetime import pytest import pytz -from django.contrib.staticfiles.templatetags.staticfiles import static +from django.templatetags.static import static from funkwhale_api.audio import serializers from funkwhale_api.common import serializers as common_serializers