From c583f9462f4ba3c3b9b17f7d980335ac6c46f71c Mon Sep 17 00:00:00 2001 From: Harald Nezbeda Date: Fri, 11 Oct 2024 17:54:48 +0200 Subject: [PATCH] SIANXKE-396: Update supported version of language and frameworks --- .github/workflows/publish.yml | 4 ++-- .github/workflows/test.yml | 34 +++++++++++++++------------------- CHANGELOG.md | 20 +++++++++++++++++++- README.md | 1 + requirements.txt | 4 ++-- setup.py | 13 +++++++------ tests/test.py | 4 ++-- 7 files changed, 48 insertions(+), 32 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 809b6e5..77add22 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.9' architecture: 'x64' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7082107..dc3f92c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,39 +8,35 @@ jobs: fail-fast: false matrix: python-version: - - "3.7" - - "3.8" - "3.9" - "3.10" - django-version: - - "3.2" - - "4.0" - - "4.1" - drf-version: + - "3.11" - "3.12" - "3.13" + django-version: + - "4.2" + - "5.0" + - "5.1" + drf-version: + - "3.15" exclude: - - python-version: "3.7" - django-version: "4.0" - - python-version: "3.7" - django-version: "4.1" - - drf-version: "3.12" - django-version: "4.0" - - drf-version: "3.12" - django-version: "4.1" + - python-version: "3.9" + django-version: "5.0" + - python-version: "3.9" + django-version: "5.1" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 codecov + pip install setuptools flake8 codecov - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names @@ -75,7 +71,7 @@ jobs: coverage run --source='./drf_multitokenauth' manage.py test coverage xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 - name: Run tests run: cd tests && python manage.py test \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a6022b6..79143ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,25 @@ ## [Unreleased] + +## [2.1.0] + - Added optional "name" field for MultiToken model - Updated README test instructions +- Added Python 3.11 support +- Added Python 3.12 support +- Added Python 3.13 support +- Added Django 4.2 support +- Added Django 5.0 support +- Added Django 5.1 support +- Added Django Rest Framework 3.15 support +- Removed Python 3.7 support +- Removed Python 3.8 support +- Removed Django 3.2 support +- Removed Django 4.0 support +- Removed Django 4.1 support +- Removed Django Rest Framework 3.12 support +- Removed Django Rest Framework 3.13 support ## [2.0.0] @@ -63,7 +80,8 @@ - Internal release -[Unreleased]: https://github.com/anexia/drf-multitokenauth/compare/2.0.0...HEAD +[Unreleased]: https://github.com/anexia/drf-multitokenauth/compare/2.1.0...HEAD +[2.1.0]: https://pypi.org/project/drf-multitokenauth/2.1.0/ [2.0.0]: https://pypi.org/project/drf-multitokenauth/2.0.0/ [1.5.0]: https://pypi.org/project/django-rest-multitokenauth/1.5.0/ [1.4.0]: https://pypi.org/project/django-rest-multitokenauth/1.4.0/ diff --git a/README.md b/README.md index 5839f60..3e54142 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ If your project uses an older verison of Django or Django Rest Framework, you ca | This Project | Python Version | Django Version | Django Rest Framework | |--------------|----------------|----------------|-----------------------| +| 2.1.* | 3.9+ | 4.2, 5.0, 5.1 | 3.15 | | 2.0.* | 3.7+ | 3.2, 4.0, 4.1 | 3.12, 3.13 | | 1.5.* | 3.7+ | 3.2, 4.0, 4.1 | 3.12, 3.13 | | 1.4.* | 3.6+ | 2.2, 3.2 | 3.9, 3.10, 3.11, 3.12 | diff --git a/requirements.txt b/requirements.txt index b174f8b..d7a4387 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ -e . # Development dependencies -django>=3.2,<4 -djangorestframework>=3.13,<4 +django>=4.2,<6 +djangorestframework>=3.15,<4 diff --git a/setup.py b/setup.py index e89d3d0..1689505 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='drf-multitokenauth', - version=os.getenv('PACKAGE_VERSION', '0.0.0').replace('refs/tags/', ''), + version=os.getenv('PACKAGE_VERSION', '2.1.0').replace('refs/tags/', ''), packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]), install_requires=[ 'django-ipware==3.0.*', @@ -26,18 +26,19 @@ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', - 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.0', - 'Framework :: Django :: 4.1', + 'Framework :: Django :: 4.2', + 'Framework :: Django :: 5.0', + 'Framework :: Django :: 5.1', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], diff --git a/tests/test.py b/tests/test.py index e0a6152..8f8f66e 100644 --- a/tests/test.py +++ b/tests/test.py @@ -352,6 +352,6 @@ def test_signals(self, mock_pre_auth, mock_post_auth): self.assertTrue(mock_pre_auth.called) self.assertTrue(mock_post_auth.called) - self.assertEquals(mock_pre_auth.call_count, 1) - self.assertEquals(mock_post_auth.call_count, 1) + self.assertEqual(mock_pre_auth.call_count, 1) + self.assertEqual(mock_post_auth.call_count, 1)