From: Stephen Finucane Date: Wed, 23 Feb 2022 13:42:45 +0000 (+0000) Subject: Add Python 3.10 support, drop Python 3.6 support X-Git-Tag: v3.1.0~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dda1112349cfe346695a7e1d2bb0ea78b0d7f28b;p=thirdparty%2Fpatchwork.git Add Python 3.10 support, drop Python 3.6 support Signed-off-by: Stephen Finucane --- diff --git a/docs/deployment/installation.rst b/docs/deployment/installation.rst index 14ad7462..99c03d90 100644 --- a/docs/deployment/installation.rst +++ b/docs/deployment/installation.rst @@ -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 diff --git a/docs/development/installation.rst b/docs/development/installation.rst index 877c2f67..937d9165 100644 --- a/docs/development/installation.rst +++ b/docs/development/installation.rst @@ -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 index 47db41d1..00000000 Binary files a/patchwork/tests/fuzztests/earlyfail.mbox and /dev/null differ diff --git a/patchwork/tests/test_parser.py b/patchwork/tests/test_parser.py index d0c5c2d7..12f984bc 100644 --- a/patchwork/tests/test_parser.py +++ b/patchwork/tests/test_parser.py @@ -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 index 00000000..628fd98d --- /dev/null +++ b/releasenotes/notes/python-3-10-support-6477dd1fe07c4224.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + `Python 3.10 `_ 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 72419bed..fe42ab4d 100644 --- 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