From 44977b185e509b3a52d013a973f45368ad466a3c Mon Sep 17 00:00:00 2001 From: Jamaal Scarlett Date: Sat, 27 Apr 2024 18:25:02 -0400 Subject: [PATCH] Remove python 3.6 support. (#718) * Remove python 3.6 support. * Remove unsupported code --- .github/workflows/test.yml | 2 +- README.rst | 2 +- setup.cfg | 3 +-- tests/test_admin.py | 7 +------ tox.ini | 3 +-- 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d312ecf..75779548 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.6', '3.7', '3.8', '3.9'] + python-version: ['3.7', '3.8', '3.9'] steps: - uses: actions/checkout@v2 diff --git a/README.rst b/README.rst index 7e0d691e..2088c8c1 100644 --- a/README.rst +++ b/README.rst @@ -31,7 +31,7 @@ UPDATE_ON_DUPLICATE_REG_ID: Transform create of an existing Device (based on reg Dependencies ------------ -- Python 3.6+ +- Python 3.7+ - Django 2.2+ - For the API module, Django REST Framework 3.7+ is required. - For WebPush (WP), pywebpush 1.3.0+ is required (optional). py-vapid 1.3.0+ is required for generating the WebPush private key; however this diff --git a/setup.cfg b/setup.cfg index f471a1d0..83bac5a1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,7 +18,6 @@ classifiers = License :: OSI Approved :: MIT License Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 @@ -26,7 +25,7 @@ classifiers = Topic :: System :: Networking [options] -python_requires = >= 3.6 +python_requires = >= 3.7 packages = find: install_requires = Django>=2.2 diff --git a/tests/test_admin.py b/tests/test_admin.py index b7c3a14c..65378801 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py @@ -126,12 +126,7 @@ def test_send_bulk_messages_action_fail(self): self.assertEqual(message.token, "abc") self.assertEqual(message.android.notification.body, "Test bulk notification") - # 3.6 adds a `,` to the string representation of the exception - python_version = sys.version_info[:2] - if python_version >= (3, 7): - error_message = "Some messages could not be processed: UnregisteredError('error')" - else: - error_message = "Some messages could not be processed: UnregisteredError('error',)" + error_message = "Some messages could not be processed: UnregisteredError('error')" admin.message_user.assert_called_once_with( request, error_message, level=messages.ERROR diff --git a/tox.ini b/tox.ini index a990906f..1603910d 100644 --- a/tox.ini +++ b/tox.ini @@ -2,13 +2,12 @@ skipsdist = False usedevelop = true envlist = - py{36,37,38,39}-dj{22,32} + py{37,38,39}-dj{22,32} py{38,39}-dj{40,405} flake8 [gh-actions] python = - 3.6: py36 3.7: py37 3.8: py38 3.9: py39, flake8