From a59563fbe26ad9dba6108ed140b653b5d0c589a6 Mon Sep 17 00:00:00 2001 From: Muhammad Umar Khan Date: Fri, 19 Apr 2024 14:39:46 +0500 Subject: [PATCH] feat: add python 3.11 support --- .github/workflows/ci.yml | 4 +- .github/workflows/mysql8-migrations-check.yml | 2 +- pylintrc_tweaks | 2 + requirements/base.txt | 11 +++--- requirements/constraints.txt | 14 +------ requirements/dev.txt | 38 +++++++----------- requirements/doc.txt | 39 ++++++------------- requirements/production.txt | 13 ++++--- requirements/quality.txt | 32 +++++---------- requirements/test.txt | 36 ++++++----------- requirements/validation.txt | 38 ++++++------------ 11 files changed, 78 insertions(+), 151 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2578f84..0e49746d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8"] + python-version: ["3.8", "3.11"] django-version: ["pinned"] steps: - uses: actions/checkout@v2 @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8"] + python-version: ["3.8", "3.11"] steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 diff --git a/.github/workflows/mysql8-migrations-check.yml b/.github/workflows/mysql8-migrations-check.yml index 13fce240..b9348156 100644 --- a/.github/workflows/mysql8-migrations-check.yml +++ b/.github/workflows/mysql8-migrations-check.yml @@ -53,7 +53,7 @@ jobs: pip uninstall -y mysqlclient pip install --no-binary mysqlclient mysqlclient pip uninstall -y xmlsec - pip install --no-binary xmlsec xmlsec + pip install --no-binary xmlsec xmlsec==1.3.13 - name: Initiate services run: | sudo /etc/init.d/mysql start diff --git a/pylintrc_tweaks b/pylintrc_tweaks index 26715e0e..6a9c5777 100644 --- a/pylintrc_tweaks +++ b/pylintrc_tweaks @@ -18,5 +18,7 @@ disable+ = consider-using-f-string, missing-module-docstring, missing-class-docstring, + missing-timeout, + unsupported-binary-operation, useless-option-value, unknown-option-value, diff --git a/requirements/base.txt b/requirements/base.txt index 1ecbbfa5..6671dc57 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -23,21 +23,22 @@ backoff==1.10.0 # via # -r requirements/base.in # analytics-python -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # celery # django # djangorestframework # kombu billiard==4.2.0 # via celery -boto3==1.34.84 +boto3==1.34.87 # via django-ses -botocore==1.34.84 +botocore==1.34.87 # via # boto3 # s3transfer -celery==5.3.6 +celery==5.4.0 # via # -r requirements/base.in # django-celery-results @@ -206,7 +207,7 @@ monotonic==1.6 # via analytics-python mysqlclient==2.2.4 # via -r requirements/base.in -newrelic==9.8.0 +newrelic==9.9.0 # via edx-django-utils oauthlib==3.2.2 # via diff --git a/requirements/constraints.txt b/requirements/constraints.txt index a1a6a6a0..17fea59a 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -16,15 +16,5 @@ # Using the same version of diff-cover which is being used currently in edx-platform to avoid this conflict. diff-cover==4.0.0 -# Constraint from astroid 2.3.3 -wrapt==1.11.* - -# edx-lint>=5.3.0 and/or pylint>=2.15 throws a bunch of unknown option value errors -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 +# For python greater than or equal to 3.9 backports.zoneinfo is causing failures +backports.zoneinfo;python_version<"3.9" diff --git a/requirements/dev.txt b/requirements/dev.txt index c63351d8..ec3402a2 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -16,9 +16,8 @@ asgiref==3.8.1 # django # django-cors-headers # django-simple-history -astroid==2.11.7 +astroid==3.1.0 # via - # -c requirements/constraints.txt # -r requirements/validation.txt # pylint # pylint-celery @@ -35,8 +34,9 @@ backoff==1.10.0 # via # -r requirements/validation.txt # analytics-python -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/validation.txt # celery # django @@ -46,11 +46,11 @@ billiard==4.2.0 # via # -r requirements/validation.txt # celery -boto3==1.34.84 +boto3==1.34.87 # via # -r requirements/validation.txt # django-ses -botocore==1.34.84 +botocore==1.34.87 # via # -r requirements/validation.txt # boto3 @@ -59,7 +59,7 @@ build==1.2.1 # via # -r requirements/pip-tools.txt # pip-tools -celery==5.3.6 +celery==5.4.0 # via # -r requirements/validation.txt # django-celery-results @@ -246,10 +246,8 @@ edx-drf-extensions==10.3.0 # edx-rbac edx-i18n-tools==1.5.0 # via -r requirements/validation.txt -edx-lint==5.2.5 - # via - # -c requirements/constraints.txt - # -r requirements/validation.txt +edx-lint==5.3.6 + # via -r requirements/validation.txt edx-opaque-keys==2.5.1 # via # -r requirements/validation.txt @@ -260,19 +258,19 @@ edx-rest-api-client==5.7.0 # via -r requirements/validation.txt edx-toggles==5.2.0 # via -r requirements/validation.txt -exceptiongroup==1.2.0 +exceptiongroup==1.2.1 # via # -r requirements/validation.txt # pytest factory-boy==3.3.0 # via -r requirements/validation.txt -faker==24.9.0 +faker==24.11.0 # via # -r requirements/validation.txt # factory-boy freezegun==1.4.0 # via -r requirements/validation.txt -gunicorn==21.2.0 +gunicorn==22.0.0 # via -r requirements/dev.in idna==3.7 # via @@ -334,10 +332,6 @@ kombu==5.3.7 # via # -r requirements/validation.txt # celery -lazy-object-proxy==1.10.0 - # via - # -r requirements/validation.txt - # astroid lxml==5.2.1 # via # -r requirements/validation.txt @@ -358,7 +352,7 @@ more-itertools==10.2.0 # via inflect mysqlclient==2.2.4 # via -r requirements/validation.txt -newrelic==9.8.0 +newrelic==9.9.0 # via # -r requirements/validation.txt # edx-django-utils @@ -433,9 +427,8 @@ pyjwt[crypto]==2.8.0 # edx-drf-extensions # edx-rest-api-client # social-auth-core -pylint==2.14.5 +pylint==3.1.0 # via - # -c requirements/constraints.txt # -r requirements/validation.txt # edx-lint # pylint-celery @@ -638,11 +631,6 @@ wheel==0.43.0 # via # -r requirements/pip-tools.txt # pip-tools -wrapt==1.11.2 - # via - # -c requirements/constraints.txt - # -r requirements/validation.txt - # astroid zipp==3.18.1 # via # -r requirements/pip-tools.txt diff --git a/requirements/doc.txt b/requirements/doc.txt index cca72fd3..9685060a 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -20,9 +20,8 @@ asgiref==3.8.1 # django # django-cors-headers # django-simple-history -astroid==2.11.7 +astroid==3.1.0 # via - # -c requirements/constraints.txt # -r requirements/test.txt # pylint # pylint-celery @@ -43,8 +42,9 @@ backoff==1.10.0 # via # -r requirements/test.txt # analytics-python -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/test.txt # celery # django @@ -56,16 +56,16 @@ billiard==4.2.0 # via # -r requirements/test.txt # celery -boto3==1.34.84 +boto3==1.34.87 # via # -r requirements/test.txt # django-ses -botocore==1.34.84 +botocore==1.34.87 # via # -r requirements/test.txt # boto3 # s3transfer -celery==5.3.6 +celery==5.4.0 # via # -r requirements/test.txt # django-celery-results @@ -245,10 +245,8 @@ edx-drf-extensions==10.3.0 # via # -r requirements/test.txt # edx-rbac -edx-lint==5.2.5 - # via - # -c requirements/constraints.txt - # -r requirements/test.txt +edx-lint==5.3.6 + # via -r requirements/test.txt edx-opaque-keys==2.5.1 # via # -r requirements/test.txt @@ -259,13 +257,13 @@ edx-rest-api-client==5.7.0 # via -r requirements/test.txt edx-toggles==5.2.0 # via -r requirements/test.txt -exceptiongroup==1.2.0 +exceptiongroup==1.2.1 # via # -r requirements/test.txt # pytest factory-boy==3.3.0 # via -r requirements/test.txt -faker==24.9.0 +faker==24.11.0 # via # -r requirements/test.txt # factory-boy @@ -324,10 +322,6 @@ kombu==5.3.7 # via # -r requirements/test.txt # celery -lazy-object-proxy==1.10.0 - # via - # -r requirements/test.txt - # astroid markupsafe==2.1.5 # via # -r requirements/test.txt @@ -342,7 +336,7 @@ monotonic==1.6 # analytics-python mysqlclient==2.2.4 # via -r requirements/test.txt -newrelic==9.8.0 +newrelic==9.9.0 # via # -r requirements/test.txt # edx-django-utils @@ -408,9 +402,8 @@ pyjwt[crypto]==2.8.0 # edx-drf-extensions # edx-rest-api-client # social-auth-core -pylint==2.14.5 +pylint==3.1.0 # via - # -c requirements/constraints.txt # -r requirements/test.txt # edx-lint # pylint-celery @@ -619,16 +612,8 @@ wcwidth==0.2.13 # via # -r requirements/test.txt # prompt-toolkit -wrapt==1.11.2 - # via - # -c requirements/constraints.txt - # -r requirements/test.txt - # astroid zipp==3.18.1 # via # -r requirements/test.txt # importlib-metadata # importlib-resources - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/requirements/production.txt b/requirements/production.txt index d8731d6e..aa7d01ed 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -29,8 +29,9 @@ backoff==1.10.0 # via # -r requirements/base.txt # analytics-python -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/base.txt # celery # django @@ -40,16 +41,16 @@ billiard==4.2.0 # via # -r requirements/base.txt # celery -boto3==1.34.84 +boto3==1.34.87 # via # -r requirements/base.txt # django-ses -botocore==1.34.84 +botocore==1.34.87 # via # -r requirements/base.txt # boto3 # s3transfer -celery==5.3.6 +celery==5.4.0 # via # -r requirements/base.txt # django-celery-results @@ -215,7 +216,7 @@ gevent==24.2.1 # via -r requirements/production.in greenlet==3.0.3 # via gevent -gunicorn==21.2.0 +gunicorn==22.0.0 # via -r requirements/production.in idna==3.7 # via @@ -265,7 +266,7 @@ monotonic==1.6 # analytics-python mysqlclient==2.2.4 # via -r requirements/base.txt -newrelic==9.8.0 +newrelic==9.9.0 # via # -r requirements/base.txt # edx-django-utils diff --git a/requirements/quality.txt b/requirements/quality.txt index 474ab17d..b7b4bc14 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -16,9 +16,8 @@ asgiref==3.8.1 # django # django-cors-headers # django-simple-history -astroid==2.11.7 +astroid==3.1.0 # via - # -c requirements/constraints.txt # pylint # pylint-celery async-timeout==4.0.3 @@ -34,8 +33,9 @@ backoff==1.10.0 # via # -r requirements/base.txt # analytics-python -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/base.txt # celery # django @@ -45,16 +45,16 @@ billiard==4.2.0 # via # -r requirements/base.txt # celery -boto3==1.34.84 +boto3==1.34.87 # via # -r requirements/base.txt # django-ses -botocore==1.34.84 +botocore==1.34.87 # via # -r requirements/base.txt # boto3 # s3transfer -celery==5.3.6 +celery==5.4.0 # via # -r requirements/base.txt # django-celery-results @@ -213,10 +213,8 @@ edx-drf-extensions==10.3.0 # via # -r requirements/base.txt # edx-rbac -edx-lint==5.2.5 - # via - # -c requirements/constraints.txt - # -r requirements/quality.in +edx-lint==5.3.6 + # via -r requirements/quality.in edx-opaque-keys==2.5.1 # via # -r requirements/base.txt @@ -269,8 +267,6 @@ kombu==5.3.7 # via # -r requirements/base.txt # celery -lazy-object-proxy==1.10.0 - # via astroid markupsafe==2.1.5 # via # -r requirements/base.txt @@ -283,7 +279,7 @@ monotonic==1.6 # analytics-python mysqlclient==2.2.4 # via -r requirements/base.txt -newrelic==9.8.0 +newrelic==9.9.0 # via # -r requirements/base.txt # edx-django-utils @@ -330,9 +326,8 @@ pyjwt[crypto]==2.8.0 # edx-drf-extensions # edx-rest-api-client # social-auth-core -pylint==2.14.5 +pylint==3.1.0 # via - # -c requirements/constraints.txt # edx-lint # pylint-celery # pylint-django @@ -487,14 +482,7 @@ wcwidth==0.2.13 # via # -r requirements/base.txt # prompt-toolkit -wrapt==1.11.2 - # via - # -c requirements/constraints.txt - # astroid zipp==3.18.1 # via # -r requirements/base.txt # importlib-resources - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/requirements/test.txt b/requirements/test.txt index 782214b8..4ef4e69b 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -16,9 +16,8 @@ asgiref==3.8.1 # django # django-cors-headers # django-simple-history -astroid==2.11.7 +astroid==3.1.0 # via - # -c requirements/constraints.txt # pylint # pylint-celery async-timeout==4.0.3 @@ -34,8 +33,9 @@ backoff==1.10.0 # via # -r requirements/base.txt # analytics-python -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/base.txt # celery # django @@ -45,16 +45,16 @@ billiard==4.2.0 # via # -r requirements/base.txt # celery -boto3==1.34.84 +boto3==1.34.87 # via # -r requirements/base.txt # django-ses -botocore==1.34.84 +botocore==1.34.87 # via # -r requirements/base.txt # boto3 # s3transfer -celery==5.3.6 +celery==5.4.0 # via # -r requirements/base.txt # django-celery-results @@ -222,10 +222,8 @@ edx-drf-extensions==10.3.0 # via # -r requirements/base.txt # edx-rbac -edx-lint==5.2.5 - # via - # -c requirements/constraints.txt - # -r requirements/test.in +edx-lint==5.3.6 + # via -r requirements/test.in edx-opaque-keys==2.5.1 # via # -r requirements/base.txt @@ -236,11 +234,11 @@ edx-rest-api-client==5.7.0 # via -r requirements/base.txt edx-toggles==5.2.0 # via -r requirements/base.txt -exceptiongroup==1.2.0 +exceptiongroup==1.2.1 # via pytest factory-boy==3.3.0 # via -r requirements/test.in -faker==24.9.0 +faker==24.11.0 # via factory-boy freezegun==1.4.0 # via -r requirements/test.in @@ -286,8 +284,6 @@ kombu==5.3.7 # via # -r requirements/base.txt # celery -lazy-object-proxy==1.10.0 - # via astroid markupsafe==2.1.5 # via # -r requirements/base.txt @@ -300,7 +296,7 @@ monotonic==1.6 # analytics-python mysqlclient==2.2.4 # via -r requirements/base.txt -newrelic==9.8.0 +newrelic==9.9.0 # via # -r requirements/base.txt # edx-django-utils @@ -347,9 +343,8 @@ pyjwt[crypto]==2.8.0 # edx-drf-extensions # edx-rest-api-client # social-auth-core -pylint==2.14.5 +pylint==3.1.0 # via - # -c requirements/constraints.txt # edx-lint # pylint-celery # pylint-django @@ -516,14 +511,7 @@ wcwidth==0.2.13 # via # -r requirements/base.txt # prompt-toolkit -wrapt==1.11.2 - # via - # -c requirements/constraints.txt - # astroid zipp==3.18.1 # via # -r requirements/base.txt # importlib-resources - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/requirements/validation.txt b/requirements/validation.txt index 669df1f6..51923310 100644 --- a/requirements/validation.txt +++ b/requirements/validation.txt @@ -20,9 +20,8 @@ asgiref==3.8.1 # django # django-cors-headers # django-simple-history -astroid==2.11.7 +astroid==3.1.0 # via - # -c requirements/constraints.txt # -r requirements/quality.txt # -r requirements/test.txt # pylint @@ -43,8 +42,9 @@ backoff==1.10.0 # -r requirements/quality.txt # -r requirements/test.txt # analytics-python -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/quality.txt # -r requirements/test.txt # celery @@ -56,18 +56,18 @@ billiard==4.2.0 # -r requirements/quality.txt # -r requirements/test.txt # celery -boto3==1.34.84 +boto3==1.34.87 # via # -r requirements/quality.txt # -r requirements/test.txt # django-ses -botocore==1.34.84 +botocore==1.34.87 # via # -r requirements/quality.txt # -r requirements/test.txt # boto3 # s3transfer -celery==5.3.6 +celery==5.4.0 # via # -r requirements/quality.txt # -r requirements/test.txt @@ -294,9 +294,8 @@ edx-drf-extensions==10.3.0 # edx-rbac edx-i18n-tools==1.5.0 # via -r requirements/validation.in -edx-lint==5.2.5 +edx-lint==5.3.6 # via - # -c requirements/constraints.txt # -r requirements/quality.txt # -r requirements/test.txt edx-opaque-keys==2.5.1 @@ -316,13 +315,13 @@ edx-toggles==5.2.0 # via # -r requirements/quality.txt # -r requirements/test.txt -exceptiongroup==1.2.0 +exceptiongroup==1.2.1 # via # -r requirements/test.txt # pytest factory-boy==3.3.0 # via -r requirements/test.txt -faker==24.9.0 +faker==24.11.0 # via # -r requirements/test.txt # factory-boy @@ -384,11 +383,6 @@ kombu==5.3.7 # -r requirements/quality.txt # -r requirements/test.txt # celery -lazy-object-proxy==1.10.0 - # via - # -r requirements/quality.txt - # -r requirements/test.txt - # astroid lxml==5.2.1 # via edx-i18n-tools markupsafe==2.1.5 @@ -410,7 +404,7 @@ mysqlclient==2.2.4 # via # -r requirements/quality.txt # -r requirements/test.txt -newrelic==9.8.0 +newrelic==9.9.0 # via # -r requirements/quality.txt # -r requirements/test.txt @@ -483,9 +477,8 @@ pyjwt[crypto]==2.8.0 # edx-drf-extensions # edx-rest-api-client # social-auth-core -pylint==2.14.5 +pylint==3.1.0 # via - # -c requirements/constraints.txt # -r requirements/quality.txt # -r requirements/test.txt # edx-lint @@ -706,17 +699,8 @@ wcwidth==0.2.13 # -r requirements/quality.txt # -r requirements/test.txt # prompt-toolkit -wrapt==1.11.2 - # via - # -c requirements/constraints.txt - # -r requirements/quality.txt - # -r requirements/test.txt - # astroid zipp==3.18.1 # via # -r requirements/quality.txt # -r requirements/test.txt # importlib-resources - -# The following packages are considered to be unsafe in a requirements file: -# setuptools