From 4e8c9c38546cf56d0a44ba590ee32ce488795c04 Mon Sep 17 00:00:00 2001 From: Asad Iqbal Date: Fri, 21 Jan 2022 14:58:07 +0500 Subject: [PATCH] Django Version bump to 3.2p --- authentication/middleware_test.py | 2 +- cms/embeds.py | 2 +- .../0051_new_page_data_migrations.py | 2 +- cms/models.py | 2 +- ecommerce/api_test.py | 12 +- pytest.ini | 1 + requirements.in | 10 +- requirements.txt | 167 +++++++++--------- 8 files changed, 102 insertions(+), 96 deletions(-) diff --git a/authentication/middleware_test.py b/authentication/middleware_test.py index 53053b40fa..fbf4a4a63b 100644 --- a/authentication/middleware_test.py +++ b/authentication/middleware_test.py @@ -20,7 +20,7 @@ def test_process_exception_no_strategy(rf, settings): def test_process_exception(rf, settings): """Tests that a process_exception handles auth exceptions correctly""" settings.DEBUG = False - msg = "error message" + msg = "This account is already in use." request = rf.get(reverse("social:complete", args=("email",))) # social_django depends on request.sesssion, so use the middleware to set that SessionMiddleware().process_request(request) diff --git a/cms/embeds.py b/cms/embeds.py index f5fa2b8fce..771f5034f4 100644 --- a/cms/embeds.py +++ b/cms/embeds.py @@ -30,7 +30,7 @@ def __init__(self, providers=None, options=None): super().__init__(providers=providers, options=options) - def find_embed(self, url, max_width=None): + def find_embed(self, url, max_width=None): # pylint: disable=arguments-differ embed = super().find_embed(url, max_width) embed_tag = BeautifulSoup(embed["html"], "html.parser") player_iframe = embed_tag.find("iframe") diff --git a/cms/migrations/0051_new_page_data_migrations.py b/cms/migrations/0051_new_page_data_migrations.py index 01cc82ec1f..5ba437b10b 100644 --- a/cms/migrations/0051_new_page_data_migrations.py +++ b/cms/migrations/0051_new_page_data_migrations.py @@ -238,7 +238,7 @@ def reverse_migrate_data(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ("wagtailcore", "0059_apply_collection_ordering"), + ("wagtailcore", "0062_comment_models_and_pagesubscription"), ("cms", "0050_news_and_events_page"), ] diff --git a/cms/models.py b/cms/models.py index 192f17b339..f55796c488 100644 --- a/cms/models.py +++ b/cms/models.py @@ -9,7 +9,7 @@ import pytz from django.conf import settings -from django.contrib.staticfiles.templatetags.staticfiles import static +from django.templatetags.static import static from django.db import models from django.http.response import Http404 from django.shortcuts import reverse diff --git a/ecommerce/api_test.py b/ecommerce/api_test.py index 9eece436f5..e57a54a124 100644 --- a/ecommerce/api_test.py +++ b/ecommerce/api_test.py @@ -227,19 +227,21 @@ def test_signed_payload(mocker, has_coupon, has_company, is_program_product, use "amount": str(total_price), "consumer_id": username, "currency": "USD", - "item_0_code": "program" if is_program_product else "course run", + "item_0_code": "courses | program" + if is_program_product + else "courses | course run", "item_0_name": line1.product_version.description, "item_0_quantity": line1.quantity, "item_0_sku": line1.product_version.product.content_object.id, "item_0_tax_amount": "0", "item_0_unit_price": str(line1.product_version.price), - "item_1_code": "course run", + "item_1_code": "courses | course run", "item_1_name": line2.product_version.description, "item_1_quantity": line2.quantity, "item_1_sku": line2.product_version.product.content_object.id, "item_1_tax_amount": "0", "item_1_unit_price": str(line2.product_version.price), - "item_2_code": "program", + "item_2_code": "courses | program", "item_2_name": line3.product_version.description, "item_2_quantity": line3.quantity, "item_2_sku": line3.product_version.product.content_object.id, @@ -256,7 +258,9 @@ def test_signed_payload(mocker, has_coupon, has_company, is_program_product, use "transaction_type": "sale", "transaction_uuid": transaction_uuid, "unsigned_field_names": "", - "merchant_defined_data1": "program" if is_program_product else "course run", + "merchant_defined_data1": "courses | program" + if is_program_product + else "courses | course run", "merchant_defined_data2": content_object.readable_id if is_program_product else content_object.courseware_id, diff --git a/pytest.ini b/pytest.ini index 5e0269b695..c6fc2b347b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -7,6 +7,7 @@ filterwarnings = ignore:Failed to load HostKeys ignore:Coverage disabled via --no-cov switch! ignore:.*Not importing directory.*:ImportWarning + ignore:.*:django.utils.deprecation.RemovedInDjango41Warning env = CELERY_TASK_ALWAYS_EAGER=True CYBERSOURCE_WSDL_URL= diff --git a/requirements.in b/requirements.in index 012595464a..10b4aae77b 100644 --- a/requirements.in +++ b/requirements.in @@ -3,14 +3,14 @@ celery==4.3.0 celery-redbeat==0.13.0 boto3==1.16.63 dj-database-url==0.5.0 -django==2.2.25 -django-anymail[mailgun]==6.1.0 +django +django-anymail[mailgun]==8.4 django-filter==2.3.0 django-hijack==2.1.10 django-hijack-admin==2.1.10 django-ipware==3.0.0 -django-redis==4.10.0 -django-robots==3.1.0 +django-redis~=5.0.0 +django-robots~=4.0.0 django-server-status==0.6.0 django-webpack-loader==0.7.0 django-oauth-toolkit==1.4.0 @@ -44,7 +44,7 @@ ua-parser==0.8.0 user-agents==2.0 user-util==0.1.5 uwsgi -wagtail==2.12.5 +wagtail==2.13.4 wagtail-metadata==3.3.0 zeep==3.4.0 flaky==3.7.0 diff --git a/requirements.txt b/requirements.txt index 0513c07df8..8d746ed473 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,26 +4,28 @@ # # pip-compile # -amqp==2.5.0 +amqp==2.6.1 # via kombu -anyascii==0.2.0 +anyascii==0.3.0 # via wagtail -appdirs==1.4.3 +appdirs==1.4.4 # via zeep -asgiref==3.3.4 - # via djoser -attrs==19.1.0 +asgiref==3.5.0 + # via + # django + # djoser +attrs==21.4.0 # via # pytest # zeep -backcall==0.1.0 +backcall==0.2.0 # via ipython beautifulsoup4==4.8.2 # via # -r requirements.in # mitol-django-mail # wagtail -billiard==3.6.0.0 +billiard==3.6.4.0 # via celery boto3==1.16.63 # via -r requirements.in @@ -31,9 +33,9 @@ botocore==1.19.63 # via # boto3 # s3transfer -cached-property==1.5.1 +cached-property==1.5.2 # via zeep -cachetools==3.1.1 +cachetools==5.0.0 # via # google-auth # premailer @@ -44,42 +46,41 @@ celery==4.3.0 # django-server-status celery-redbeat==0.13.0 # via -r requirements.in -certifi==2019.6.16 +certifi==2021.10.8 # via + # elasticsearch # requests # sentry-sdk -cffi==1.12.3 +cffi==1.15.0 # via # cryptography # pynacl -chardet==3.0.4 +charset-normalizer==2.0.10 # via requests -click==7.0 +click==8.0.3 # via user-util coreapi==2.3.3 # via djoser coreschema==0.0.4 # via coreapi -cryptography==3.4.4 +cryptography==36.0.1 # via # pyopenssl # social-auth-core cssselect==1.1.0 # via premailer -cssutils==1.0.2 +cssutils==2.3.0 # via premailer -decorator==4.4.0 - # via - # ipython - # traitlets -defusedxml==0.6.0 +decorator==5.1.1 + # via ipython +defusedxml==0.7.1 # via # python3-openid # social-auth-core # zeep dj-database-url==0.5.0 # via -r requirements.in -django==2.2.25 +django==3.2.11 # via # -r requirements.in # django-anymail @@ -98,7 +99,7 @@ django==2.2.25 # mitol-django-mail # mitol-django-oauth-toolkit-extensions # wagtail -django-anymail[mailgun]==6.1.0 +django-anymail[mailgun]==8.4 # via # -r requirements.in # mitol-django-authentication @@ -119,22 +120,22 @@ django-hijack-admin==2.1.10 # via -r requirements.in django-ipware==3.0.0 # via -r requirements.in -django-modelcluster==5.1 +django-modelcluster==5.2 # via wagtail django-oauth-toolkit==1.4.0 # via # -r requirements.in # mitol-django-digital-credentials # mitol-django-oauth-toolkit-extensions -django-redis==4.10.0 +django-redis==5.0.0 # via -r requirements.in -django-robots==3.1.0 +django-robots==4.0 # via -r requirements.in django-server-status==0.6.0 # via -r requirements.in django-storages==1.7.1 # via -r requirements.in -django-taggit==1.4.0 +django-taggit==1.5.1 # via wagtail django-templated-mail==1.1.1 # via djoser @@ -153,7 +154,7 @@ djangorestframework==3.12.4 # mitol-django-authentication # mitol-django-digital-credentials # wagtail -djangorestframework-simplejwt==4.6.0 +djangorestframework-simplejwt==4.8.0 # via djoser djoser==2.1.0 # via @@ -165,7 +166,7 @@ drf-flex-fields==0.8.5 # via -r requirements.in edx-api-client==0.10.0 # via -r requirements.in -elasticsearch==7.0.2 +elasticsearch==7.16.3 # via django-server-status et-xmlfile==1.1.0 # via openpyxl @@ -174,7 +175,7 @@ factory-boy==3.2.1 # mitol-django-common # mitol-django-digital-credentials # mitol-django-oauth-toolkit-extensions -faker==9.8.0 +faker==11.3.0 # via factory-boy flaky==3.7.0 # via -r requirements.in @@ -188,54 +189,55 @@ google-auth==1.6.3 # google-api-python-client # google-auth-httplib2 # google-auth-oauthlib -google-auth-httplib2==0.0.3 +google-auth-httplib2==0.1.0 # via google-api-python-client -google-auth-oauthlib==0.4.0 +google-auth-oauthlib==0.4.6 # via pygsheets html5lib==1.1 # via # mitol-django-mail # wagtail -httplib2==0.19.0 +httplib2==0.20.2 # via # google-api-python-client # google-auth-httplib2 -idna==2.8 +idna==3.3 # via requests importlib-metadata==1.7.0 # via + # click + # cssutils # djoser + # kombu # pluggy # pytest iniconfig==1.1.1 # via pytest ipython==7.31.1 # via -r requirements.in -ipython-genutils==0.2.0 - # via traitlets -isodate==0.6.0 +isodate==0.6.1 # via zeep itypes==1.2.0 # via coreapi jedi==0.18.1 # via ipython -jinja2==2.11.3 +jinja2==3.0.3 # via coreschema -jmespath==0.9.4 +jmespath==0.10.0 # via # boto3 # botocore -kombu==4.6.3 +kombu==4.6.11 # via # celery # django-server-status -l18n==2020.6.1 +l18n==2021.3 # via wagtail -lxml==4.6.5 +lxml==4.7.1 # via # premailer # zeep -markupsafe==1.1.1 +markupsafe==2.0.1 # via jinja2 matplotlib-inline==0.1.3 # via ipython @@ -256,22 +258,22 @@ mitol-django-mail==3.0.1 # mitol-django-authentication mitol-django-oauth-toolkit-extensions==1.0.1 # via -r requirements.in -newrelic==4.20.1.121 +newrelic==7.4.0.172 # via -r requirements.in -oauthlib==3.1.0 +oauthlib==3.1.1 # via # django-oauth-toolkit # requests-oauthlib # social-auth-core -openpyxl==3.0.7 +openpyxl==3.0.9 # via tablib -packaging==21.2 +packaging==21.3 # via pytest parso==0.8.3 # via jedi pdftotext==2.1.1 # via -r requirements.in -pexpect==4.7.0 +pexpect==4.8.0 # via ipython pickleshare==0.7.5 # via ipython @@ -281,33 +283,33 @@ pillow==8.3.2 # wagtail pluggy==0.13.1 # via pytest -premailer==3.7.0 +premailer==3.10.0 # via mitol-django-mail -prompt-toolkit==2.0.9 +prompt-toolkit==3.0.24 # via ipython psycopg2==2.8.3 # via # -r requirements.in # django-server-status -ptyprocess==0.6.0 +ptyprocess==0.7.0 # via pexpect py==1.11.0 # via pytest -pyasn1==0.4.7 +pyasn1==0.4.8 # via # pyasn1-modules # rsa -pyasn1-modules==0.2.6 +pyasn1-modules==0.2.8 # via google-auth pycountry==19.7.15 # via -r requirements.in -pycparser==2.19 +pycparser==2.21 # via cffi -pygments==2.7.4 +pygments==2.11.2 # via ipython pygsheets==2.0.2 # via -r requirements.in -pyjwt==2.0.1 +pyjwt==2.3.0 # via # djangorestframework-simplejwt # social-auth-core @@ -315,7 +317,7 @@ pynacl==1.3.0 # via -r requirements.in pyopenssl==17.5.0 # via django-server-status -pyparsing==2.4.7 +pyparsing==3.0.7 # via # httplib2 # packaging @@ -327,9 +329,9 @@ python-dateutil==2.5.3 # celery-redbeat # edx-api-client # faker -python3-openid==3.1.0 +python3-openid==3.2.0 # via social-auth-core -pytz==2020.4 +pytz==2021.3 # via # celery # django @@ -344,7 +346,7 @@ redis==3.2.1 # celery-redbeat # django-redis # django-server-status -requests==2.25.1 +requests==2.27.1 # via # -r requirements.in # coreapi @@ -360,51 +362,50 @@ requests==2.25.1 # social-auth-core # wagtail # zeep -requests-oauthlib==1.2.0 +requests-oauthlib==1.3.0 # via # google-auth-oauthlib # social-auth-core requests-toolbelt==0.9.1 # via zeep -rsa==4.7 +rsa==4.8 # via google-auth s3transfer==0.3.7 # via boto3 -sentry-sdk==1.1.0 +sentry-sdk==1.5.4 # via -r requirements.in -six==1.12.0 +six==1.16.0 # via - # django-anymail # django-compat # django-server-status # edx-api-client # google-api-python-client # google-auth + # google-auth-httplib2 # html5lib # isodate # l18n - # prompt-toolkit # pynacl # pyopenssl # python-dateutil # social-auth-app-django - # tenacity - # traitlets # zeep social-auth-app-django==4.0.0 # via # -r requirements.in # djoser # mitol-django-authentication -social-auth-core==4.0.3 +social-auth-core==4.2.0 # via social-auth-app-django -soupsieve==2.0.1 +soupsieve==2.3.1 # via beautifulsoup4 -sqlparse==0.3.0 +sqlparse==0.4.2 # via django -tablib[xls,xlsx]==3.0.0 +tablib[xls,xlsx]==3.1.0 + # via wagtail +telepath==0.2 # via wagtail -tenacity==6.1.0 +tenacity==8.0.1 # via celery-redbeat text-unidecode==1.3 # via faker @@ -412,11 +413,11 @@ toml==0.10.2 # via pytest toolz==0.11.2 # via mitol-django-mail -traitlets==4.3.2 +traitlets==5.1.1 # via # ipython # matplotlib-inline -typing-extensions==3.10.0.2 +typing-extensions==4.0.1 # via # asgiref # faker @@ -424,13 +425,13 @@ ua-parser==0.8.0 # via # -r requirements.in # user-agents -ulid-py==0.0.9 +ulid-py==1.1.0 # via -r requirements.in -uritemplate==3.0.0 +uritemplate==3.0.1 # via # coreapi # google-api-python-client -urllib3==1.26.5 +urllib3==1.26.8 # via # botocore # elasticsearch @@ -442,19 +443,19 @@ user-agents==2.0 # django-user-agents user-util==0.1.5 # via -r requirements.in -uwsgi==2.0.18 +uwsgi==2.0.20 # via -r requirements.in vine==1.3.0 # via # amqp # celery -wagtail==2.12.5 +wagtail==2.13.4 # via # -r requirements.in # wagtail-metadata wagtail-metadata==3.3.0 # via -r requirements.in -wcwidth==0.1.7 +wcwidth==0.2.5 # via prompt-toolkit webencodings==0.5.1 # via html5lib @@ -462,13 +463,13 @@ willow==1.4 # via wagtail xlrd==2.0.1 # via tablib -xlsxwriter==1.3.7 +xlsxwriter==1.4.5 # via wagtail xlwt==1.3.0 # via tablib zeep==3.4.0 # via -r requirements.in -zipp==3.4.1 +zipp==3.7.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: