From cc6cacd7f89f11200fc73afc7021a34b3a150a03 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Sun, 10 Sep 2023 22:28:38 +0500 Subject: [PATCH 1/6] feat!: upgrading django4.2 version. --- .github/workflows/migrations-check.yml | 4 +-- Makefile | 2 ++ openedx/core/djangoapps/theming/storage.py | 39 ++++++++++++---------- requirements/common_constraints.txt | 2 +- requirements/constraints.txt | 3 ++ requirements/edx/development.txt | 1 + 6 files changed, 31 insertions(+), 20 deletions(-) diff --git a/.github/workflows/migrations-check.yml b/.github/workflows/migrations-check.yml index 18505b8f1b8b..732ca90c2c2f 100644 --- a/.github/workflows/migrations-check.yml +++ b/.github/workflows/migrations-check.yml @@ -18,9 +18,9 @@ jobs: # 'pinned' is used to install the latest patch version of Django # within the global constraint i.e. Django==3.2.21 in current case # because we have global constraint of Django<4.2 - django-version: ["pinned", "4.2"] + django-version: ["pinned"] mongo-version: ["4"] - mysql-version: ["5.7", "8"] + mysql-version: ["8"] # excluding mysql5.7 with Django 4.2 since Django 4.2 has # dropped support for MySQL<8 exclude: diff --git a/Makefile b/Makefile index bc5a79712e29..089d472bea50 100644 --- a/Makefile +++ b/Makefile @@ -122,6 +122,8 @@ compile-requirements: pre-requirements $(COMMON_CONSTRAINTS_TXT) ## Re-compile * @# time someone tries to use the outputs. sed '/^django-simple-history==/d' requirements/common_constraints.txt > requirements/common_constraints.tmp mv requirements/common_constraints.tmp requirements/common_constraints.txt + sed 's/Django<4.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp + mv requirements/common_constraints.tmp requirements/common_constraints.txt pip-compile -v --allow-unsafe ${COMPILE_OPTS} -o requirements/pip.txt requirements/pip.in pip install -r requirements/pip.txt diff --git a/openedx/core/djangoapps/theming/storage.py b/openedx/core/djangoapps/theming/storage.py index e8e3eefcd3d7..93985e4c9d50 100644 --- a/openedx/core/djangoapps/theming/storage.py +++ b/openedx/core/djangoapps/theming/storage.py @@ -192,51 +192,56 @@ def converter(matchobj): This requires figuring out which files the matched URL resolves to and calling the url() method of the storage. """ - matched, url = matchobj.groups() + matches = matchobj.groupdict() + matched = matches["matched"] + url = matches["url"] # Ignore absolute/protocol-relative and data-uri URLs. - if re.match(r'^[a-z]+:', url): + if re.match(r"^[a-z]+:", url): return matched # Ignore absolute URLs that don't point to a static file (dynamic # CSS / JS?). Note that STATIC_URL cannot be empty. - if url.startswith('/') and not url.startswith(settings.STATIC_URL): + if url.startswith("/") and not url.startswith(settings.STATIC_URL): return matched # Strip off the fragment so a path-like fragment won't interfere. url_path, fragment = urldefrag(url) - if url_path.startswith('/'): + # Ignore URLs without a path + if not url_path: + return matched + + if url_path.startswith("/"): # Otherwise the condition above would have returned prematurely. assert url_path.startswith(settings.STATIC_URL) target_name = url_path[len(settings.STATIC_URL):] else: # We're using the posixpath module to mix paths and URLs conveniently. - source_name = name if os.sep == '/' else name.replace(os.sep, '/') + source_name = name if os.sep == "/" else name.replace(os.sep, "/") target_name = posixpath.join(posixpath.dirname(source_name), url_path) # Determine the hashed name of the target file with the storage backend. hashed_url = self._url( - self._stored_name, unquote(target_name), - force=True, hashed_files=hashed_files, + self._stored_name, + unquote(target_name), + force=True, + hashed_files=hashed_files, ) - # NOTE: - # The line below was commented out so that absolute urls are used instead of relative urls to make themed - # assets work correctly. - # - # The line is commented and not removed to make future django upgrade easier and show exactly what is - # changed in this method override - # - #transformed_url = '/'.join(url_path.split('/')[:-1] + hashed_url.split('/')[-1:]) + # transformed_url = "/".join( + # url_path.split("/")[:-1] + hashed_url.split("/")[-1:] + # ) + transformed_url = hashed_url # This line was added. # Restore the fragment that was stripped off earlier. if fragment: - transformed_url += ('?#' if '?#' in url else '#') + fragment + transformed_url += ("?#" if "?#" in url else "#") + fragment # Return the hashed version to the file - return template % unquote(transformed_url) + matches["url"] = unquote(transformed_url) + return template % matches return converter diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index d1be149855f8..a0d4097134f6 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -17,7 +17,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 e80db0b54320..73e2a2e109a0 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -117,6 +117,9 @@ djangorestframework-stubs==3.14.0 # Pinned to match django-stubs. Remove this w # https://github.com/openedx/edx-platform/issues/31616 libsass==0.10.0 +# incremental upgrade +django-simple-history==3.4.0 + # greater version breaking upgrade builds click==8.1.6 diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 95c68b314c75..ecd2657af839 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -556,6 +556,7 @@ django-ses==3.5.0 # -r requirements/edx/testing.txt django-simple-history==3.4.0 # via + # -c requirements/edx/../constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-enterprise From 39370213f32dc39e86bc9c9cddb93108516c0e07 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Fri, 13 Oct 2023 20:27:24 +0500 Subject: [PATCH 2/6] feat!: updating default algorithm to sha256. --- cms/envs/common.py | 4 ++-- lms/envs/common.py | 4 ++-- .../djangoapps/safe_sessions/tests/test_safe_cookie_data.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index 10c70bc98215..b433ea6a5f07 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -1086,8 +1086,8 @@ } DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' -DEFAULT_HASHING_ALGORITHM = 'sha1' - +# This will be overridden through CMS config +DEFAULT_HASHING_ALGORITHM = 'sha256' #################### Python sandbox ############################################ CODE_JAIL = { diff --git a/lms/envs/common.py b/lms/envs/common.py index 3a6f8d95d0ad..8366c57f747f 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1734,8 +1734,8 @@ def _make_mako_template_dirs(settings): DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' -DEFAULT_HASHING_ALGORITHM = 'sha1' - +# This will be overridden through LMS config +DEFAULT_HASHING_ALGORITHM = 'sha256' #################### Python sandbox ############################################ CODE_JAIL = { diff --git a/openedx/core/djangoapps/safe_sessions/tests/test_safe_cookie_data.py b/openedx/core/djangoapps/safe_sessions/tests/test_safe_cookie_data.py index 47efa626ec99..650a8d157baf 100644 --- a/openedx/core/djangoapps/safe_sessions/tests/test_safe_cookie_data.py +++ b/openedx/core/djangoapps/safe_sessions/tests/test_safe_cookie_data.py @@ -236,7 +236,7 @@ def test_pinned_values(self): "|HvGnjXf1b3jU" "|ImExZWZiNzVlZGFmM2FkZWZmYjM4YjI0ZmZkOWU4MzExODU0MTk4NmVlNGRiYzBlODdhYWUzOGM5MzVlNzk4NjUi" ":1m6Hve" - ":OMhY2FL2pudJjSSXChtI-zR8QVA" + ":Pra4iochviPvKUoIV33gdVZFDgG-cMDlIYfl8iFIMaY" ) @pytest.mark.skipif(django.VERSION[0] < 4, reason="For django42 default algorithm is sha256. No need for django32.") From 79fad1b26ae660ffdb9055b423c76561519514ed Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Tue, 17 Oct 2023 13:46:48 +0500 Subject: [PATCH 3/6] feat!: Upgrading to django42. --- cms/envs/common.py | 2 +- cms/envs/production.py | 5 ----- lms/envs/common.py | 2 +- lms/envs/production.py | 5 ----- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/doc.txt | 2 +- requirements/edx/testing.txt | 2 +- 8 files changed, 6 insertions(+), 16 deletions(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index b433ea6a5f07..d5e561aa9cf9 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -831,7 +831,6 @@ CROSS_DOMAIN_CSRF_COOKIE_DOMAIN = '' CROSS_DOMAIN_CSRF_COOKIE_NAME = '' CSRF_TRUSTED_ORIGINS = [] -CSRF_TRUSTED_ORIGINS_WITH_SCHEME = [] #################### CAPA External Code Evaluation ############################# XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds @@ -1088,6 +1087,7 @@ DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' # This will be overridden through CMS config DEFAULT_HASHING_ALGORITHM = 'sha256' + #################### Python sandbox ############################################ CODE_JAIL = { diff --git a/cms/envs/production.py b/cms/envs/production.py index 213243fa8237..fbb5bba50140 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -237,11 +237,6 @@ def get_env_setting(setting): # by end users. CSRF_COOKIE_SECURE = ENV_TOKENS.get('CSRF_COOKIE_SECURE', False) -# values are already updated above with default CSRF_TRUSTED_ORIGINS values but in -# case of new django version these values will override. -if django.VERSION[0] >= 4: # for greater than django 3.2 use schemes. - CSRF_TRUSTED_ORIGINS = ENV_TOKENS.get('CSRF_TRUSTED_ORIGINS_WITH_SCHEME', []) - #Email overrides MKTG_URL_LINK_MAP.update(ENV_TOKENS.get('MKTG_URL_LINK_MAP', {})) MKTG_URL_OVERRIDES.update(ENV_TOKENS.get('MKTG_URL_OVERRIDES', MKTG_URL_OVERRIDES)) diff --git a/lms/envs/common.py b/lms/envs/common.py index 8366c57f747f..1874b78e666a 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1736,6 +1736,7 @@ def _make_mako_template_dirs(settings): DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' # This will be overridden through LMS config DEFAULT_HASHING_ALGORITHM = 'sha256' + #################### Python sandbox ############################################ CODE_JAIL = { @@ -3314,7 +3315,6 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring # end users CSRF_COOKIE_SECURE = False CSRF_TRUSTED_ORIGINS = [] -CSRF_TRUSTED_ORIGINS_WITH_SCHEME = [] CROSS_DOMAIN_CSRF_COOKIE_DOMAIN = '' CROSS_DOMAIN_CSRF_COOKIE_NAME = '' diff --git a/lms/envs/production.py b/lms/envs/production.py index 0b48d461bb13..d8cf0bb886af 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -367,11 +367,6 @@ def get_env_setting(setting): # Determines which origins are trusted for unsafe requests eg. POST requests. CSRF_TRUSTED_ORIGINS = ENV_TOKENS.get('CSRF_TRUSTED_ORIGINS', []) -# values are already updated above with default CSRF_TRUSTED_ORIGINS values but in -# case of new django version these values will override. -if django.VERSION[0] >= 4: # for greater than django 3.2 use schemes. - CSRF_TRUSTED_ORIGINS = ENV_TOKENS.get('CSRF_TRUSTED_ORIGINS_WITH_SCHEME', []) - ############# CORS headers for cross-domain requests ################# if FEATURES.get('ENABLE_CORS_HEADERS') or FEATURES.get('ENABLE_CROSS_DOMAIN_CSRF_COOKIE'): diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 2438510c2764..1e5decbc9cb9 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -180,7 +180,7 @@ defusedxml==0.7.1 # social-auth-core deprecated==1.2.14 # via jwcrypto -django==3.2.22 +django==4.2.6 # via # -c requirements/edx/../common_constraints.txt # -r requirements/edx/kernel.in diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index ecd2657af839..9fc4d63ab5e5 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -339,7 +339,7 @@ distlib==0.3.7 # via # -r requirements/edx/testing.txt # virtualenv -django==3.2.22 +django==4.2.6 # via # -c requirements/edx/../common_constraints.txt # -r requirements/edx/doc.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index daf088184cf9..2f032a2dfa82 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -227,7 +227,7 @@ deprecated==1.2.14 # via # -r requirements/edx/base.txt # jwcrypto -django==3.2.22 +django==4.2.6 # via # -c requirements/edx/../common_constraints.txt # -r requirements/edx/base.txt diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index a728884e70d5..5f672ad4e89a 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -260,7 +260,7 @@ dill==0.3.7 # via pylint distlib==0.3.7 # via virtualenv -django==3.2.22 +django==4.2.6 # via # -c requirements/edx/../common_constraints.txt # -r requirements/edx/base.txt From 0fc17594850b19e1688f28a31401e781a96e5c8a Mon Sep 17 00:00:00 2001 From: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com> Date: Tue, 17 Oct 2023 04:55:53 -0400 Subject: [PATCH 4/6] chore: Updating Python Requirements (#33517) --- requirements/edx/base.txt | 32 +++++++++--------- requirements/edx/coverage.txt | 2 +- requirements/edx/development.txt | 56 +++++++++++++++++++------------- requirements/edx/doc.txt | 39 ++++++++++++---------- requirements/edx/paver.txt | 2 +- requirements/edx/semgrep.txt | 6 ++-- requirements/edx/testing.txt | 47 +++++++++++++++------------ requirements/pip.txt | 2 +- 8 files changed, 104 insertions(+), 82 deletions(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 1e5decbc9cb9..b7cf913dba37 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -60,6 +60,7 @@ backoff==1.10.0 backports-zoneinfo[tzdata]==0.2.1 # via # celery + # django # icalendar # kombu beautifulsoup4==4.12.2 @@ -79,13 +80,13 @@ boto==2.39.0 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/kernel.in -boto3==1.28.62 +boto3==1.28.64 # via # -r requirements/edx/kernel.in # django-ses # fs-s3fs # ora2 -botocore==1.31.62 +botocore==1.31.64 # via # -r requirements/edx/kernel.in # boto3 @@ -169,7 +170,7 @@ cryptography==38.0.4 # pyopenssl # snowflake-connector-python # social-auth-core -cssutils==2.7.1 +cssutils==2.9.0 # via pynliner defusedxml==0.7.1 # via @@ -182,7 +183,6 @@ deprecated==1.2.14 # via jwcrypto django==4.2.6 # via - # -c requirements/edx/../common_constraints.txt # -r requirements/edx/kernel.in # django-appconf # django-celery-results @@ -265,7 +265,7 @@ django-config-models==2.5.1 # edx-enterprise # edx-name-affirmation # lti-consumer-xblock -django-cors-headers==4.2.0 +django-cors-headers==4.3.0 # via -r requirements/edx/kernel.in django-countries==7.5.1 # via @@ -323,7 +323,7 @@ django-mptt==0.14.0 # openedx-django-wiki django-multi-email-field==0.7.0 # via edx-enterprise -django-mysql==4.11.0 +django-mysql==4.12.0 # via -r requirements/edx/kernel.in django-oauth-toolkit==1.7.1 # via @@ -344,6 +344,7 @@ django-ses==3.5.0 # via -r requirements/edx/bundled.in django-simple-history==3.4.0 # via + # -c requirements/edx/../constraints.txt # -r requirements/edx/kernel.in # edx-enterprise # edx-name-affirmation @@ -452,7 +453,7 @@ edx-django-release-util==1.3.0 # -r requirements/edx/kernel.in # edxval # openedx-blockstore -edx-django-sites-extensions==4.0.1 +edx-django-sites-extensions==4.0.2 # via -r requirements/edx/kernel.in edx-django-utils==5.7.0 # via @@ -470,7 +471,7 @@ edx-django-utils==5.7.0 # openedx-blockstore # ora2 # super-csv -edx-drf-extensions==8.10.0 +edx-drf-extensions==8.12.0 # via # -r requirements/edx/kernel.in # edx-completion @@ -520,7 +521,7 @@ edx-proctoring==4.16.1 # edx-proctoring-proctortrack edx-rbac==1.8.0 # via edx-enterprise -edx-rest-api-client==5.6.0 +edx-rest-api-client==5.6.1 # via # -r requirements/edx/kernel.in # edx-enterprise @@ -793,7 +794,7 @@ openedx-mongodbproxy==0.2.0 # via -r requirements/edx/kernel.in optimizely-sdk==4.1.1 # via -r requirements/edx/bundled.in -ora2==5.5.4 +ora2==5.5.5 # via -r requirements/edx/bundled.in oscrypto==1.3.0 # via snowflake-connector-python @@ -841,7 +842,7 @@ polib==1.2.0 # via edx-i18n-tools prompt-toolkit==3.0.39 # via click-repl -psutil==5.9.5 +psutil==5.9.6 # via # -r requirements/edx/paver.txt # edx-django-utils @@ -946,7 +947,6 @@ pytz==2022.7.1 # -c requirements/edx/../constraints.txt # -r requirements/edx/kernel.in # babel - # django # django-ses # djangorestframework # drf-yasg @@ -1015,7 +1015,7 @@ requests-oauthlib==1.3.1 # via # -r requirements/edx/kernel.in # social-auth-core -rpds-py==0.10.4 +rpds-py==0.10.6 # via # jsonschema # referencing @@ -1040,7 +1040,7 @@ scipy==1.7.3 # openedx-calc semantic-version==2.10.0 # via edx-drf-extensions -shapely==2.0.1 +shapely==2.0.2 # via -r requirements/edx/kernel.in simplejson==3.19.2 # via @@ -1084,7 +1084,7 @@ slumber==0.7.1 # edx-bulk-grades # edx-enterprise # edx-rest-api-client -snowflake-connector-python==3.2.1 +snowflake-connector-python==3.3.0 # via edx-enterprise social-auth-app-django==5.0.0 # via @@ -1221,7 +1221,7 @@ xblock[django]==1.8.1 # xblock-google-drive # xblock-poll # xblock-utils -xblock-drag-and-drop-v2==3.2.0 +xblock-drag-and-drop-v2==3.2.1 # via -r requirements/edx/bundled.in xblock-google-drive==0.4.0 # via -r requirements/edx/bundled.in diff --git a/requirements/edx/coverage.txt b/requirements/edx/coverage.txt index 93af4c1f8247..65c0f4525397 100644 --- a/requirements/edx/coverage.txt +++ b/requirements/edx/coverage.txt @@ -8,7 +8,7 @@ chardet==5.2.0 # via diff-cover coverage==7.3.2 # via -r requirements/edx/coverage.in -diff-cover==7.7.0 +diff-cover==8.0.0 # via -r requirements/edx/coverage.in jinja2==3.1.2 # via diff-cover diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 9fc4d63ab5e5..31c72480db4a 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -118,7 +118,9 @@ backports-zoneinfo[tzdata]==0.2.1 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt + # backports-zoneinfo # celery + # django # icalendar # kombu beautifulsoup4==4.12.2 @@ -136,6 +138,7 @@ bleach[css]==6.1.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt + # bleach # edx-enterprise # lti-consumer-xblock # openedx-django-wiki @@ -149,14 +152,14 @@ boto==2.39.0 # -c requirements/edx/../constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt -boto3==1.28.62 +boto3==1.28.64 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # django-ses # fs-s3fs # ora2 -botocore==1.31.62 +botocore==1.31.64 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -282,6 +285,7 @@ coreschema==0.0.4 coverage[toml]==7.3.2 # via # -r requirements/edx/testing.txt + # coverage # pytest-cov crowdsourcehinter-xblock==0.6 # via @@ -305,7 +309,7 @@ cssselect==1.2.0 # via # -r requirements/edx/testing.txt # pyquery -cssutils==2.7.1 +cssutils==2.9.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -329,7 +333,7 @@ deprecated==1.2.14 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # jwcrypto -diff-cover==7.7.0 +diff-cover==8.0.0 # via -r requirements/edx/testing.txt dill==0.3.7 # via @@ -341,7 +345,6 @@ distlib==0.3.7 # virtualenv django==4.2.6 # via - # -c requirements/edx/../common_constraints.txt # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # django-appconf @@ -440,7 +443,7 @@ django-config-models==2.5.1 # edx-enterprise # edx-name-affirmation # lti-consumer-xblock -django-cors-headers==4.2.0 +django-cors-headers==4.3.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -522,7 +525,7 @@ django-multi-email-field==0.7.0 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-enterprise -django-mysql==4.11.0 +django-mysql==4.12.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -721,7 +724,7 @@ edx-django-release-util==1.3.0 # -r requirements/edx/testing.txt # edxval # openedx-blockstore -edx-django-sites-extensions==4.0.1 +edx-django-sites-extensions==4.0.2 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -742,7 +745,7 @@ edx-django-utils==5.7.0 # openedx-blockstore # ora2 # super-csv -edx-drf-extensions==8.10.0 +edx-drf-extensions==8.12.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -793,6 +796,7 @@ edx-opaque-keys[django]==2.5.1 # edx-drf-extensions # edx-enterprise # edx-milestones + # edx-opaque-keys # edx-organizations # edx-proctoring # edx-when @@ -813,7 +817,7 @@ edx-rbac==1.8.0 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-enterprise -edx-rest-api-client==5.6.0 +edx-rest-api-client==5.6.1 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -894,7 +898,7 @@ execnet==2.0.2 # pytest-xdist factory-boy==3.3.0 # via -r requirements/edx/testing.txt -faker==19.8.0 +faker==19.10.0 # via # -r requirements/edx/testing.txt # factory-boy @@ -947,13 +951,13 @@ gitdb==4.0.10 # via # -r requirements/edx/doc.txt # gitpython -gitpython==3.1.37 +gitpython==3.1.38 # via -r requirements/edx/doc.txt glob2==0.7 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt -grimp==3.0 +grimp==3.1 # via # -r requirements/edx/testing.txt # import-linter @@ -1230,7 +1234,7 @@ multidict==6.0.4 # -r requirements/edx/testing.txt # aiohttp # yarl -mypy==1.5.1 +mypy==1.6.0 # via # -r requirements/edx/development.in # django-stubs @@ -1332,7 +1336,7 @@ optimizely-sdk==4.1.1 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt -ora2==5.5.4 +ora2==5.5.5 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -1435,7 +1439,7 @@ prompt-toolkit==3.0.39 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # click-repl -psutil==5.9.5 +psutil==5.9.6 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -1514,6 +1518,7 @@ pyjwt[crypto]==2.8.0 # edx-drf-extensions # edx-proctoring # edx-rest-api-client + # pyjwt # pylti1p3 # snowflake-connector-python # social-auth-core @@ -1627,7 +1632,9 @@ pytest-metadata==1.8.0 pytest-randomly==3.15.0 # via -r requirements/edx/testing.txt pytest-xdist[psutil]==3.3.1 - # via -r requirements/edx/testing.txt + # via + # -r requirements/edx/testing.txt + # pytest-xdist python-dateutil==2.8.2 # via # -r requirements/edx/doc.txt @@ -1673,7 +1680,6 @@ pytz==2022.7.1 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # babel - # django # django-ses # djangorestframework # drf-yasg @@ -1767,7 +1773,8 @@ rfc3986[idna2008]==1.5.0 # via # -r requirements/edx/testing.txt # httpx -rpds-py==0.10.4 + # rfc3986 +rpds-py==0.10.6 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -1816,7 +1823,7 @@ semantic-version==2.10.0 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-drf-extensions -shapely==2.0.1 +shapely==2.0.2 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -1886,7 +1893,7 @@ snowballstemmer==2.2.0 # via # -r requirements/edx/doc.txt # sphinx -snowflake-connector-python==3.2.1 +snowflake-connector-python==3.3.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt @@ -1960,7 +1967,9 @@ sphinxcontrib-jsmath==1.0.1 # -r requirements/edx/doc.txt # sphinx sphinxcontrib-openapi[markdown]==0.8.1 - # via -r requirements/edx/doc.txt + # via + # -r requirements/edx/doc.txt + # sphinxcontrib-openapi sphinxcontrib-qthelp==1.0.3 # via # -r requirements/edx/doc.txt @@ -2208,10 +2217,11 @@ xblock[django]==1.8.1 # lti-consumer-xblock # ora2 # staff-graded-xblock + # xblock # xblock-google-drive # xblock-poll # xblock-utils -xblock-drag-and-drop-v2==3.2.0 +xblock-drag-and-drop-v2==3.2.1 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index 2f032a2dfa82..c4eec8c4992a 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -80,7 +80,9 @@ backoff==1.10.0 backports-zoneinfo[tzdata]==0.2.1 # via # -r requirements/edx/base.txt + # backports-zoneinfo # celery + # django # icalendar # kombu beautifulsoup4==4.12.2 @@ -95,6 +97,7 @@ billiard==4.1.0 bleach[css]==6.1.0 # via # -r requirements/edx/base.txt + # bleach # edx-enterprise # lti-consumer-xblock # openedx-django-wiki @@ -105,13 +108,13 @@ boto==2.39.0 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt -boto3==1.28.62 +boto3==1.28.64 # via # -r requirements/edx/base.txt # django-ses # fs-s3fs # ora2 -botocore==1.31.62 +botocore==1.31.64 # via # -r requirements/edx/base.txt # boto3 @@ -210,7 +213,7 @@ cryptography==38.0.4 # pyopenssl # snowflake-connector-python # social-auth-core -cssutils==2.7.1 +cssutils==2.9.0 # via # -r requirements/edx/base.txt # pynliner @@ -229,7 +232,6 @@ deprecated==1.2.14 # jwcrypto django==4.2.6 # via - # -c requirements/edx/../common_constraints.txt # -r requirements/edx/base.txt # django-appconf # django-celery-results @@ -318,7 +320,7 @@ django-config-models==2.5.1 # edx-enterprise # edx-name-affirmation # lti-consumer-xblock -django-cors-headers==4.2.0 +django-cors-headers==4.3.0 # via -r requirements/edx/base.txt django-countries==7.5.1 # via @@ -384,7 +386,7 @@ django-multi-email-field==0.7.0 # via # -r requirements/edx/base.txt # edx-enterprise -django-mysql==4.11.0 +django-mysql==4.12.0 # via -r requirements/edx/base.txt django-oauth-toolkit==1.7.1 # via @@ -407,6 +409,7 @@ django-ses==3.5.0 # via -r requirements/edx/base.txt django-simple-history==3.4.0 # via + # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt # edx-enterprise # edx-name-affirmation @@ -528,7 +531,7 @@ edx-django-release-util==1.3.0 # -r requirements/edx/base.txt # edxval # openedx-blockstore -edx-django-sites-extensions==4.0.1 +edx-django-sites-extensions==4.0.2 # via -r requirements/edx/base.txt edx-django-utils==5.7.0 # via @@ -546,7 +549,7 @@ edx-django-utils==5.7.0 # openedx-blockstore # ora2 # super-csv -edx-drf-extensions==8.10.0 +edx-drf-extensions==8.12.0 # via # -r requirements/edx/base.txt # edx-completion @@ -583,6 +586,7 @@ edx-opaque-keys[django]==2.5.1 # edx-drf-extensions # edx-enterprise # edx-milestones + # edx-opaque-keys # edx-organizations # edx-proctoring # edx-when @@ -599,7 +603,7 @@ edx-rbac==1.8.0 # via # -r requirements/edx/base.txt # edx-enterprise -edx-rest-api-client==5.6.0 +edx-rest-api-client==5.6.1 # via # -r requirements/edx/base.txt # edx-enterprise @@ -682,7 +686,7 @@ geoip2==4.7.0 # via -r requirements/edx/base.txt gitdb==4.0.10 # via gitpython -gitpython==3.1.37 +gitpython==3.1.38 # via -r requirements/edx/doc.in glob2==0.7 # via -r requirements/edx/base.txt @@ -933,7 +937,7 @@ openedx-mongodbproxy==0.2.0 # via -r requirements/edx/base.txt optimizely-sdk==4.1.1 # via -r requirements/edx/base.txt -ora2==5.5.4 +ora2==5.5.5 # via -r requirements/edx/base.txt oscrypto==1.3.0 # via @@ -1000,7 +1004,7 @@ prompt-toolkit==3.0.39 # via # -r requirements/edx/base.txt # click-repl -psutil==5.9.5 +psutil==5.9.6 # via # -r requirements/edx/base.txt # edx-django-utils @@ -1048,6 +1052,7 @@ pyjwt[crypto]==2.8.0 # edx-drf-extensions # edx-proctoring # edx-rest-api-client + # pyjwt # pylti1p3 # snowflake-connector-python # social-auth-core @@ -1126,7 +1131,6 @@ pytz==2022.7.1 # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt # babel - # django # django-ses # djangorestframework # drf-yasg @@ -1200,7 +1204,7 @@ requests-oauthlib==1.3.1 # via # -r requirements/edx/base.txt # social-auth-core -rpds-py==0.10.4 +rpds-py==0.10.6 # via # -r requirements/edx/base.txt # jsonschema @@ -1237,7 +1241,7 @@ semantic-version==2.10.0 # via # -r requirements/edx/base.txt # edx-drf-extensions -shapely==2.0.1 +shapely==2.0.2 # via -r requirements/edx/base.txt simplejson==3.19.2 # via @@ -1286,7 +1290,7 @@ smmap==5.0.1 # via gitdb snowballstemmer==2.2.0 # via sphinx -snowflake-connector-python==3.2.1 +snowflake-connector-python==3.3.0 # via # -r requirements/edx/base.txt # edx-enterprise @@ -1483,10 +1487,11 @@ xblock[django]==1.8.1 # lti-consumer-xblock # ora2 # staff-graded-xblock + # xblock # xblock-google-drive # xblock-poll # xblock-utils -xblock-drag-and-drop-v2==3.2.0 +xblock-drag-and-drop-v2==3.2.1 # via -r requirements/edx/base.txt xblock-google-drive==0.4.0 # via -r requirements/edx/base.txt diff --git a/requirements/edx/paver.txt b/requirements/edx/paver.txt index 272e8a34a972..8abdd6249c52 100644 --- a/requirements/edx/paver.txt +++ b/requirements/edx/paver.txt @@ -30,7 +30,7 @@ paver==1.3.4 # via -r requirements/edx/paver.in pbr==5.11.1 # via stevedore -psutil==5.9.5 +psutil==5.9.6 # via -r requirements/edx/paver.in pymemcache==4.0.0 # via -r requirements/edx/paver.in diff --git a/requirements/edx/semgrep.txt b/requirements/edx/semgrep.txt index 31dcbbf984e0..5312dd62642b 100644 --- a/requirements/edx/semgrep.txt +++ b/requirements/edx/semgrep.txt @@ -54,7 +54,7 @@ mdurl==0.1.2 # via markdown-it-py packaging==23.2 # via semgrep -peewee==3.16.3 +peewee==3.17.0 # via semgrep pkgutil-resolve-name==1.3.10 # via jsonschema @@ -70,7 +70,7 @@ requests==2.31.0 # via semgrep rich==13.6.0 # via semgrep -rpds-py==0.10.4 +rpds-py==0.10.6 # via # jsonschema # referencing @@ -78,7 +78,7 @@ ruamel-yaml==0.17.35 # via semgrep ruamel-yaml-clib==0.2.8 # via ruamel-yaml -semgrep==1.43.0 +semgrep==1.44.0 # via -r requirements/edx/semgrep.in tomli==2.0.1 # via semgrep diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 5f672ad4e89a..b6633a5f0c9a 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -85,7 +85,9 @@ backoff==1.10.0 backports-zoneinfo[tzdata]==0.2.1 # via # -r requirements/edx/base.txt + # backports-zoneinfo # celery + # django # icalendar # kombu beautifulsoup4==4.12.2 @@ -100,6 +102,7 @@ billiard==4.1.0 bleach[css]==6.1.0 # via # -r requirements/edx/base.txt + # bleach # edx-enterprise # lti-consumer-xblock # openedx-django-wiki @@ -112,13 +115,13 @@ boto==2.39.0 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt -boto3==1.28.62 +boto3==1.28.64 # via # -r requirements/edx/base.txt # django-ses # fs-s3fs # ora2 -botocore==1.31.62 +botocore==1.31.64 # via # -r requirements/edx/base.txt # boto3 @@ -237,7 +240,7 @@ cssselect==1.2.0 # via # -r requirements/edx/testing.in # pyquery -cssutils==2.7.1 +cssutils==2.9.0 # via # -r requirements/edx/base.txt # pynliner @@ -254,7 +257,7 @@ deprecated==1.2.14 # via # -r requirements/edx/base.txt # jwcrypto -diff-cover==7.7.0 +diff-cover==8.0.0 # via -r requirements/edx/coverage.txt dill==0.3.7 # via pylint @@ -262,7 +265,6 @@ distlib==0.3.7 # via virtualenv django==4.2.6 # via - # -c requirements/edx/../common_constraints.txt # -r requirements/edx/base.txt # django-appconf # django-celery-results @@ -351,7 +353,7 @@ django-config-models==2.5.1 # edx-enterprise # edx-name-affirmation # lti-consumer-xblock -django-cors-headers==4.2.0 +django-cors-headers==4.3.0 # via -r requirements/edx/base.txt django-countries==7.5.1 # via @@ -417,7 +419,7 @@ django-multi-email-field==0.7.0 # via # -r requirements/edx/base.txt # edx-enterprise -django-mysql==4.11.0 +django-mysql==4.12.0 # via -r requirements/edx/base.txt django-oauth-toolkit==1.7.1 # via @@ -440,6 +442,7 @@ django-ses==3.5.0 # via -r requirements/edx/base.txt django-simple-history==3.4.0 # via + # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt # edx-enterprise # edx-name-affirmation @@ -555,7 +558,7 @@ edx-django-release-util==1.3.0 # -r requirements/edx/base.txt # edxval # openedx-blockstore -edx-django-sites-extensions==4.0.1 +edx-django-sites-extensions==4.0.2 # via -r requirements/edx/base.txt edx-django-utils==5.7.0 # via @@ -573,7 +576,7 @@ edx-django-utils==5.7.0 # openedx-blockstore # ora2 # super-csv -edx-drf-extensions==8.10.0 +edx-drf-extensions==8.12.0 # via # -r requirements/edx/base.txt # edx-completion @@ -613,6 +616,7 @@ edx-opaque-keys[django]==2.5.1 # edx-drf-extensions # edx-enterprise # edx-milestones + # edx-opaque-keys # edx-organizations # edx-proctoring # edx-when @@ -629,7 +633,7 @@ edx-rbac==1.8.0 # via # -r requirements/edx/base.txt # edx-enterprise -edx-rest-api-client==5.6.0 +edx-rest-api-client==5.6.1 # via # -r requirements/edx/base.txt # edx-enterprise @@ -689,7 +693,7 @@ execnet==2.0.2 # via pytest-xdist factory-boy==3.3.0 # via -r requirements/edx/testing.in -faker==19.8.0 +faker==19.10.0 # via factory-boy fastapi==0.103.2 # via pact-python @@ -728,7 +732,7 @@ geoip2==4.7.0 # via -r requirements/edx/base.txt glob2==0.7 # via -r requirements/edx/base.txt -grimp==3.0 +grimp==3.1 # via import-linter gunicorn==21.2.0 # via -r requirements/edx/base.txt @@ -1000,7 +1004,7 @@ openedx-mongodbproxy==0.2.0 # via -r requirements/edx/base.txt optimizely-sdk==4.1.1 # via -r requirements/edx/base.txt -ora2==5.5.4 +ora2==5.5.5 # via -r requirements/edx/base.txt oscrypto==1.3.0 # via @@ -1076,7 +1080,7 @@ prompt-toolkit==3.0.39 # via # -r requirements/edx/base.txt # click-repl -psutil==5.9.5 +psutil==5.9.6 # via # -r requirements/edx/base.txt # edx-django-utils @@ -1132,6 +1136,7 @@ pyjwt[crypto]==2.8.0 # edx-drf-extensions # edx-proctoring # edx-rest-api-client + # pyjwt # pylti1p3 # snowflake-connector-python # social-auth-core @@ -1259,7 +1264,6 @@ pytz==2022.7.1 # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt # babel - # django # django-ses # djangorestframework # drf-yasg @@ -1333,8 +1337,10 @@ requests-oauthlib==1.3.1 # -r requirements/edx/base.txt # social-auth-core rfc3986[idna2008]==1.5.0 - # via httpx -rpds-py==0.10.4 + # via + # httpx + # rfc3986 +rpds-py==0.10.6 # via # -r requirements/edx/base.txt # jsonschema @@ -1375,7 +1381,7 @@ semantic-version==2.10.0 # via # -r requirements/edx/base.txt # edx-drf-extensions -shapely==2.0.1 +shapely==2.0.2 # via -r requirements/edx/base.txt simplejson==3.19.2 # via @@ -1429,7 +1435,7 @@ sniffio==1.3.0 # anyio # httpcore # httpx -snowflake-connector-python==3.2.1 +snowflake-connector-python==3.3.0 # via # -r requirements/edx/base.txt # edx-enterprise @@ -1627,10 +1633,11 @@ xblock[django]==1.8.1 # lti-consumer-xblock # ora2 # staff-graded-xblock + # xblock # xblock-google-drive # xblock-poll # xblock-utils -xblock-drag-and-drop-v2==3.2.0 +xblock-drag-and-drop-v2==3.2.1 # via -r requirements/edx/base.txt xblock-google-drive==0.4.0 # via -r requirements/edx/base.txt diff --git a/requirements/pip.txt b/requirements/pip.txt index 3e7d8f4a813f..2154d29f936b 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -8,7 +8,7 @@ wheel==0.41.2 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==23.2.1 +pip==23.3 # via -r requirements/pip.in setuptools==68.2.2 # via -r requirements/pip.in From 8da7b2e8a8559c54af6613bb5c3e112d0bf884ec Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Tue, 17 Oct 2023 15:50:39 +0500 Subject: [PATCH 5/6] chore: pylint fixing. --- cms/envs/production.py | 1 - lms/envs/production.py | 1 - 2 files changed, 2 deletions(-) diff --git a/cms/envs/production.py b/cms/envs/production.py index fbb5bba50140..d04dfcd8acc0 100644 --- a/cms/envs/production.py +++ b/cms/envs/production.py @@ -14,7 +14,6 @@ import yaml from corsheaders.defaults import default_headers as corsheaders_default_headers -import django from django.core.exceptions import ImproperlyConfigured from django.urls import reverse_lazy from edx_django_utils.plugins import add_plugins diff --git a/lms/envs/production.py b/lms/envs/production.py index d8cf0bb886af..0233fce6a59e 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -23,7 +23,6 @@ import yaml from corsheaders.defaults import default_headers as corsheaders_default_headers -import django from django.core.exceptions import ImproperlyConfigured from edx_django_utils.plugins import add_plugins from path import Path as path From 88c733754233553d868f532a6f7f51ec59156745 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Tue, 17 Oct 2023 17:11:53 +0500 Subject: [PATCH 6/6] chore: downgrading django-mysql. --- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/doc.txt | 2 +- requirements/edx/testing.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index b7cf913dba37..eaf86f6d4616 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -323,7 +323,7 @@ django-mptt==0.14.0 # openedx-django-wiki django-multi-email-field==0.7.0 # via edx-enterprise -django-mysql==4.12.0 +django-mysql==4.11.0 # via -r requirements/edx/kernel.in django-oauth-toolkit==1.7.1 # via diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 31c72480db4a..b693ab48efd8 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -525,7 +525,7 @@ django-multi-email-field==0.7.0 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # edx-enterprise -django-mysql==4.12.0 +django-mysql==4.11.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index c4eec8c4992a..7d2842bc4b30 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -386,7 +386,7 @@ django-multi-email-field==0.7.0 # via # -r requirements/edx/base.txt # edx-enterprise -django-mysql==4.12.0 +django-mysql==4.11.0 # via -r requirements/edx/base.txt django-oauth-toolkit==1.7.1 # via diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index b6633a5f0c9a..1014e059c8d9 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -419,7 +419,7 @@ django-multi-email-field==0.7.0 # via # -r requirements/edx/base.txt # edx-enterprise -django-mysql==4.12.0 +django-mysql==4.11.0 # via -r requirements/edx/base.txt django-oauth-toolkit==1.7.1 # via