From f1127f4b7bc70970526e9c0b88f5eee431f3e9ec Mon Sep 17 00:00:00 2001 From: Irtaza Akram Date: Tue, 20 Feb 2024 14:14:52 +0500 Subject: [PATCH 1/4] feat: add support for python 3.12 --- .github/workflows/ci.yml | 5 +- django_sites_extensions/__init__.py | 2 +- django_sites_extensions/apps.py | 1 - .../tests/test_middleware.py | 2 +- django_sites_extensions/tests/urls.py | 2 +- django_sites_extensions/tests/views.py | 4 +- requirements/base.txt | 14 +- requirements/ci.txt | 52 +++--- requirements/django.txt | 4 +- requirements/doc.txt | 57 ++++--- requirements/pip.txt | 14 +- requirements/pip_tools.txt | 27 ++- requirements/test.txt | 157 +++++++++--------- requirements/tox.txt | 42 +++-- setup.py | 2 +- tox.ini | 7 +- 16 files changed, 206 insertions(+), 186 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a2f025..8423c11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,11 @@ jobs: tests: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [quality, django32, django42] + python-version: ['3.8', '3.12'] + toxenv: [quality, django42] exclude: - python-version: '3.8' toxenv: quality diff --git a/django_sites_extensions/__init__.py b/django_sites_extensions/__init__.py index a8e34b3..3b65f4a 100644 --- a/django_sites_extensions/__init__.py +++ b/django_sites_extensions/__init__.py @@ -1,2 +1,2 @@ """ django_sites_extensions main module """ -__version__ = '4.0.2' +__version__ = '4.1.0' diff --git a/django_sites_extensions/apps.py b/django_sites_extensions/apps.py index bfd895a..b483f22 100644 --- a/django_sites_extensions/apps.py +++ b/django_sites_extensions/apps.py @@ -11,7 +11,6 @@ class DjangoSitesExtensionsConfig(AppConfig): # noinspection PyUnresolvedReferences def ready(self): """ Set up for django_sites_extensions app """ - # pylint: disable=unused-variable # pylint: disable=unused-import # pylint: disable=import-outside-toplevel from django_sites_extensions import models diff --git a/django_sites_extensions/tests/test_middleware.py b/django_sites_extensions/tests/test_middleware.py index 9f1b3ab..3bad070 100644 --- a/django_sites_extensions/tests/test_middleware.py +++ b/django_sites_extensions/tests/test_middleware.py @@ -17,7 +17,7 @@ class RedirectMiddlewareTestCase(TestCase): def setUp(self): super().setUp() self.middleware = RedirectMiddleware(get_response=lambda request: None) - self.site = Site.objects.get(id=1) # pylint: disable=no-member + self.site = Site.objects.get(id=1) self.redirect = Redirect.objects.create(site_id=1, old_path='/foo', new_path='http://example.com/bar') def _make_request(self, path): diff --git a/django_sites_extensions/tests/urls.py b/django_sites_extensions/tests/urls.py index 74a48c2..f6b2772 100644 --- a/django_sites_extensions/tests/urls.py +++ b/django_sites_extensions/tests/urls.py @@ -1,8 +1,8 @@ """ ROOT_URLCONF for tests """ -from django_sites_extensions.tests import views from django.urls import path +from django_sites_extensions.tests import views urlpatterns = [ path('home', views.test, name='home'), diff --git a/django_sites_extensions/tests/views.py b/django_sites_extensions/tests/views.py index f28bdf5..2ac0601 100644 --- a/django_sites_extensions/tests/views.py +++ b/django_sites_extensions/tests/views.py @@ -2,11 +2,11 @@ from django.http import HttpResponse -def test(request): # pylint: disable=unused-argument +def test(request): """ Placeholder test view """ return HttpResponse("ok") -def login(request): # pylint: disable=unused-argument +def login(request): """ Placeholder test view """ return HttpResponse("login require") diff --git a/requirements/base.txt b/requirements/base.txt index 2d32a4b..7a694e7 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,16 +1,18 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -asgiref==3.5.0 +asgiref==3.7.2 # via django -django==3.2.12 +django==3.2.24 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in -pytz==2021.3 +pytz==2024.1 # via django -sqlparse==0.4.2 +sqlparse==0.4.4 # via django +typing-extensions==4.9.0 + # via asgiref diff --git a/requirements/ci.txt b/requirements/ci.txt index 18d8ca4..73222b8 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,62 +1,56 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -certifi==2021.10.8 - # via requests -charset-normalizer==2.0.12 - # via requests -coverage==6.3.1 - # via codecov -distlib==0.3.4 +cachetools==5.3.2 # via # -r requirements/tox.txt - # virtualenv -filelock==3.5.0 + # tox +chardet==5.2.0 # via # -r requirements/tox.txt # tox - # virtualenv -idna==3.3 - # via requests -packaging==21.3 +colorama==0.4.6 # via # -r requirements/tox.txt # tox -platformdirs==2.5.0 +distlib==0.3.8 + # via + # -r requirements/tox.txt + # virtualenv +filelock==3.13.1 # via # -r requirements/tox.txt + # tox # virtualenv -pluggy==1.0.0 +packaging==23.2 # via # -r requirements/tox.txt + # pyproject-api # tox -py==1.11.0 +platformdirs==4.2.0 # via # -r requirements/tox.txt # tox -pyparsing==3.0.7 + # virtualenv +pluggy==1.4.0 # via # -r requirements/tox.txt - # packaging -requests==2.27.1 - # via codecov -six==1.16.0 + # tox +pyproject-api==1.6.1 # via # -r requirements/tox.txt # tox - # virtualenv -toml==0.10.2 +tomli==2.0.1 # via # -r requirements/tox.txt + # pyproject-api # tox -tox==3.24.5 +tox==4.13.0 # via -r requirements/tox.txt -urllib3==1.26.8 - # via requests -virtualenv==20.13.1 +virtualenv==20.25.0 # via # -r requirements/tox.txt # tox diff --git a/requirements/django.txt b/requirements/django.txt index 5b8c8ab..4f6ee36 100644 --- a/requirements/django.txt +++ b/requirements/django.txt @@ -1,2 +1,2 @@ -django==3.2.12 -asgiref==3.5.0 +django==3.2.24 +asgiref==3.7.2 diff --git a/requirements/doc.txt b/requirements/doc.txt index e1d36c1..7c296d8 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,72 +1,75 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -alabaster==0.7.12 +alabaster==0.7.13 # via sphinx -asgiref==3.5.0 +asgiref==3.7.2 # via django -babel==2.9.1 +babel==2.14.0 # via sphinx -certifi==2021.10.8 +certifi==2024.2.2 # via requests -charset-normalizer==2.0.12 +charset-normalizer==3.3.2 # via requests -django==3.2.12 +django==3.2.24 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in -docutils==0.17.1 +docutils==0.20.1 # via # sphinx # sphinx-rtd-theme -idna==3.3 +idna==3.6 # via requests -imagesize==1.3.0 +imagesize==1.4.1 # via sphinx -importlib-metadata==4.11.1 +importlib-metadata==7.0.1 # via sphinx -jinja2==3.0.3 +jinja2==3.1.3 # via sphinx -markupsafe==2.0.1 +markupsafe==2.1.5 # via jinja2 -packaging==21.3 +packaging==23.2 # via sphinx -pygments==2.11.2 +pygments==2.17.2 # via sphinx -pyparsing==3.0.7 - # via packaging -pytz==2021.3 +pytz==2024.1 # via # babel # django -requests==2.27.1 +requests==2.31.0 # via sphinx snowballstemmer==2.2.0 # via sphinx -sphinx==4.4.0 +sphinx==7.1.2 # via # -r requirements/doc.in # sphinx-rtd-theme -sphinx-rtd-theme==1.0.0 + # sphinxcontrib-jquery +sphinx-rtd-theme==2.0.0 # via -r requirements/doc.in -sphinxcontrib-applehelp==1.0.2 +sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 # via sphinx -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 # via sphinx +sphinxcontrib-jquery==4.1 + # via sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -sqlparse==0.4.2 +sqlparse==0.4.4 # via django -urllib3==1.26.8 +typing-extensions==4.9.0 + # via asgiref +urllib3==2.2.1 # via requests -zipp==3.7.0 +zipp==3.17.0 # via importlib-metadata diff --git a/requirements/pip.txt b/requirements/pip.txt index a1ebd56..71954cc 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,16 +1,14 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -wheel==0.37.1 +wheel==0.42.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==22.0.3 +pip==24.0 + # via -r requirements/pip.in +setuptools==69.1.0 # via -r requirements/pip.in -setuptools==59.8.0 - # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/pip.in diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index 6d571f6..fb84d10 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -1,19 +1,32 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -click==8.0.3 +build==1.0.3 # via pip-tools -pep517==0.12.0 +click==8.1.7 # via pip-tools -pip-tools==6.5.1 +importlib-metadata==7.0.1 + # via build +packaging==23.2 + # via build +pip-tools==7.4.0 # via -r requirements/pip_tools.in +pyproject-hooks==1.0.0 + # via + # build + # pip-tools tomli==2.0.1 - # via pep517 -wheel==0.37.1 + # via + # build + # pip-tools + # pyproject-hooks +wheel==0.42.0 # via pip-tools +zipp==3.17.0 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/test.txt b/requirements/test.txt index 9276236..bc2e6c0 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,86 +1,95 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -astroid==2.9.3 + # via + # -r requirements/base.txt + # django +astroid==3.0.3 # via # pylint # pylint-celery -attrs==21.4.0 - # via pytest -bleach==4.1.0 - # via readme-renderer -certifi==2021.10.8 +certifi==2024.2.2 # via requests -charset-normalizer==2.0.12 +charset-normalizer==3.3.2 # via requests -click==8.0.3 +click==8.1.7 # via # click-log # code-annotations # edx-lint -click-log==0.3.2 +click-log==0.4.0 # via edx-lint -code-annotations==1.3.0 +code-annotations==1.6.0 # via edx-lint -colorama==0.4.4 - # via twine -coverage[toml]==6.3.1 +coverage[toml]==7.4.1 # via # -r requirements/test.in # pytest-cov +dill==0.3.8 + # via pylint # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt -django-dynamic-fixture==3.1.2 +django-dynamic-fixture==4.0.1 # via -r requirements/test.in -docutils==0.18.1 +docutils==0.20.1 # via readme-renderer -edx-lint==5.2.1 +edx-lint==5.3.6 # via -r requirements/test.in -idna==3.3 +exceptiongroup==1.2.0 + # via pytest +idna==3.6 # via requests -importlib-metadata==4.11.1 +importlib-metadata==7.0.1 # via # keyring # twine -iniconfig==1.1.1 +importlib-resources==6.1.1 + # via keyring +iniconfig==2.0.0 # via pytest -isort==5.10.1 +isort==5.13.2 # via pylint -jinja2==3.0.3 +jaraco-classes==3.3.1 + # via keyring +jinja2==3.1.3 # via code-annotations -keyring==23.5.0 +keyring==24.3.0 # via twine -lazy-object-proxy==1.7.1 - # via astroid -markupsafe==2.0.1 +markdown-it-py==3.0.0 + # via rich +markupsafe==2.1.5 # via jinja2 -mccabe==0.6.1 +mccabe==0.7.0 # via pylint -mock==4.0.3 +mdurl==0.1.2 + # via markdown-it-py +mock==5.1.0 # via -r requirements/test.in -packaging==21.3 - # via - # bleach - # pytest -pbr==5.8.1 +more-itertools==10.2.0 + # via jaraco-classes +nh3==0.2.15 + # via readme-renderer +packaging==23.2 + # via pytest +pbr==6.0.0 # via stevedore pep8==1.7.1 # via -r requirements/test.in -pkginfo==1.8.2 +pkginfo==1.9.6 # via twine -platformdirs==2.5.0 +platformdirs==4.2.0 # via pylint -pluggy==1.0.0 - # via pytest -py==1.11.0 +pluggy==1.4.0 # via pytest -pygments==2.11.2 - # via readme-renderer -pylint==2.12.2 +pygments==2.17.2 + # via + # readme-renderer + # rich +pylint==3.0.3 # via # edx-lint # pylint-celery @@ -88,77 +97,71 @@ pylint==2.12.2 # pylint-plugin-utils pylint-celery==0.3 # via edx-lint -pylint-django==2.5.0 +pylint-django==2.5.5 # via edx-lint -pylint-plugin-utils==0.7 +pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pyparsing==3.0.7 - # via packaging -pytest==7.0.1 +pytest==8.0.1 # via # pytest-cov # pytest-django -pytest-cov==3.0.0 +pytest-cov==4.1.0 # via -r requirements/test.in -pytest-django==4.5.2 +pytest-django==4.8.0 # via -r requirements/test.in -python-slugify==5.0.2 +python-slugify==8.0.4 # via code-annotations -pytz==2021.3 +pytz==2024.1 # via # -r requirements/base.txt # django -pyyaml==6.0 +pyyaml==6.0.1 # via code-annotations -readme-renderer==32.0 +readme-renderer==42.0 # via twine -requests==2.27.1 +requests==2.31.0 # via # requests-toolbelt # twine -requests-toolbelt==0.9.1 +requests-toolbelt==1.0.0 # via twine rfc3986==2.0.0 # via twine +rich==13.7.0 + # via twine six==1.16.0 - # via - # bleach - # django-dynamic-fixture - # edx-lint -sqlparse==0.4.2 + # via edx-lint +sqlparse==0.4.4 # via # -r requirements/base.txt # django -stevedore==3.5.0 +stevedore==5.1.0 # via code-annotations text-unidecode==1.3 # via python-slugify -toml==0.10.2 - # via pylint tomli==2.0.1 # via # coverage + # pylint # pytest -tqdm==4.62.3 - # via twine -twine==3.8.0 +tomlkit==0.12.3 + # via pylint +twine==5.0.0 # via -r requirements/test.in -typing-extensions==4.1.1 +typing-extensions==4.9.0 # via + # -r requirements/base.txt + # asgiref # astroid # pylint -urllib3==1.26.8 + # rich +urllib3==2.2.1 # via # requests # twine -webencodings==0.5.1 - # via bleach -wrapt==1.13.3 - # via astroid -zipp==3.7.0 - # via importlib-metadata - -# The following packages are considered to be unsafe in a requirements file: -# setuptools +zipp==3.17.0 + # via + # importlib-metadata + # importlib-resources diff --git a/requirements/tox.txt b/requirements/tox.txt index 16929e4..51576e8 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -1,32 +1,38 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # make upgrade # -distlib==0.3.4 +cachetools==5.3.2 + # via tox +chardet==5.2.0 + # via tox +colorama==0.4.6 + # via tox +distlib==0.3.8 # via virtualenv -filelock==3.5.0 +filelock==3.13.1 # via # tox # virtualenv -packaging==21.3 - # via tox -platformdirs==2.5.0 - # via virtualenv -pluggy==1.0.0 - # via tox -py==1.11.0 - # via tox -pyparsing==3.0.7 - # via packaging -six==1.16.0 +packaging==23.2 + # via + # pyproject-api + # tox +platformdirs==4.2.0 # via # tox # virtualenv -toml==0.10.2 +pluggy==1.4.0 # via tox -tox==3.24.5 +pyproject-api==1.6.1 + # via tox +tomli==2.0.1 + # via + # pyproject-api + # tox +tox==4.13.0 # via -r requirements/tox.in -virtualenv==20.13.1 +virtualenv==20.25.0 # via tox diff --git a/setup.py b/setup.py index 330854d..3a27ec8 100644 --- a/setup.py +++ b/setup.py @@ -133,11 +133,11 @@ def get_version(*file_paths): 'License :: OSI Approved :: GNU Affero General Public License v3', 'Programming Language :: Python', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.12', 'Topic :: Internet', 'Intended Audience :: Developers', 'Environment :: Web Environment', 'Framework :: Django', - 'Framework :: Django :: 3.2', 'Framework :: Django :: 4.2', ], keywords='Django sites edx', diff --git a/tox.ini b/tox.ini index f93229e..be4063e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,13 @@ [tox] -envlist = python{3.8}-django{32, 42},quality,docs +envlist = python{38,312}-django{42},quality,docs [testenv] setenv = PYTHONPATH = {toxinidir} DJANGO_SETTINGS_MODULE = test_settings -deps = - django32: -r requirements/django.txt +deps = + setuptools + wheel django42: -r requirements/django42.txt -r requirements/test.txt commands = From c5e2e2340f6a31d81ed90dab68e1a87bae17268a Mon Sep 17 00:00:00 2001 From: Irtaza Akram Date: Mon, 8 Apr 2024 16:13:59 +0500 Subject: [PATCH 2/4] fix: add support for python 3.11 --- .github/workflows/ci.yml | 6 +--- Makefile | 10 +++--- requirements/base.in | 2 ++ requirements/base.txt | 18 +++++++--- requirements/ci.txt | 10 +++--- requirements/constraints.txt | 4 +++ requirements/django.txt | 4 +-- requirements/doc.txt | 30 +++++++++++------ requirements/pip.txt | 4 +-- requirements/pip_tools.txt | 16 +++++---- requirements/test.txt | 64 ++++++++++++++++++++++-------------- requirements/tox.txt | 10 +++--- setup.py | 1 + tox.ini | 4 +-- 14 files changed, 110 insertions(+), 73 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8423c11..f122ae6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,14 +11,10 @@ jobs: tests: runs-on: ${{ matrix.os }} strategy: - fail-fast: false matrix: os: [ubuntu-20.04] - python-version: ['3.8', '3.12'] + python-version: ['3.8', '3.11', '3.12'] toxenv: [quality, django42] - exclude: - - python-version: '3.8' - toxenv: quality steps: - name: checkout repo diff --git a/Makefile b/Makefile index 0103a70..e9c0cea 100644 --- a/Makefile +++ b/Makefile @@ -23,11 +23,11 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy pip-compile --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in pip install -qr requirements/pip.txt pip install -qr requirements/pip_tools.txt - pip-compile --upgrade -o requirements/base.txt requirements/base.in - pip-compile --upgrade -o requirements/doc.txt requirements/doc.in - pip-compile --upgrade -o requirements/test.txt requirements/test.in - pip-compile --upgrade -o requirements/tox.txt requirements/tox.in - pip-compile --upgrade -o requirements/ci.txt requirements/ci.in + pip-compile --upgrade --allow-unsafe -o requirements/base.txt requirements/base.in + pip-compile --upgrade --allow-unsafe -o requirements/doc.txt requirements/doc.in + pip-compile --upgrade --allow-unsafe -o requirements/test.txt requirements/test.in + pip-compile --upgrade --allow-unsafe -o requirements/tox.txt requirements/tox.in + pip-compile --upgrade --allow-unsafe -o requirements/ci.txt requirements/ci.in # Let tox control the Django version version for tests grep -e "^django==" requirements/test.txt > requirements/django.txt grep -e "^asgiref==" requirements/test.txt >> requirements/django.txt diff --git a/requirements/base.in b/requirements/base.in index 2e53fd4..fa3bb95 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -2,3 +2,5 @@ -c constraints.txt Django +setuptools +wheel diff --git a/requirements/base.txt b/requirements/base.txt index 7a694e7..2ed1fdd 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,15 +4,23 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via django -django==3.2.24 +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # django +django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in -pytz==2024.1 - # via django sqlparse==0.4.4 # via django -typing-extensions==4.9.0 +typing-extensions==4.11.0 # via asgiref +wheel==0.43.0 + # via -r requirements/base.in + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.2.0 + # via -r requirements/base.in diff --git a/requirements/ci.txt b/requirements/ci.txt index 73222b8..a076b8b 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,7 +4,7 @@ # # make upgrade # -cachetools==5.3.2 +cachetools==5.3.3 # via # -r requirements/tox.txt # tox @@ -20,12 +20,12 @@ distlib==0.3.8 # via # -r requirements/tox.txt # virtualenv -filelock==3.13.1 +filelock==3.13.3 # via # -r requirements/tox.txt # tox # virtualenv -packaging==23.2 +packaging==24.0 # via # -r requirements/tox.txt # pyproject-api @@ -48,9 +48,9 @@ tomli==2.0.1 # -r requirements/tox.txt # pyproject-api # tox -tox==4.13.0 +tox==4.14.2 # via -r requirements/tox.txt -virtualenv==20.25.0 +virtualenv==20.25.1 # via # -r requirements/tox.txt # tox diff --git a/requirements/constraints.txt b/requirements/constraints.txt index f9ea41a..4ea57c8 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -10,3 +10,7 @@ # This file contains all common constraints for edx-repos -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + + +# Temporary to Support the python 3.11 Upgrade +backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library diff --git a/requirements/django.txt b/requirements/django.txt index 4f6ee36..df0dab3 100644 --- a/requirements/django.txt +++ b/requirements/django.txt @@ -1,2 +1,2 @@ -django==3.2.24 -asgiref==3.7.2 +django==4.2.11 +asgiref==3.8.1 diff --git a/requirements/doc.txt b/requirements/doc.txt index 7c296d8..6a228e0 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -6,15 +6,19 @@ # alabaster==0.7.13 # via sphinx -asgiref==3.7.2 +asgiref==3.8.1 # via django babel==2.14.0 # via sphinx +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # django certifi==2024.2.2 # via requests charset-normalizer==3.3.2 # via requests -django==3.2.24 +django==4.2.11 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in @@ -26,20 +30,20 @@ idna==3.6 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.1 - # via sphinx +importlib-metadata==6.11.0 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # sphinx jinja2==3.1.3 # via sphinx markupsafe==2.1.5 # via jinja2 -packaging==23.2 +packaging==24.0 # via sphinx pygments==2.17.2 # via sphinx pytz==2024.1 - # via - # babel - # django + # via babel requests==2.31.0 # via sphinx snowballstemmer==2.2.0 @@ -67,9 +71,15 @@ sphinxcontrib-serializinghtml==1.1.5 # via sphinx sqlparse==0.4.4 # via django -typing-extensions==4.9.0 +typing-extensions==4.11.0 # via asgiref urllib3==2.2.1 # via requests -zipp==3.17.0 +wheel==0.43.0 + # via -r requirements/base.in +zipp==3.18.1 # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.2.0 + # via -r requirements/base.in diff --git a/requirements/pip.txt b/requirements/pip.txt index 71954cc..cf44902 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.42.0 +wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: pip==24.0 # via -r requirements/pip.in -setuptools==69.1.0 +setuptools==69.2.0 # via -r requirements/pip.in diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index fb84d10..e64299a 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -4,15 +4,17 @@ # # make upgrade # -build==1.0.3 +build==1.2.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==7.0.1 - # via build -packaging==23.2 +importlib-metadata==6.11.0 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # build +packaging==24.0 # via build -pip-tools==7.4.0 +pip-tools==7.4.1 # via -r requirements/pip_tools.in pyproject-hooks==1.0.0 # via @@ -23,9 +25,9 @@ tomli==2.0.1 # build # pip-tools # pyproject-hooks -wheel==0.42.0 +wheel==0.43.0 # via pip-tools -zipp==3.17.0 +zipp==3.18.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/test.txt b/requirements/test.txt index bc2e6c0..edb3e67 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -7,10 +7,17 @@ # via # -r requirements/base.txt # django -astroid==3.0.3 +astroid==3.1.0 # via # pylint # pylint-celery +backports-tarfile==1.0.0 + # via jaraco-context +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/base.txt + # django certifi==2024.2.2 # via requests charset-normalizer==3.3.2 @@ -22,9 +29,9 @@ click==8.1.7 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.6.0 +code-annotations==1.8.0 # via edx-lint -coverage[toml]==7.4.1 +coverage[toml]==7.4.4 # via # -r requirements/test.in # pytest-cov @@ -43,21 +50,26 @@ exceptiongroup==1.2.0 # via pytest idna==3.6 # via requests -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # keyring # twine -importlib-resources==6.1.1 +importlib-resources==6.4.0 # via keyring iniconfig==2.0.0 # via pytest isort==5.13.2 # via pylint -jaraco-classes==3.3.1 +jaraco-classes==3.4.0 + # via keyring +jaraco-context==5.3.0 + # via keyring +jaraco-functools==4.0.0 # via keyring jinja2==3.1.3 # via code-annotations -keyring==24.3.0 +keyring==25.1.0 # via twine markdown-it-py==3.0.0 # via rich @@ -70,16 +82,18 @@ mdurl==0.1.2 mock==5.1.0 # via -r requirements/test.in more-itertools==10.2.0 - # via jaraco-classes -nh3==0.2.15 + # via + # jaraco-classes + # jaraco-functools +nh3==0.2.17 # via readme-renderer -packaging==23.2 +packaging==24.0 # via pytest pbr==6.0.0 # via stevedore pep8==1.7.1 # via -r requirements/test.in -pkginfo==1.9.6 +pkginfo==1.10.0 # via twine platformdirs==4.2.0 # via pylint @@ -89,7 +103,7 @@ pygments==2.17.2 # via # readme-renderer # rich -pylint==3.0.3 +pylint==3.1.0 # via # edx-lint # pylint-celery @@ -103,23 +117,19 @@ pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pytest==8.0.1 +pytest==8.1.1 # via # pytest-cov # pytest-django -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via -r requirements/test.in pytest-django==4.8.0 # via -r requirements/test.in python-slugify==8.0.4 # via code-annotations -pytz==2024.1 - # via - # -r requirements/base.txt - # django pyyaml==6.0.1 # via code-annotations -readme-renderer==42.0 +readme-renderer==43.0 # via twine requests==2.31.0 # via @@ -129,7 +139,7 @@ requests-toolbelt==1.0.0 # via twine rfc3986==2.0.0 # via twine -rich==13.7.0 +rich==13.7.1 # via twine six==1.16.0 # via edx-lint @@ -137,7 +147,7 @@ sqlparse==0.4.4 # via # -r requirements/base.txt # django -stevedore==5.1.0 +stevedore==5.2.0 # via code-annotations text-unidecode==1.3 # via python-slugify @@ -146,11 +156,11 @@ tomli==2.0.1 # coverage # pylint # pytest -tomlkit==0.12.3 +tomlkit==0.12.4 # via pylint twine==5.0.0 # via -r requirements/test.in -typing-extensions==4.9.0 +typing-extensions==4.11.0 # via # -r requirements/base.txt # asgiref @@ -161,7 +171,13 @@ urllib3==2.2.1 # via # requests # twine -zipp==3.17.0 +wheel==0.43.0 + # via -r requirements/base.txt +zipp==3.18.1 # via # importlib-metadata # importlib-resources + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.2.0 + # via -r requirements/base.txt diff --git a/requirements/tox.txt b/requirements/tox.txt index 51576e8..cc5293d 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -4,7 +4,7 @@ # # make upgrade # -cachetools==5.3.2 +cachetools==5.3.3 # via tox chardet==5.2.0 # via tox @@ -12,11 +12,11 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.13.1 +filelock==3.13.3 # via # tox # virtualenv -packaging==23.2 +packaging==24.0 # via # pyproject-api # tox @@ -32,7 +32,7 @@ tomli==2.0.1 # via # pyproject-api # tox -tox==4.13.0 +tox==4.14.2 # via -r requirements/tox.in -virtualenv==20.25.0 +virtualenv==20.25.1 # via tox diff --git a/setup.py b/setup.py index 3a27ec8..367b21a 100644 --- a/setup.py +++ b/setup.py @@ -133,6 +133,7 @@ def get_version(*file_paths): 'License :: OSI Approved :: GNU Affero General Public License v3', 'Programming Language :: Python', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Topic :: Internet', 'Intended Audience :: Developers', diff --git a/tox.ini b/tox.ini index be4063e..b5c33ab 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,11 @@ [tox] -envlist = python{38,312}-django{42},quality,docs +envlist = python{38,311,312}-django{42},quality,docs [testenv] setenv = PYTHONPATH = {toxinidir} DJANGO_SETTINGS_MODULE = test_settings deps = - setuptools - wheel django42: -r requirements/django42.txt -r requirements/test.txt commands = From 805af7ff0fedb8b033ebaebea8c4dddd6a11d55b Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 17 Apr 2024 13:03:05 -0400 Subject: [PATCH 3/4] build: Update codecov and use new secret. The codecov upload token was added out of band to the repo so that we can go to the latest version which will hopefully be less inconsistent with the uploads. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f122ae6..0698e54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,8 @@ jobs: - name: Run Coverage if: matrix.python-version == '3.8' && matrix.toxenv=='django42' - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: flags: unittests fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} From 285ae8ef1e86a9ab10e8e84b5023095c9f35ebcf Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Wed, 17 Apr 2024 16:26:11 -0400 Subject: [PATCH 4/4] build: Output xml coverage data for codecov to pickup. It doesn't seem to like just the .coverage file. --- tox.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index b5c33ab..48d3c89 100644 --- a/tox.ini +++ b/tox.ini @@ -2,17 +2,17 @@ envlist = python{38,311,312}-django{42},quality,docs [testenv] -setenv = +setenv = PYTHONPATH = {toxinidir} DJANGO_SETTINGS_MODULE = test_settings deps = django42: -r requirements/django42.txt -r requirements/test.txt -commands = - pytest --cov=django_sites_extensions +commands = + pytest --cov=django_sites_extensions --cov-report=xml [testenv:quality] -commands = +commands = pep8 --config=.pep8 django_sites_extensions pylint --rcfile pylintrc django_sites_extensions python setup.py bdist_wheel