From 7b0ac039f4721959dfb0bb323fc8fa5c6caaff2c Mon Sep 17 00:00:00 2001 From: UsamaSadiq Date: Wed, 20 Sep 2023 13:34:26 +0500 Subject: [PATCH] feat!: Upgrade to Django 4.2 --- .github/workflows/ci.yml | 2 +- Makefile | 12 +----------- requirements/base.txt | 20 ++++++++++---------- requirements/common_constraints.txt | 2 +- requirements/constraints.txt | 5 +++++ requirements/dev.txt | 22 +++++++++++----------- requirements/doc.txt | 24 ++++++++++++------------ requirements/pip-tools.txt | 2 +- requirements/production.txt | 20 ++++++++++---------- requirements/quality.txt | 20 ++++++++++---------- requirements/test.txt | 22 +++++++++++----------- requirements/validation.txt | 22 +++++++++++----------- 12 files changed, 84 insertions(+), 89 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49e906d5..b2578f84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: python-version: ["3.8"] - django-version: ["pinned", "4.2"] + django-version: ["pinned"] steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 diff --git a/Makefile b/Makefile index 3d01e4c0..c2c89998 100644 --- a/Makefile +++ b/Makefile @@ -111,20 +111,10 @@ $(COMMON_CONSTRAINTS_TXT): upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in - sed 's/Django<2.3//g' requirements/common_constraints.txt > requirements/common_constraints.tmp - mv requirements/common_constraints.tmp requirements/common_constraints.txt # 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-271 for more details. - sed 's/pyjwt\[crypto\]<2.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp - mv requirements/common_constraints.tmp requirements/common_constraints.txt - sed 's/social-auth-core<4.0.3//g' requirements/common_constraints.txt > requirements/common_constraints.tmp - mv requirements/common_constraints.tmp requirements/common_constraints.txt - sed 's/edx-auth-backends<4.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp - mv requirements/common_constraints.tmp requirements/common_constraints.txt - sed 's/edx-drf-extensions<7.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp - mv requirements/common_constraints.tmp requirements/common_constraints.txt - sed 's/drf-jwt<1.19.1//g' requirements/common_constraints.txt > requirements/common_constraints.tmp + sed 's/Django<4.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp mv requirements/common_constraints.tmp requirements/common_constraints.txt # Make sure to compile files after any other files they include! pip-compile --upgrade --rebuild --allow-unsafe -o requirements/pip.txt requirements/pip.in diff --git a/requirements/base.txt b/requirements/base.txt index c5e4dc3b..5e2dfba0 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -19,12 +19,13 @@ backoff==1.10.0 backports-zoneinfo[tzdata]==0.2.1 # via # celery + # django # kombu billiard==4.1.0 # via celery -boto3==1.28.48 +boto3==1.28.51 # via django-ses -botocore==1.31.48 +botocore==1.31.51 # via # boto3 # s3transfer @@ -57,7 +58,7 @@ click-repl==0.3.0 # via celery code-annotations==1.5.0 # via edx-toggles -cryptography==41.0.3 +cryptography==41.0.4 # via # pyjwt # social-auth-core @@ -65,9 +66,9 @@ defusedxml==0.7.1 # via # python3-openid # social-auth-core -django==3.2.21 +django==4.2.5 # via - # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/base.in # django-celery-results # django-cors-headers @@ -105,7 +106,7 @@ django-durationwidget==1.0.5 # via -r requirements/base.in django-extensions==3.2.3 # via -r requirements/base.in -django-filter==23.2 +django-filter==23.3 # via -r requirements/base.in django-log-request-id==2.1.0 # via -r requirements/base.in @@ -159,7 +160,7 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.3 +edx-drf-extensions==8.10.0 # via # -r requirements/base.in # edx-rbac @@ -232,7 +233,6 @@ python3-openid==3.2.0 pytz==2023.3.post1 # via # -r requirements/base.in - # django # django-ses # djangorestframework # drf-yasg @@ -284,7 +284,7 @@ stevedore==5.1.0 # edx-opaque-keys text-unidecode==1.3 # via python-slugify -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # asgiref # edx-opaque-keys @@ -308,5 +308,5 @@ vine==5.0.0 # kombu wcwidth==0.2.6 # via prompt-toolkit -zipp==3.16.2 +zipp==3.17.0 # via -r requirements/base.in diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index d34ab34d..0091b9ec 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -18,7 +18,7 @@ # using LTS django version -Django<4.0 + # elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process. # elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 48753f51..a1a6a6a0 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -23,3 +23,8 @@ wrapt==1.11.* edx-lint<5.3 pylint<2.15 astroid<2.12 + +# Stay on LTS release +# This can be removed once all IDAs have been upgraded to Django 4.2 +# and the global constraint has been updated from Django<4.0 to Django<4.3 +Django<4.3 diff --git a/requirements/dev.txt b/requirements/dev.txt index d350a897..8e0154b5 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -34,16 +34,17 @@ backports-zoneinfo[tzdata]==0.2.1 # via # -r requirements/validation.txt # celery + # django # kombu billiard==4.1.0 # via # -r requirements/validation.txt # celery -boto3==1.28.48 +boto3==1.28.51 # via # -r requirements/validation.txt # django-ses -botocore==1.31.48 +botocore==1.31.51 # via # -r requirements/validation.txt # boto3 @@ -108,7 +109,7 @@ coverage[toml]==7.3.1 # via # -r requirements/validation.txt # pytest-cov -cryptography==41.0.3 +cryptography==41.0.4 # via # -r requirements/validation.txt # pyjwt @@ -130,9 +131,9 @@ dill==0.3.7 # via # -r requirements/validation.txt # pylint -django==3.2.21 +django==4.2.5 # via - # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/validation.txt # django-celery-results # django-cors-headers @@ -173,13 +174,13 @@ django-debug-toolbar==4.2.0 # via -r requirements/dev.in django-durationwidget==1.0.5 # via -r requirements/validation.txt -django-dynamic-fixture==4.0.0 +django-dynamic-fixture==4.0.1 # via -r requirements/validation.txt django-extensions==3.2.3 # via # -r requirements/dev.in # -r requirements/validation.txt -django-filter==23.2 +django-filter==23.3 # via -r requirements/validation.txt django-log-request-id==2.1.0 # via -r requirements/validation.txt @@ -237,7 +238,7 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.3 +edx-drf-extensions==8.10.0 # via # -r requirements/validation.txt # edx-rbac @@ -471,7 +472,6 @@ python3-openid==3.2.0 pytz==2023.3.post1 # via # -r requirements/validation.txt - # django # django-ses # djangorestframework # drf-yasg @@ -566,7 +566,7 @@ tomlkit==0.12.1 # via # -r requirements/validation.txt # pylint -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # -r requirements/validation.txt # annotated-types @@ -616,7 +616,7 @@ wrapt==1.11.2 # -c requirements/constraints.txt # -r requirements/validation.txt # astroid -zipp==3.16.2 +zipp==3.17.0 # via # -r requirements/pip-tools.txt # -r requirements/validation.txt diff --git a/requirements/doc.txt b/requirements/doc.txt index 7350a4f2..4cd75e1e 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -40,6 +40,7 @@ backports-zoneinfo[tzdata]==0.2.1 # via # -r requirements/test.txt # celery + # django # kombu beautifulsoup4==4.12.2 # via pydata-sphinx-theme @@ -47,11 +48,11 @@ billiard==4.1.0 # via # -r requirements/test.txt # celery -boto3==1.28.48 +boto3==1.28.51 # via # -r requirements/test.txt # django-ses -botocore==1.31.48 +botocore==1.31.51 # via # -r requirements/test.txt # boto3 @@ -110,7 +111,7 @@ coverage[toml]==7.3.1 # via # -r requirements/test.txt # pytest-cov -cryptography==41.0.3 +cryptography==41.0.4 # via # -r requirements/test.txt # pyjwt @@ -126,9 +127,9 @@ dill==0.3.7 # via # -r requirements/test.txt # pylint -django==3.2.21 +django==4.2.5 # via - # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/test.txt # django-celery-results # django-cors-headers @@ -165,11 +166,11 @@ django-crum==0.7.9 # edx-toggles django-durationwidget==1.0.5 # via -r requirements/test.txt -django-dynamic-fixture==4.0.0 +django-dynamic-fixture==4.0.1 # via -r requirements/test.txt django-extensions==3.2.3 # via -r requirements/test.txt -django-filter==23.2 +django-filter==23.3 # via -r requirements/test.txt django-log-request-id==2.1.0 # via -r requirements/test.txt @@ -236,7 +237,7 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.3 +edx-drf-extensions==8.10.0 # via # -r requirements/test.txt # edx-rbac @@ -368,7 +369,7 @@ pycparser==2.21 # via # -r requirements/test.txt # cffi -pydata-sphinx-theme==0.13.3 +pydata-sphinx-theme==0.14.0 # via sphinx-book-theme pygments==2.16.1 # via @@ -443,7 +444,6 @@ pytz==2023.3.post1 # via # -r requirements/test.txt # babel - # django # django-ses # djangorestframework # drf-yasg @@ -555,7 +555,7 @@ tomlkit==0.12.1 # via # -r requirements/test.txt # pylint -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # -r requirements/test.txt # asgiref @@ -598,7 +598,7 @@ wrapt==1.11.2 # -c requirements/constraints.txt # -r requirements/test.txt # astroid -zipp==3.16.2 +zipp==3.17.0 # via # -r requirements/test.txt # importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index d2e8e4e5..894fa179 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -23,7 +23,7 @@ tomli==2.0.1 # pyproject-hooks wheel==0.41.2 # via pip-tools -zipp==3.16.2 +zipp==3.17.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/production.txt b/requirements/production.txt index f7ce9cdd..8eea5a42 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -26,16 +26,17 @@ backports-zoneinfo[tzdata]==0.2.1 # via # -r requirements/base.txt # celery + # django # kombu billiard==4.1.0 # via # -r requirements/base.txt # celery -boto3==1.28.48 +boto3==1.28.51 # via # -r requirements/base.txt # django-ses -botocore==1.31.48 +botocore==1.31.51 # via # -r requirements/base.txt # boto3 @@ -83,7 +84,7 @@ code-annotations==1.5.0 # via # -r requirements/base.txt # edx-toggles -cryptography==41.0.3 +cryptography==41.0.4 # via # -r requirements/base.txt # pyjwt @@ -93,9 +94,9 @@ defusedxml==0.7.1 # -r requirements/base.txt # python3-openid # social-auth-core -django==3.2.21 +django==4.2.5 # via - # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/base.txt # django-celery-results # django-cors-headers @@ -134,7 +135,7 @@ django-durationwidget==1.0.5 # via -r requirements/base.txt django-extensions==3.2.3 # via -r requirements/base.txt -django-filter==23.2 +django-filter==23.3 # via -r requirements/base.txt django-log-request-id==2.1.0 # via -r requirements/base.txt @@ -192,7 +193,7 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.3 +edx-drf-extensions==8.10.0 # via # -r requirements/base.txt # edx-rbac @@ -318,7 +319,6 @@ python3-openid==3.2.0 pytz==2023.3.post1 # via # -r requirements/base.txt - # django # django-ses # djangorestframework # drf-yasg @@ -391,7 +391,7 @@ text-unidecode==1.3 # via # -r requirements/base.txt # python-slugify -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # -r requirements/base.txt # asgiref @@ -425,7 +425,7 @@ wcwidth==0.2.6 # via # -r requirements/base.txt # prompt-toolkit -zipp==3.16.2 +zipp==3.17.0 # via -r requirements/base.txt zope-event==5.0 # via gevent diff --git a/requirements/quality.txt b/requirements/quality.txt index 08154e53..a1e8d51a 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -31,16 +31,17 @@ backports-zoneinfo[tzdata]==0.2.1 # via # -r requirements/base.txt # celery + # django # kombu billiard==4.1.0 # via # -r requirements/base.txt # celery -boto3==1.28.48 +boto3==1.28.51 # via # -r requirements/base.txt # django-ses -botocore==1.31.48 +botocore==1.31.51 # via # -r requirements/base.txt # boto3 @@ -93,7 +94,7 @@ code-annotations==1.5.0 # -r requirements/base.txt # edx-lint # edx-toggles -cryptography==41.0.3 +cryptography==41.0.4 # via # -r requirements/base.txt # pyjwt @@ -105,9 +106,9 @@ defusedxml==0.7.1 # social-auth-core dill==0.3.7 # via pylint -django==3.2.21 +django==4.2.5 # via - # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/base.txt # django-celery-results # django-cors-headers @@ -146,7 +147,7 @@ django-durationwidget==1.0.5 # via -r requirements/base.txt django-extensions==3.2.3 # via -r requirements/base.txt -django-filter==23.2 +django-filter==23.3 # via -r requirements/base.txt django-log-request-id==2.1.0 # via -r requirements/base.txt @@ -204,7 +205,7 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.3 +edx-drf-extensions==8.10.0 # via # -r requirements/base.txt # edx-rbac @@ -352,7 +353,6 @@ python3-openid==3.2.0 pytz==2023.3.post1 # via # -r requirements/base.txt - # django # django-ses # djangorestframework # drf-yasg @@ -430,7 +430,7 @@ tomli==2.0.1 # via pylint tomlkit==0.12.1 # via pylint -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # -r requirements/base.txt # asgiref @@ -470,7 +470,7 @@ wrapt==1.11.2 # via # -c requirements/constraints.txt # astroid -zipp==3.16.2 +zipp==3.17.0 # via -r requirements/base.txt # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/test.txt b/requirements/test.txt index cca27557..21892abe 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -31,16 +31,17 @@ backports-zoneinfo[tzdata]==0.2.1 # via # -r requirements/base.txt # celery + # django # kombu billiard==4.1.0 # via # -r requirements/base.txt # celery -boto3==1.28.48 +boto3==1.28.51 # via # -r requirements/base.txt # django-ses -botocore==1.31.48 +botocore==1.31.51 # via # -r requirements/base.txt # boto3 @@ -98,7 +99,7 @@ coverage[toml]==7.3.1 # via # -r requirements/test.in # pytest-cov -cryptography==41.0.3 +cryptography==41.0.4 # via # -r requirements/base.txt # pyjwt @@ -112,9 +113,9 @@ defusedxml==0.7.1 # social-auth-core dill==0.3.7 # via pylint -django==3.2.21 +django==4.2.5 # via - # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/base.txt # django-celery-results # django-cors-headers @@ -151,11 +152,11 @@ django-crum==0.7.9 # edx-toggles django-durationwidget==1.0.5 # via -r requirements/base.txt -django-dynamic-fixture==4.0.0 +django-dynamic-fixture==4.0.1 # via -r requirements/test.in django-extensions==3.2.3 # via -r requirements/base.txt -django-filter==23.2 +django-filter==23.3 # via -r requirements/base.txt django-log-request-id==2.1.0 # via -r requirements/base.txt @@ -213,7 +214,7 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.3 +edx-drf-extensions==8.10.0 # via # -r requirements/base.txt # edx-rbac @@ -378,7 +379,6 @@ python3-openid==3.2.0 pytz==2023.3.post1 # via # -r requirements/base.txt - # django # django-ses # djangorestframework # drf-yasg @@ -457,7 +457,7 @@ tomli==2.0.1 # pytest tomlkit==0.12.1 # via pylint -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # -r requirements/base.txt # asgiref @@ -498,7 +498,7 @@ wrapt==1.11.2 # via # -c requirements/constraints.txt # astroid -zipp==3.16.2 +zipp==3.17.0 # via -r requirements/base.txt # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/validation.txt b/requirements/validation.txt index ca19868b..574290d3 100644 --- a/requirements/validation.txt +++ b/requirements/validation.txt @@ -40,18 +40,19 @@ backports-zoneinfo[tzdata]==0.2.1 # -r requirements/quality.txt # -r requirements/test.txt # celery + # django # kombu billiard==4.1.0 # via # -r requirements/quality.txt # -r requirements/test.txt # celery -boto3==1.28.48 +boto3==1.28.51 # via # -r requirements/quality.txt # -r requirements/test.txt # django-ses -botocore==1.31.48 +botocore==1.31.51 # via # -r requirements/quality.txt # -r requirements/test.txt @@ -121,7 +122,7 @@ coverage[toml]==7.3.1 # via # -r requirements/test.txt # pytest-cov -cryptography==41.0.3 +cryptography==41.0.4 # via # -r requirements/quality.txt # -r requirements/test.txt @@ -140,9 +141,9 @@ dill==0.3.7 # -r requirements/quality.txt # -r requirements/test.txt # pylint -django==3.2.21 +django==4.2.5 # via - # -c requirements/common_constraints.txt + # -c requirements/constraints.txt # -r requirements/quality.txt # -r requirements/test.txt # django-celery-results @@ -188,13 +189,13 @@ django-durationwidget==1.0.5 # via # -r requirements/quality.txt # -r requirements/test.txt -django-dynamic-fixture==4.0.0 +django-dynamic-fixture==4.0.1 # via -r requirements/test.txt django-extensions==3.2.3 # via # -r requirements/quality.txt # -r requirements/test.txt -django-filter==23.2 +django-filter==23.3 # via # -r requirements/quality.txt # -r requirements/test.txt @@ -279,7 +280,7 @@ edx-django-utils==5.7.0 # edx-drf-extensions # edx-rest-api-client # edx-toggles -edx-drf-extensions==8.9.3 +edx-drf-extensions==8.10.0 # via # -r requirements/quality.txt # -r requirements/test.txt @@ -521,7 +522,6 @@ pytz==2023.3.post1 # via # -r requirements/quality.txt # -r requirements/test.txt - # django # django-ses # djangorestframework # drf-yasg @@ -629,7 +629,7 @@ tomlkit==0.12.1 # -r requirements/quality.txt # -r requirements/test.txt # pylint -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via # -r requirements/quality.txt # -r requirements/test.txt @@ -679,7 +679,7 @@ wrapt==1.11.2 # -r requirements/quality.txt # -r requirements/test.txt # astroid -zipp==3.16.2 +zipp==3.17.0 # via # -r requirements/quality.txt # -r requirements/test.txt