]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Add Python 3.10 support, drop Python 3.6 support
authorStephen Finucane <stephen@that.guru>
Wed, 23 Feb 2022 13:42:45 +0000 (13:42 +0000)
committerStephen Finucane <stephen@that.guru>
Wed, 23 Feb 2022 16:59:55 +0000 (16:59 +0000)
Signed-off-by: Stephen Finucane <stephen@that.guru>
docs/deployment/installation.rst
docs/development/installation.rst
patchwork/tests/fuzztests/earlyfail.mbox [deleted file]
patchwork/tests/test_parser.py
releasenotes/notes/python-3-10-support-6477dd1fe07c4224.yaml [new file with mode: 0644]
tox.ini

index 14ad746225426e3fc1a20791ebcb76cd5c72d138..99c03d903084d19b968b0f267a5da60601875cff 100644 (file)
@@ -166,7 +166,7 @@ We will install this under ``/opt``, though this is only a suggestion:
    __ https://docs.djangoproject.com/en/2.2/intro/tutorial01/#creating-a-project
 
 Next we require Python. If not already installed, then you should do so now.
-Patchwork supports Python 3.6+. Python 3 is installed by default, but you
+Patchwork supports Python 3.7+. Python 3 is installed by default, but you
 should validate this now:
 
 .. code-block:: shell
index 877c2f67de8a007fdaff3c639f24b49e5a8384e3..937d9165e0262d06316a01c5c788f0d60d6433ad 100644 (file)
@@ -178,7 +178,7 @@ Python Requirements
 ^^^^^^^^^^^^^^^^^^^
 
 To develop Python-based software you first need Python. Patchwork supports
-Python 3.6+. Python 3 will be installed by default on many installations,
+Python 3.7+. Python 3 will be installed by default on many installations,
 though a suitable version can usually be installed manually using the
 ``python3`` package.
 
diff --git a/patchwork/tests/fuzztests/earlyfail.mbox b/patchwork/tests/fuzztests/earlyfail.mbox
deleted file mode 100644 (file)
index 47db41d..0000000
Binary files a/patchwork/tests/fuzztests/earlyfail.mbox and /dev/null differ
index d0c5c2d79a1832dcea8db579cf6781d06cdc53ab..12f984bc9efed8f04b5532f51b2934c7a02c4de7 100644 (file)
@@ -9,8 +9,6 @@ from email.mime.multipart import MIMEMultipart
 from email.mime.text import MIMEText
 from email.utils import make_msgid
 import os
-import sys
-import unittest
 
 from django.test import TestCase
 from django.test import TransactionTestCase
@@ -1156,13 +1154,6 @@ class WeirdMailTest(TransactionTestCase):
         except ValueError:
             pass
 
-    @unittest.skipUnless((3, 0) <= sys.version_info < (3, 7),
-                         'Breaks only on Python 3.0 - 3.6')
-    def test_early_fail(self):
-        file_path = os.path.join(TEST_FUZZ_DIR, 'earlyfail.mbox')
-        with self.assertRaises(AttributeError):
-            load_mail(file_path)
-
     def test_base64err(self):
         self._test_patch('base64err.mbox')
 
diff --git a/releasenotes/notes/python-3-10-support-6477dd1fe07c4224.yaml b/releasenotes/notes/python-3-10-support-6477dd1fe07c4224.yaml
new file mode 100644 (file)
index 0000000..628fd98
--- /dev/null
@@ -0,0 +1,9 @@
+---
+features:
+  - |
+    `Python 3.10 <https://www.python.org/downloads/release/python-3100/>`_ is
+    now supported.
+upgrade:
+  - |
+    Python 3.6 is no longer supported. It is no longer supported upstream and
+    most distributions provide a newer version.
diff --git a/tox.ini b/tox.ini
index 72419bedf9ce7bd9b2c09fcd1f71b62555ca47d4..fe42ab4d7606812a9321ebf71509d2d32b0bf111 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
 [tox]
 minversion = 3.2
-envlist = pep8,docs,py{36,37,38,39}-django{22,32},py{38,39,310}-django{40,}
+envlist = pep8,docs,py{37,38,39}-django{22,32},py{38,39,310}-django{40}
 skipsdist = true
 ignore_basepython_conflict = true
 
@@ -22,7 +22,7 @@ setenv =
     PYTHONDONTWRITEBYTECODE = 1
     PYTHONDEVMODE = 1
     py36: PYTHONWARNINGS = once,ignore::ImportWarning:backports
-    py{37,38,39}: PYTHONWARNINGS = once
+    py{37,38,39,310}: PYTHONWARNINGS = once
 passenv =
     http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
     DATABASE_TYPE DATABASE_USER DATABASE_PASSWORD DATABASE_HOST
@@ -79,7 +79,7 @@ commands =
 
 [gh-actions]
 python =
-    3.6: py36
     3.7: py37
     3.8: py38
     3.9: py39
+    3.10: py39