feat: upgrade Django version to 3.2

Removing samesite cookies package as we dont need this on Django 3.2
This commit is contained in:
Soban Javed
2021-10-14 13:55:50 +05:00
parent 04492c28f8
commit 8fbee9c23f
3 changed files with 4 additions and 14 deletions

View File

@@ -106,6 +106,8 @@ compile-requirements: $(COMMON_CONSTRAINTS_TXT) ## Re-compile *.in requirements
# This is a temporary solution to override the real common_constraints.txt
# In edx-lint, until the pyjwt constraint in edx-lint has been removed.
# See BOM-2721 for more details.
sed 's/Django<2.3//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
@ export REBUILD='--rebuild'; \
for f in $(REQ_FILES); do \
@@ -122,17 +124,6 @@ compile-requirements: $(COMMON_CONSTRAINTS_TXT) ## Re-compile *.in requirements
sed '/^[dD]jango==/d' requirements/edx/testing.txt > requirements/edx/testing.tmp
mv requirements/edx/testing.tmp requirements/edx/testing.txt
# to avoid multiple entries remove it from django and django30 first and add later.
sed -i '/^[dD]jango-cookies-samesite==/d' requirements/edx/django.txt
sed -i '/^[dD]jango-cookies-samesite==/d' requirements/edx/django30.txt
grep -e "^django-cookies-samesite==" requirements/edx/base.txt >> requirements/edx/django.txt
grep -e "^django-cookies-samesite==" requirements/edx/base.txt >> requirements/edx/django30.txt
# removing django-cookies-samesite from all testing.txt file. It is not require for django32.
# at the time of django32 final upgrade job remove this package from base.in
sed '/^[dD]jango-cookies-samesite==/d' requirements/edx/testing.txt > requirements/edx/testing.tmp
mv requirements/edx/testing.tmp requirements/edx/testing.txt
upgrade: pre-requirements ## update the pip requirements files to use the latest releases satisfying our constraints
$(MAKE) compile-requirements COMPILE_OPTS="--upgrade"

View File

@@ -15,8 +15,8 @@
# celert>5.0.0 hasn't been tested yet, so the constraint will be removed after testing latest version
celery<5.0.0
# edx-platform currently only supported for Django 2.2.x
django<2.3
# edx-platform currently only supported for Django 3.2.x
django<3.3
# Newer versions need celery >= 5.0
django-celery-results<2.1

View File

@@ -43,7 +43,6 @@ defusedxml
Django # Web application framework
django-appconf
django-celery-results # Only used for the CacheBackend for celery results
django-cookies-samesite # Middleware which allows SameSite=None flag for session and csrf cookies in Django<3.0.5
django-config-models # Configuration models for Django allowing config management with auditing
django-cors-headers # Used to allow to configure CORS headers for cross-domain requests
django-countries # Country data for Django forms and model fields