From bf82787f1153f05fc4d531baa45f79310fc0fc88 Mon Sep 17 00:00:00 2001 From: edX requirements bot Date: Fri, 12 May 2023 11:00:22 -0400 Subject: [PATCH 1/8] feat: Added support for django4.2 --- .github/workflows/ci.yml | 4 ++-- CHANGELOG.rst | 7 ++++++- setup.py | 3 ++- splash/__init__.py | 2 +- test_urls.py | 4 ++-- tests/test_splash.py | 4 +++- tox.ini | 5 +++-- 7 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36fb33c..65bf047 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: matrix: os: [ubuntu-20.04] python-version: ['3.8'] - toxenv: [quality, django32, django40] + toxenv: [quality, django32, django40, django42] steps: - uses: actions/checkout@v3 - name: setup python @@ -36,7 +36,7 @@ jobs: run: tox - name: Run Coverage - if: matrix.python-version == '3.8' && matrix.toxenv=='django32' + if: matrix.python-version == '3.8' && matrix.toxenv=='django42' uses: codecov/codecov-action@v3 with: flags: unittests diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 89a7e55..e5ed88c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,7 +16,12 @@ Unreleased * -[1.2.0] - 2022-01-26 +Added +_______ + +* Added Support for Django42. + +[1.3.0] - 2023-05-26 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Removed diff --git a/setup.py b/setup.py index 79fbb44..d88ff5b 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ def get_version(*file_paths): ], include_package_data=True, install_requires=[ - "Django<4.0" + "Django<5.0" ], license="Apache Software License 2.0", zip_safe=False, @@ -54,6 +54,7 @@ def get_version(*file_paths): 'Framework :: Django', 'Framework :: Django :: 3.2', 'Framework :: Django :: 4.0', + 'Framework :: Django :: 4.2', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', diff --git a/splash/__init__.py b/splash/__init__.py index dbfe2cd..584c6fb 100644 --- a/splash/__init__.py +++ b/splash/__init__.py @@ -2,4 +2,4 @@ Splash screen middleware for Django apps. """ -__version__ = '1.2.1' +__version__ = '1.3.0' diff --git a/test_urls.py b/test_urls.py index e66eb3d..5c7d982 100644 --- a/test_urls.py +++ b/test_urls.py @@ -1,9 +1,9 @@ """ ROOT_URLCONF for tests """ -from django.conf.urls import url +from django.urls import re_path from test_utils import views urlpatterns = [ - url(r'^home', views.home, name='home'), + re_path(r'^home', views.home, name='home'), ] diff --git a/tests/test_splash.py b/tests/test_splash.py index d3557e2..66aebd3 100644 --- a/tests/test_splash.py +++ b/tests/test_splash.py @@ -3,6 +3,7 @@ """ import logging +from unittest.mock import Mock from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser @@ -27,7 +28,8 @@ def setUp(self): Init """ super().setUp() - self.splash_middleware = SplashMiddleware() + self.mock_response = Mock() + self.splash_middleware = SplashMiddleware(self.mock_response) self.request_factory = RequestFactory(SERVER_NAME='example.org') SplashConfig().save() diff --git a/tox.ini b/tox.ini index a07e813..70b9449 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38-django{32,40}, quality +envlist = py38-django{32,40,42}, quality [doc8] max-line-length = 120 @@ -14,9 +14,10 @@ addopts = --cov splash --cov-report term-missing --cov-report xml norecursedirs = .* docs requirements [testenv] -deps = +deps = django32: Django>=3.2,<4.0 django40: Django>=4.0,<4.1 + django42: Django>=4.1,<5.0 -r{toxinidir}/requirements/test.txt commands = python -Wd -m pytest {posargs} From 21adde6e56c7bb4c690446c88c826657f28bf673 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Fri, 9 Jun 2023 18:23:20 +0500 Subject: [PATCH 2/8] feat: Added support for django4.2 --- CHANGELOG.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e5ed88c..fa3798c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,14 +16,15 @@ Unreleased * -Added -_______ - * Added Support for Django42. [1.3.0] - 2023-05-26 + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[1.2.0] - 2022-01-26 + Removed _______ From d202a066026b4ef04d6ba9d9b15d349b9540a7ee Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Fri, 9 Jun 2023 18:24:00 +0500 Subject: [PATCH 3/8] feat: Added support for django4.2 --- CHANGELOG.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fa3798c..adc87d2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -23,8 +23,6 @@ Unreleased ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -[1.2.0] - 2022-01-26 - Removed _______ From a5e6b28781fa7c7c7b64f6ef2ba2052a80ec53a2 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Fri, 9 Jun 2023 18:24:33 +0500 Subject: [PATCH 4/8] feat: Added support for django4.2 --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index adc87d2..f881a67 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -18,7 +18,7 @@ Unreleased * Added Support for Django42. -[1.3.0] - 2023-05-26 +[1.3.0] - 2023-06-09 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 3ad61bd041ebe6bc691085d5099498f93bcbc044 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Fri, 9 Jun 2023 18:24:45 +0500 Subject: [PATCH 5/8] feat: Added support for django4.2 --- CHANGELOG.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f881a67..6835fcd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -20,7 +20,6 @@ Unreleased [1.3.0] - 2023-06-09 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Removed From 1ed5c4453028afb93a20464573d8eaeb4f6894f8 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Fri, 9 Jun 2023 19:22:35 +0500 Subject: [PATCH 6/8] feat: Added support for django4.2 --- CHANGELOG.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6835fcd..83ce538 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,8 +14,6 @@ Change Log Unreleased ~~~~~~~~~~ -* - * Added Support for Django42. [1.3.0] - 2023-06-09 From 1de7c2a50070e6c54076d9f655cb226db590e9cd Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Fri, 9 Jun 2023 19:23:33 +0500 Subject: [PATCH 7/8] feat: Added support for django4.2 --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 83ce538..6835fcd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,8 @@ Change Log Unreleased ~~~~~~~~~~ +* + * Added Support for Django42. [1.3.0] - 2023-06-09 From 5986a95e890e7648d857b926369130921a1f4034 Mon Sep 17 00:00:00 2001 From: UsamaSadiq Date: Fri, 9 Jun 2023 19:23:38 +0500 Subject: [PATCH 8/8] docs: update CHANGELOG entry --- CHANGELOG.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6835fcd..e75544b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,10 +16,15 @@ Unreleased * -* Added Support for Django42. - [1.3.0] - 2023-06-09 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Added +_____ + +* Added Support for Django42. +[1.2.0] - 2022-01-26 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Removed