From 20a1c5473de458cca744b0ac02c82cb001b5a79e Mon Sep 17 00:00:00 2001 From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:39:47 +0500 Subject: [PATCH 1/4] feat: updated to python 3.12 --- .github/workflows/ci.yml | 4 +- .github/workflows/pypi-publish.yml | 2 +- CHANGELOG.rst | 4 ++ requirements/base.txt | 33 ++++++------- requirements/ci.txt | 14 +++--- requirements/dev.txt | 75 +++++++++++++++--------------- requirements/doc.txt | 70 +++++++++++----------------- requirements/pip-tools.txt | 6 +-- requirements/pip.txt | 4 +- requirements/quality.txt | 49 +++++++++---------- requirements/test.txt | 39 +++++++--------- setup.py | 2 +- tox.ini | 2 +- 13 files changed, 139 insertions(+), 165 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b4ceb1..3ce2313 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.11'] + python-version: ['3.12'] toxenv: [quality, pii_check, django42] steps: @@ -37,7 +37,7 @@ jobs: run: tox - name: Run coverage - if: matrix.python-version == '3.11' && matrix.toxenv == 'django42' + if: matrix.python-version == '3.12' && matrix.toxenv == 'django42' uses: py-cov-action/python-coverage-comment-action@v3 with: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index a22e9e6..d7898fd 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -15,7 +15,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.12 - name: Install pip run: pip install -r requirements/pip.txt diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 52d87ef..752fd34 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,10 @@ Change Log Unreleased ********** +4.3.3 - 2024-10-15 +****************** +* Upgraded to use ``Python 3.12`` + 4.3.3 - 2024-10-15 ****************** * Use `LEARNING_ASSISTANT_PROMPT_TEMPLATE` for prompt diff --git a/requirements/base.txt b/requirements/base.txt index fa877e3..e0b5b5b 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -10,15 +10,15 @@ attrs==24.2.0 # via -r requirements/base.in certifi==2024.8.30 # via requests -cffi==1.17.0 +cffi==1.17.1 # via # cryptography # pynacl -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via requests click==8.1.7 # via edx-django-utils -cryptography==43.0.0 +cryptography==43.0.3 # via pyjwt django==4.2.16 # via @@ -33,7 +33,7 @@ django==4.2.16 # edx-drf-extensions django-crum==0.7.9 # via edx-django-utils -django-model-utils==4.5.1 +django-model-utils==5.0.0 # via -r requirements/base.in django-waffle==4.1.0 # via @@ -44,33 +44,33 @@ djangorestframework==3.15.2 # -r requirements/base.in # drf-jwt # edx-drf-extensions -dnspython==2.6.1 +dnspython==2.7.0 # via pymongo drf-jwt==1.19.2 # via edx-drf-extensions -edx-django-utils==5.15.0 +edx-django-utils==7.0.0 # via # edx-drf-extensions # edx-rest-api-client edx-drf-extensions==10.4.0 # via -r requirements/base.in -edx-opaque-keys==2.10.0 +edx-opaque-keys==2.11.0 # via # -r requirements/base.in # edx-drf-extensions -edx-rest-api-client==5.7.1 +edx-rest-api-client==6.0.0 # via -r requirements/base.in -idna==3.8 +idna==3.10 # via requests jinja2==3.1.4 # via -r requirements/base.in -markupsafe==2.1.5 +markupsafe==3.0.2 # via jinja2 -newrelic==9.13.0 +newrelic==10.2.0 # via edx-django-utils pbr==6.1.0 # via stevedore -psutil==6.0.0 +psutil==6.1.0 # via edx-django-utils pycparser==2.22 # via cffi @@ -79,7 +79,7 @@ pyjwt[crypto]==2.9.0 # drf-jwt # edx-drf-extensions # edx-rest-api-client -pymongo==4.8.0 +pymongo==4.10.1 # via edx-opaque-keys pynacl==1.5.0 # via edx-django-utils @@ -87,11 +87,8 @@ requests==2.32.3 # via # edx-drf-extensions # edx-rest-api-client - # slumber semantic-version==2.10.0 # via edx-drf-extensions -slumber==0.7.1 - # via edx-rest-api-client sqlparse==0.5.1 # via django stevedore==5.3.0 @@ -100,5 +97,5 @@ stevedore==5.3.0 # edx-opaque-keys typing-extensions==4.12.2 # via edx-opaque-keys -urllib3==2.2.2 +urllib3==2.2.3 # via requests diff --git a/requirements/ci.txt b/requirements/ci.txt index e39ed77..a07c43c 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -10,9 +10,9 @@ chardet==5.2.0 # via tox colorama==0.4.6 # via tox -distlib==0.3.8 +distlib==0.3.9 # via virtualenv -filelock==3.15.4 +filelock==3.16.1 # via # tox # virtualenv @@ -20,15 +20,15 @@ packaging==24.1 # via # pyproject-api # tox -platformdirs==4.2.2 +platformdirs==4.3.6 # via # tox # virtualenv pluggy==1.5.0 # via tox -pyproject-api==1.7.1 +pyproject-api==1.8.0 # via tox -tox==4.18.0 +tox==4.23.2 # via -r requirements/ci.in -virtualenv==20.26.3 +virtualenv==20.27.0 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 3b85702..e100b40 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -8,14 +8,14 @@ asgiref==3.8.1 # via # -r requirements/quality.txt # django -astroid==3.2.4 +astroid==3.3.5 # via # -r requirements/quality.txt # pylint # pylint-celery attrs==24.2.0 # via -r requirements/quality.txt -build==1.2.1 +build==1.2.2.post1 # via # -r requirements/pip-tools.txt # pip-tools @@ -27,7 +27,7 @@ certifi==2024.8.30 # via # -r requirements/quality.txt # requests -cffi==1.17.0 +cffi==1.17.1 # via # -r requirements/quality.txt # cryptography @@ -37,7 +37,7 @@ chardet==5.2.0 # -r requirements/ci.txt # diff-cover # tox -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via # -r requirements/quality.txt # requests @@ -62,23 +62,23 @@ colorama==0.4.6 # via # -r requirements/ci.txt # tox -coverage[toml]==7.6.1 +coverage[toml]==7.6.4 # via # -r requirements/quality.txt # pytest-cov -cryptography==43.0.0 +cryptography==43.0.3 # via # -r requirements/quality.txt # pyjwt ddt==1.7.2 # via -r requirements/quality.txt -diff-cover==9.1.1 +diff-cover==9.2.0 # via -r requirements/dev.in -dill==0.3.8 +dill==0.3.9 # via # -r requirements/quality.txt # pylint -distlib==0.3.8 +distlib==0.3.9 # via # -r requirements/ci.txt # virtualenv @@ -98,7 +98,7 @@ django-crum==0.7.9 # via # -r requirements/quality.txt # edx-django-utils -django-model-utils==4.5.1 +django-model-utils==5.0.0 # via -r requirements/quality.txt django-waffle==4.1.0 # via @@ -110,7 +110,7 @@ djangorestframework==3.15.2 # -r requirements/quality.txt # drf-jwt # edx-drf-extensions -dnspython==2.6.1 +dnspython==2.7.0 # via # -r requirements/quality.txt # pymongo @@ -118,29 +118,29 @@ drf-jwt==1.19.2 # via # -r requirements/quality.txt # edx-drf-extensions -edx-django-utils==5.15.0 +edx-django-utils==7.0.0 # via # -r requirements/quality.txt # edx-drf-extensions # edx-rest-api-client edx-drf-extensions==10.4.0 # via -r requirements/quality.txt -edx-i18n-tools==1.6.2 +edx-i18n-tools==1.6.3 # via -r requirements/dev.in edx-lint==5.4.0 # via -r requirements/quality.txt -edx-opaque-keys==2.10.0 +edx-opaque-keys==2.11.0 # via # -r requirements/quality.txt # edx-drf-extensions -edx-rest-api-client==5.7.1 +edx-rest-api-client==6.0.0 # via -r requirements/quality.txt -filelock==3.15.4 +filelock==3.16.1 # via # -r requirements/ci.txt # tox # virtualenv -idna==3.8 +idna==3.10 # via # -r requirements/quality.txt # requests @@ -157,9 +157,13 @@ jinja2==3.1.4 # -r requirements/quality.txt # code-annotations # diff-cover -lxml==5.3.0 - # via edx-i18n-tools -markupsafe==2.1.5 +lxml[html-clean,html_clean]==5.3.0 + # via + # edx-i18n-tools + # lxml-html-clean +lxml-html-clean==0.3.1 + # via lxml +markupsafe==3.0.2 # via # -r requirements/quality.txt # jinja2 @@ -167,7 +171,7 @@ mccabe==0.7.0 # via # -r requirements/quality.txt # pylint -newrelic==9.13.0 +newrelic==10.2.0 # via # -r requirements/quality.txt # edx-django-utils @@ -188,7 +192,7 @@ pbr==6.1.0 # stevedore pip-tools==7.4.1 # via -r requirements/pip-tools.txt -platformdirs==4.2.2 +platformdirs==4.3.6 # via # -r requirements/ci.txt # -r requirements/quality.txt @@ -204,7 +208,7 @@ pluggy==1.5.0 # tox polib==1.2.0 # via edx-i18n-tools -psutil==6.0.0 +psutil==6.1.0 # via # -r requirements/quality.txt # edx-django-utils @@ -224,7 +228,7 @@ pyjwt[crypto]==2.9.0 # drf-jwt # edx-drf-extensions # edx-rest-api-client -pylint==3.2.7 +pylint==3.3.1 # via # -r requirements/quality.txt # edx-lint @@ -235,7 +239,7 @@ pylint-celery==0.3 # via # -r requirements/quality.txt # edx-lint -pylint-django==2.5.5 +pylint-django==2.6.1 # via # -r requirements/quality.txt # edx-lint @@ -244,7 +248,7 @@ pylint-plugin-utils==0.8.2 # -r requirements/quality.txt # pylint-celery # pylint-django -pymongo==4.8.0 +pymongo==4.10.1 # via # -r requirements/quality.txt # edx-opaque-keys @@ -252,16 +256,16 @@ pynacl==1.5.0 # via # -r requirements/quality.txt # edx-django-utils -pyproject-api==1.7.1 +pyproject-api==1.8.0 # via # -r requirements/ci.txt # tox -pyproject-hooks==1.1.0 +pyproject-hooks==1.2.0 # via # -r requirements/pip-tools.txt # build # pip-tools -pytest==8.3.2 +pytest==8.3.3 # via # -r requirements/quality.txt # pytest-cov @@ -286,7 +290,6 @@ requests==2.32.3 # edx-drf-extensions # edx-rest-api-client # responses - # slumber responses==0.25.3 # via -r requirements/quality.txt semantic-version==2.10.0 @@ -297,10 +300,6 @@ six==1.16.0 # via # -r requirements/quality.txt # edx-lint -slumber==0.7.1 - # via - # -r requirements/quality.txt - # edx-rest-api-client snowballstemmer==2.2.0 # via # -r requirements/quality.txt @@ -323,18 +322,18 @@ tomlkit==0.13.2 # via # -r requirements/quality.txt # pylint -tox==4.18.0 +tox==4.23.2 # via -r requirements/ci.txt typing-extensions==4.12.2 # via # -r requirements/quality.txt # edx-opaque-keys -urllib3==2.2.2 +urllib3==2.2.3 # via # -r requirements/quality.txt # requests # responses -virtualenv==20.26.3 +virtualenv==20.27.0 # via # -r requirements/ci.txt # tox diff --git a/requirements/doc.txt b/requirements/doc.txt index 5ef1c7d..7611091 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -14,20 +14,18 @@ attrs==24.2.0 # via -r requirements/test.txt babel==2.16.0 # via sphinx -backports-tarfile==1.2.0 - # via jaraco-context -build==1.2.1 +build==1.2.2.post1 # via -r requirements/doc.in certifi==2024.8.30 # via # -r requirements/test.txt # requests -cffi==1.17.0 +cffi==1.17.1 # via # -r requirements/test.txt # cryptography # pynacl -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via # -r requirements/test.txt # requests @@ -38,15 +36,14 @@ click==8.1.7 # edx-django-utils code-annotations==1.8.0 # via -r requirements/test.txt -coverage[toml]==7.6.1 +coverage[toml]==7.6.4 # via # -r requirements/test.txt # pytest-cov -cryptography==43.0.0 +cryptography==43.0.3 # via # -r requirements/test.txt # pyjwt - # secretstorage ddt==1.7.2 # via -r requirements/test.txt django==4.2.16 @@ -64,7 +61,7 @@ django-crum==0.7.9 # via # -r requirements/test.txt # edx-django-utils -django-model-utils==4.5.1 +django-model-utils==5.0.0 # via -r requirements/test.txt django-waffle==4.1.0 # via @@ -76,7 +73,7 @@ djangorestframework==3.15.2 # -r requirements/test.txt # drf-jwt # edx-drf-extensions -dnspython==2.6.1 +dnspython==2.7.0 # via # -r requirements/test.txt # pymongo @@ -92,29 +89,27 @@ drf-jwt==1.19.2 # via # -r requirements/test.txt # edx-drf-extensions -edx-django-utils==5.15.0 +edx-django-utils==7.0.0 # via # -r requirements/test.txt # edx-drf-extensions # edx-rest-api-client edx-drf-extensions==10.4.0 # via -r requirements/test.txt -edx-opaque-keys==2.10.0 +edx-opaque-keys==2.11.0 # via # -r requirements/test.txt # edx-drf-extensions -edx-rest-api-client==5.7.1 +edx-rest-api-client==6.0.0 # via -r requirements/test.txt -idna==3.8 +idna==3.10 # via # -r requirements/test.txt # requests imagesize==1.4.1 # via sphinx -importlib-metadata==8.4.0 - # via - # keyring - # twine +importlib-metadata==8.5.0 + # via twine iniconfig==2.0.0 # via # -r requirements/test.txt @@ -123,32 +118,28 @@ jaraco-classes==3.4.0 # via keyring jaraco-context==6.0.1 # via keyring -jaraco-functools==4.0.2 +jaraco-functools==4.1.0 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage jinja2==3.1.4 # via # -r requirements/test.txt # code-annotations # sphinx -keyring==25.3.0 +keyring==25.4.1 # via twine markdown-it-py==3.0.0 # via rich -markupsafe==2.1.5 +markupsafe==3.0.2 # via # -r requirements/test.txt # jinja2 mdurl==0.1.2 # via markdown-it-py -more-itertools==10.4.0 +more-itertools==10.5.0 # via # jaraco-classes # jaraco-functools -newrelic==9.13.0 +newrelic==10.2.0 # via # -r requirements/test.txt # edx-django-utils @@ -170,7 +161,7 @@ pluggy==1.5.0 # via # -r requirements/test.txt # pytest -psutil==6.0.0 +psutil==6.1.0 # via # -r requirements/test.txt # edx-django-utils @@ -190,7 +181,7 @@ pyjwt[crypto]==2.9.0 # drf-jwt # edx-drf-extensions # edx-rest-api-client -pymongo==4.8.0 +pymongo==4.10.1 # via # -r requirements/test.txt # edx-opaque-keys @@ -198,9 +189,9 @@ pynacl==1.5.0 # via # -r requirements/test.txt # edx-django-utils -pyproject-hooks==1.1.0 +pyproject-hooks==1.2.0 # via build -pytest==8.3.2 +pytest==8.3.3 # via # -r requirements/test.txt # pytest-cov @@ -227,7 +218,6 @@ requests==2.32.3 # edx-rest-api-client # requests-toolbelt # responses - # slumber # sphinx # twine requests-toolbelt==1.0.0 @@ -238,21 +228,15 @@ restructuredtext-lint==1.4.0 # via doc8 rfc3986==2.0.0 # via twine -rich==13.8.0 +rich==13.9.3 # via twine -secretstorage==3.3.3 - # via keyring semantic-version==2.10.0 # via # -r requirements/test.txt # edx-drf-extensions -slumber==0.7.1 - # via - # -r requirements/test.txt - # edx-rest-api-client snowballstemmer==2.2.0 # via sphinx -sphinx==8.0.2 +sphinx==8.1.3 # via -r requirements/doc.in sphinxcontrib-applehelp==2.0.0 # via sphinx @@ -287,11 +271,11 @@ typing-extensions==4.12.2 # via # -r requirements/test.txt # edx-opaque-keys -urllib3==2.2.2 +urllib3==2.2.3 # via # -r requirements/test.txt # requests # responses # twine -zipp==3.20.1 +zipp==3.20.2 # via importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index fedf88d..cf4131e 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade # -build==1.2.1 +build==1.2.2.post1 # via pip-tools click==8.1.7 # via pip-tools @@ -12,7 +12,7 @@ packaging==24.1 # via build pip-tools==7.4.1 # via -r requirements/pip-tools.in -pyproject-hooks==1.1.0 +pyproject-hooks==1.2.0 # via # build # pip-tools diff --git a/requirements/pip.txt b/requirements/pip.txt index e7f75c5..3565563 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -10,5 +10,5 @@ wheel==0.44.0 # The following packages are considered to be unsafe in a requirements file: pip==24.2 # via -r requirements/pip.in -setuptools==74.1.1 +setuptools==75.2.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 67ff2a9..ad0904d 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -8,7 +8,7 @@ asgiref==3.8.1 # via # -r requirements/test.txt # django -astroid==3.2.4 +astroid==3.3.5 # via # pylint # pylint-celery @@ -18,12 +18,12 @@ certifi==2024.8.30 # via # -r requirements/test.txt # requests -cffi==1.17.0 +cffi==1.17.1 # via # -r requirements/test.txt # cryptography # pynacl -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via # -r requirements/test.txt # requests @@ -40,17 +40,17 @@ code-annotations==1.8.0 # via # -r requirements/test.txt # edx-lint -coverage[toml]==7.6.1 +coverage[toml]==7.6.4 # via # -r requirements/test.txt # pytest-cov -cryptography==43.0.0 +cryptography==43.0.3 # via # -r requirements/test.txt # pyjwt ddt==1.7.2 # via -r requirements/test.txt -dill==0.3.8 +dill==0.3.9 # via pylint django==4.2.16 # via @@ -67,7 +67,7 @@ django-crum==0.7.9 # via # -r requirements/test.txt # edx-django-utils -django-model-utils==4.5.1 +django-model-utils==5.0.0 # via -r requirements/test.txt django-waffle==4.1.0 # via @@ -79,7 +79,7 @@ djangorestframework==3.15.2 # -r requirements/test.txt # drf-jwt # edx-drf-extensions -dnspython==2.6.1 +dnspython==2.7.0 # via # -r requirements/test.txt # pymongo @@ -87,7 +87,7 @@ drf-jwt==1.19.2 # via # -r requirements/test.txt # edx-drf-extensions -edx-django-utils==5.15.0 +edx-django-utils==7.0.0 # via # -r requirements/test.txt # edx-drf-extensions @@ -96,13 +96,13 @@ edx-drf-extensions==10.4.0 # via -r requirements/test.txt edx-lint==5.4.0 # via -r requirements/quality.in -edx-opaque-keys==2.10.0 +edx-opaque-keys==2.11.0 # via # -r requirements/test.txt # edx-drf-extensions -edx-rest-api-client==5.7.1 +edx-rest-api-client==6.0.0 # via -r requirements/test.txt -idna==3.8 +idna==3.10 # via # -r requirements/test.txt # requests @@ -118,13 +118,13 @@ jinja2==3.1.4 # via # -r requirements/test.txt # code-annotations -markupsafe==2.1.5 +markupsafe==3.0.2 # via # -r requirements/test.txt # jinja2 mccabe==0.7.0 # via pylint -newrelic==9.13.0 +newrelic==10.2.0 # via # -r requirements/test.txt # edx-django-utils @@ -136,13 +136,13 @@ pbr==6.1.0 # via # -r requirements/test.txt # stevedore -platformdirs==4.2.2 +platformdirs==4.3.6 # via pylint pluggy==1.5.0 # via # -r requirements/test.txt # pytest -psutil==6.0.0 +psutil==6.1.0 # via # -r requirements/test.txt # edx-django-utils @@ -160,7 +160,7 @@ pyjwt[crypto]==2.9.0 # drf-jwt # edx-drf-extensions # edx-rest-api-client -pylint==3.2.7 +pylint==3.3.1 # via # edx-lint # pylint-celery @@ -168,13 +168,13 @@ pylint==3.2.7 # pylint-plugin-utils pylint-celery==0.3 # via edx-lint -pylint-django==2.5.5 +pylint-django==2.6.1 # via edx-lint pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pymongo==4.8.0 +pymongo==4.10.1 # via # -r requirements/test.txt # edx-opaque-keys @@ -182,7 +182,7 @@ pynacl==1.5.0 # via # -r requirements/test.txt # edx-django-utils -pytest==8.3.2 +pytest==8.3.3 # via # -r requirements/test.txt # pytest-cov @@ -206,7 +206,6 @@ requests==2.32.3 # edx-drf-extensions # edx-rest-api-client # responses - # slumber responses==0.25.3 # via -r requirements/test.txt semantic-version==2.10.0 @@ -215,10 +214,6 @@ semantic-version==2.10.0 # edx-drf-extensions six==1.16.0 # via edx-lint -slumber==0.7.1 - # via - # -r requirements/test.txt - # edx-rest-api-client snowballstemmer==2.2.0 # via pydocstyle sqlparse==0.5.1 @@ -241,7 +236,7 @@ typing-extensions==4.12.2 # via # -r requirements/test.txt # edx-opaque-keys -urllib3==2.2.2 +urllib3==2.2.3 # via # -r requirements/test.txt # requests diff --git a/requirements/test.txt b/requirements/test.txt index fd7013b..1cbb05e 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # make upgrade @@ -14,12 +14,12 @@ certifi==2024.8.30 # via # -r requirements/base.txt # requests -cffi==1.17.0 +cffi==1.17.1 # via # -r requirements/base.txt # cryptography # pynacl -charset-normalizer==3.3.2 +charset-normalizer==3.4.0 # via # -r requirements/base.txt # requests @@ -30,9 +30,9 @@ click==8.1.7 # edx-django-utils code-annotations==1.8.0 # via -r requirements/test.in -coverage[toml]==7.6.1 +coverage[toml]==7.6.4 # via pytest-cov -cryptography==43.0.0 +cryptography==43.0.3 # via # -r requirements/base.txt # pyjwt @@ -52,7 +52,7 @@ django-crum==0.7.9 # via # -r requirements/base.txt # edx-django-utils -django-model-utils==4.5.1 +django-model-utils==5.0.0 # via -r requirements/base.txt django-waffle==4.1.0 # via @@ -64,7 +64,7 @@ djangorestframework==3.15.2 # -r requirements/base.txt # drf-jwt # edx-drf-extensions -dnspython==2.6.1 +dnspython==2.7.0 # via # -r requirements/base.txt # pymongo @@ -72,20 +72,20 @@ drf-jwt==1.19.2 # via # -r requirements/base.txt # edx-drf-extensions -edx-django-utils==5.15.0 +edx-django-utils==7.0.0 # via # -r requirements/base.txt # edx-drf-extensions # edx-rest-api-client edx-drf-extensions==10.4.0 # via -r requirements/base.txt -edx-opaque-keys==2.10.0 +edx-opaque-keys==2.11.0 # via # -r requirements/base.txt # edx-drf-extensions -edx-rest-api-client==5.7.1 +edx-rest-api-client==6.0.0 # via -r requirements/base.txt -idna==3.8 +idna==3.10 # via # -r requirements/base.txt # requests @@ -95,11 +95,11 @@ jinja2==3.1.4 # via # -r requirements/base.txt # code-annotations -markupsafe==2.1.5 +markupsafe==3.0.2 # via # -r requirements/base.txt # jinja2 -newrelic==9.13.0 +newrelic==10.2.0 # via # -r requirements/base.txt # edx-django-utils @@ -111,7 +111,7 @@ pbr==6.1.0 # stevedore pluggy==1.5.0 # via pytest -psutil==6.0.0 +psutil==6.1.0 # via # -r requirements/base.txt # edx-django-utils @@ -125,7 +125,7 @@ pyjwt[crypto]==2.9.0 # drf-jwt # edx-drf-extensions # edx-rest-api-client -pymongo==4.8.0 +pymongo==4.10.1 # via # -r requirements/base.txt # edx-opaque-keys @@ -133,7 +133,7 @@ pynacl==1.5.0 # via # -r requirements/base.txt # edx-django-utils -pytest==8.3.2 +pytest==8.3.3 # via # pytest-cov # pytest-django @@ -153,17 +153,12 @@ requests==2.32.3 # edx-drf-extensions # edx-rest-api-client # responses - # slumber responses==0.25.3 # via -r requirements/test.in semantic-version==2.10.0 # via # -r requirements/base.txt # edx-drf-extensions -slumber==0.7.1 - # via - # -r requirements/base.txt - # edx-rest-api-client sqlparse==0.5.1 # via # -r requirements/base.txt @@ -180,7 +175,7 @@ typing-extensions==4.12.2 # via # -r requirements/base.txt # edx-opaque-keys -urllib3==2.2.2 +urllib3==2.2.3 # via # -r requirements/base.txt # requests diff --git a/setup.py b/setup.py index 817fad1..f67ace4 100755 --- a/setup.py +++ b/setup.py @@ -126,7 +126,7 @@ def is_requirement(line): 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 'Natural Language :: English', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.12', ], entry_points={ 'lms.djangoapp': [ diff --git a/tox.ini b/tox.ini index 17596e6..1bf5e95 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py311-django{42} +envlist = py312-django{42} [doc8] ; D001 = Line too long From e679e669171cf8d734a2eff184f3416f4bb23391 Mon Sep 17 00:00:00 2001 From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:51:03 +0500 Subject: [PATCH 2/4] chore: resolved pylint errors --- learning_assistant/api.py | 2 +- learning_assistant/text_utils.py | 2 +- tests/test_api.py | 1 + tests/test_views.py | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/learning_assistant/api.py b/learning_assistant/api.py index 3e0b5e0..cf4985c 100644 --- a/learning_assistant/api.py +++ b/learning_assistant/api.py @@ -101,7 +101,7 @@ def get_block_content(request, user_id, course_id, unit_usage_key): return cache_data['content_length'], cache_data['content_items'] - +# pylint: disable=too-many-positional-arguments) def render_prompt_template(request, user_id, course_run_id, unit_usage_key, course_id, template_string): """ Return a rendered prompt template. diff --git a/learning_assistant/text_utils.py b/learning_assistant/text_utils.py index b97872c..a4d0846 100644 --- a/learning_assistant/text_utils.py +++ b/learning_assistant/text_utils.py @@ -20,7 +20,7 @@ def cleanup_text(text): return stripped -class _HTMLToTextHelper(HTMLParser): # lint-amnesty, pylint: disable=abstract-method +class _HTMLToTextHelper(HTMLParser): """ Helper function for html_to_text below. """ diff --git a/tests/test_api.py b/tests/test_api.py index 5cb2a43..d5f7a2c 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -252,6 +252,7 @@ def setUp(self): ) @ddt.unpack @patch('learning_assistant.api.learning_assistant_available') + # pylint: disable=too-many-positional-arguments) def test_learning_assistant_enabled( self, obj_exists, diff --git a/tests/test_views.py b/tests/test_views.py index 7ff440e..37dd6d0 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -157,6 +157,7 @@ def test_invalid_messages(self, mock_role, mock_waffle, mock_render): @patch('learning_assistant.views.CourseEnrollment.get_enrollment') @patch('learning_assistant.views.CourseMode') @override_settings(LEARNING_ASSISTANT_PROMPT_TEMPLATE='This is the default template') + # pylint: disable=too-many-positional-arguments) def test_chat_response_default( self, mock_mode, mock_enrollment, mock_role, mock_waffle, mock_chat_response, mock_render ): From 42105c36fe8038edcd6f73ed72837c2eb7678505 Mon Sep 17 00:00:00 2001 From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:26:15 +0500 Subject: [PATCH 3/4] chore: suppressed setup import-error --- learning_assistant/api.py | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/learning_assistant/api.py b/learning_assistant/api.py index cf4985c..9008994 100644 --- a/learning_assistant/api.py +++ b/learning_assistant/api.py @@ -101,6 +101,7 @@ def get_block_content(request, user_id, course_id, unit_usage_key): return cache_data['content_length'], cache_data['content_items'] + # pylint: disable=too-many-positional-arguments) def render_prompt_template(request, user_id, course_run_id, unit_usage_key, course_id, template_string): """ diff --git a/setup.py b/setup.py index f67ace4..b261bbd 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ import re import sys -from setuptools import find_packages, setup +from setuptools import find_packages, setup # pylint: disable=import-error def get_version(*file_paths): From 1ddf3bf71055c292b8d20d3c88c8b83cad4af236 Mon Sep 17 00:00:00 2001 From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:31:32 +0500 Subject: [PATCH 4/4] chore: updated pylintrc_tweaks & pylintrc disabled rules --- CHANGELOG.rst | 2 +- learning_assistant/api.py | 1 - learning_assistant/plugins.py | 1 - pylintrc | 13 ++++++++----- pylintrc_tweaks | 2 ++ setup.py | 2 +- tests/__init__.py | 0 tests/test_api.py | 1 - tests/test_views.py | 1 - 9 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 tests/__init__.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index dafd099..9b9fd36 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,7 +15,7 @@ Unreleased ********** * Add LearningAssistantMessage model -4.3.3 - 2024-10-15 +4.4.0 - 2024-10-25 ****************** * Upgraded to use ``Python 3.12`` diff --git a/learning_assistant/api.py b/learning_assistant/api.py index 9008994..3e0b5e0 100644 --- a/learning_assistant/api.py +++ b/learning_assistant/api.py @@ -102,7 +102,6 @@ def get_block_content(request, user_id, course_id, unit_usage_key): return cache_data['content_length'], cache_data['content_items'] -# pylint: disable=too-many-positional-arguments) def render_prompt_template(request, user_id, course_run_id, unit_usage_key, course_id, template_string): """ Return a rendered prompt template. diff --git a/learning_assistant/plugins.py b/learning_assistant/plugins.py index 87a4e6b..f83a1a3 100644 --- a/learning_assistant/plugins.py +++ b/learning_assistant/plugins.py @@ -1,7 +1,6 @@ """ Plugins for the Learning Assistant application. """ -# pylint: disable=import-error from openedx.core.djangoapps.course_apps.plugins import CourseApp from learning_assistant import plugins_api diff --git a/pylintrc b/pylintrc index 8d94efc..a6edcf3 100644 --- a/pylintrc +++ b/pylintrc @@ -2,7 +2,7 @@ # ** DO NOT EDIT THIS FILE ** # *************************** # -# This file was generated by edx-lint: https://github.com/edx/edx-lint +# This file was generated by edx-lint: https://github.com/openedx/edx-lint # # If you want to change this file, you have two choices, depending on whether # you want to make a local change that applies only to this repo, or whether @@ -28,7 +28,7 @@ # CENTRAL CHANGE: # # 1. Edit the pylintrc file in the edx-lint repo at -# https://github.com/edx/edx-lint/blob/master/edx_lint/files/pylintrc +# https://github.com/openedx/edx-lint/blob/master/edx_lint/files/pylintrc # # 2. install the updated version of edx-lint (in edx-lint): # @@ -64,7 +64,7 @@ # SERIOUSLY. # # ------------------------------ -# Generated by edx-lint version: 5.2.4 +# Generated by edx-lint version: 5.4.0 # ------------------------------ [MASTER] ignore = migrations @@ -259,6 +259,7 @@ enable = useless-suppression, disable = bad-indentation, + broad-exception-raised, consider-using-f-string, duplicate-code, file-ignored, @@ -290,6 +291,8 @@ disable = django-not-configured, consider-using-with, bad-option-value, + import-error, + too-many-positional-arguments, [REPORTS] output-format = text @@ -384,6 +387,6 @@ ext-import-graph = int-import-graph = [EXCEPTIONS] -overgeneral-exceptions = Exception +overgeneral-exceptions = builtins.Exception -# d103a3939f8137bacf02447b6f210552aa7f2827 +# f8335666f17965c1c4bba3fc53bf25a343eaf3bf diff --git a/pylintrc_tweaks b/pylintrc_tweaks index 7b6eb35..9076787 100644 --- a/pylintrc_tweaks +++ b/pylintrc_tweaks @@ -9,3 +9,5 @@ disable+= django-not-configured, consider-using-with, bad-option-value, + import-error, + too-many-positional-arguments, diff --git a/setup.py b/setup.py index b261bbd..f67ace4 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ import re import sys -from setuptools import find_packages, setup # pylint: disable=import-error +from setuptools import find_packages, setup def get_version(*file_paths): diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_api.py b/tests/test_api.py index d5f7a2c..5cb2a43 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -252,7 +252,6 @@ def setUp(self): ) @ddt.unpack @patch('learning_assistant.api.learning_assistant_available') - # pylint: disable=too-many-positional-arguments) def test_learning_assistant_enabled( self, obj_exists, diff --git a/tests/test_views.py b/tests/test_views.py index 37dd6d0..7ff440e 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -157,7 +157,6 @@ def test_invalid_messages(self, mock_role, mock_waffle, mock_render): @patch('learning_assistant.views.CourseEnrollment.get_enrollment') @patch('learning_assistant.views.CourseMode') @override_settings(LEARNING_ASSISTANT_PROMPT_TEMPLATE='This is the default template') - # pylint: disable=too-many-positional-arguments) def test_chat_response_default( self, mock_mode, mock_enrollment, mock_role, mock_waffle, mock_chat_response, mock_render ):