From dda1112349cfe346695a7e1d2bb0ea78b0d7f28b Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 23 Feb 2022 13:42:45 +0000 Subject: [PATCH] Add Python 3.10 support, drop Python 3.6 support Signed-off-by: Stephen Finucane --- docs/deployment/installation.rst | 2 +- docs/development/installation.rst | 2 +- patchwork/tests/fuzztests/earlyfail.mbox | Bin 1712 -> 0 bytes patchwork/tests/test_parser.py | 9 --------- .../python-3-10-support-6477dd1fe07c4224.yaml | 9 +++++++++ tox.ini | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 patchwork/tests/fuzztests/earlyfail.mbox create mode 100644 releasenotes/notes/python-3-10-support-6477dd1fe07c4224.yaml 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 47db41d153455d30c260c401d7c5b1ab384b851d..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 1712 zc-o~@TaVgC6y8_P52(~W9r4m7VDFfVfdLb;UXZ93WfiEpQj}K49>7_9jO_6S-u74Z zp?|JD$D3`UrmLhXlINVceRD3~$2`wcOyUi^QDG$Ud~?E}F~TnXRBCJsrwhvE#uR?lZ9{-Am>;q=^>I23ab*3@T${nT@6&c5cr7DVGr>w=5#PV(eMVx7gjxE5? zv{Bkv>(haPNz25X?#@C2x^xV043V#QtI zFNK>txr5sRU>z76gbTikz>f`pLRi_f4#g>jdzI5XS2b`2J<*QZQfk635IL zQr_6a1zH6rMSX(jWgIb&!h?~_B@*VA`9#|4FsE2#e4e>Qn@P6WF-F21qj|(Uqwbc> zHL6qc#5c?OmQ4RqIHQi{;*bQf9$~l-@jMBh(%;D$N*5CXOewWYk z`{C^D>?6OQ&FbOHtSBPGzQn*(lK78eaE61Hi%m8IoK8*7;`mYryMNO`g%-H z{J!h9erHIsL&C)0p4CU=@fqZxA7Aj*Q@Bs~L-#S@N453auHb+x+h=sZ+Mk;}0o4dd Wkfqq0HT;+YV50%w$Q1f#fxiHNG^T|B 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 -- 2.47.3