Merge ~cjwatson/lazr.config:update-python-versions into lazr.config:main

Proposed by Colin Watson
Status: Merged
Merged at revision: 09658893cd3f1eb518e7d14e1e7556c02d6c69f2
Proposed branch: ~cjwatson/lazr.config:update-python-versions
Merge into: lazr.config:main
Diff against target: 102 lines (+9/-11)
5 files modified
NEWS.rst (+2/-0)
setup.py (+2/-2)
src/lazr/config/interfaces.py (+0/-1)
src/lazr/config/tests/test_config.py (+3/-7)
tox.ini (+2/-1)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+412214@code.launchpad.net

Commit message

Update Python versions

Description of the change

Add support for Python 3.9 and 3.10. Drop support for Python 3.4.

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

LGTM - unrelated to this MP, but could you please additionally drop 2.6 from setup.py?

review: Approve
Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks for noticing that! Done, along with some other bits and pieces that were only for 2.6.

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

🚀

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/NEWS.rst b/NEWS.rst
2index d7a814b..6d56a48 100644
3--- a/NEWS.rst
4+++ b/NEWS.rst
5@@ -8,6 +8,8 @@ NEWS for lazr.config
6 - Publish Documentation on Read the Docs.
7 - Apply inclusive naming via the woke pre-commit hook.
8 - Test using ``zope.testrunner`` rather than ``nose``.
9+- Officially add support for Python 3.9 and 3.10.
10+- Drop support for Python 2.6 and 3.4.
11
12 2.2.3 (2021-01-26)
13 ==================
14diff --git a/setup.py b/setup.py
15index b51bef1..201f7eb 100755
16--- a/setup.py
17+++ b/setup.py
18@@ -59,14 +59,14 @@ files. The format supports schema validation.
19 "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
20 "Operating System :: OS Independent",
21 'Programming Language :: Python',
22- 'Programming Language :: Python :: 2.6',
23 'Programming Language :: Python :: 2.7',
24 'Programming Language :: Python :: 3',
25- 'Programming Language :: Python :: 3.4',
26 'Programming Language :: Python :: 3.5',
27 'Programming Language :: Python :: 3.6',
28 'Programming Language :: Python :: 3.7',
29 'Programming Language :: Python :: 3.8',
30+ 'Programming Language :: Python :: 3.9',
31+ 'Programming Language :: Python :: 3.10',
32 ],
33 extras_require=dict(
34 docs=['Sphinx'],
35diff --git a/src/lazr/config/interfaces.py b/src/lazr/config/interfaces.py
36index 0b8a497..203ff7d 100644
37--- a/src/lazr/config/interfaces.py
38+++ b/src/lazr/config/interfaces.py
39@@ -85,7 +85,6 @@ class ConfigErrors(ConfigSchemaError):
40 :param message: a message string
41 :param errors: a list of errors in the config, or None
42 """
43- # Without the suppression above, this produces a warning in Python 2.6.
44 self.message = message
45 self.errors = errors
46
47diff --git a/src/lazr/config/tests/test_config.py b/src/lazr/config/tests/test_config.py
48index fa2e232..8a572b6 100644
49--- a/src/lazr/config/tests/test_config.py
50+++ b/src/lazr/config/tests/test_config.py
51@@ -49,10 +49,6 @@ from lazr.config.interfaces import (
52
53
54 class TestConfig(unittest.TestCase):
55- def setUp(self):
56- # Python 2.6 does not have assertMultilineEqual
57- self.meq = getattr(self, 'assertMultiLineEqual', self.assertEqual)
58-
59 def _testfile(self, conf_file):
60 return pkg_resources.resource_filename(
61 'lazr.config.tests.testdata', conf_file)
62@@ -198,7 +194,7 @@ key1: schema suffixes are not permitted
63 multiline value 1
64 multiline value 2"""
65 new = convert(orig)
66- self.meq(new, orig)
67+ self.assertMultiLineEqual(new, orig)
68
69 def test_multiline_strips_leading_and_trailing_whitespace(self):
70 schema = ImplicitTypeSchema(self._testfile('base.conf'))
71@@ -209,12 +205,12 @@ multiline value 1
72 multiline value 2
73 """
74 new = convert(orig)
75- self.meq(new, orig.strip())
76+ self.assertMultiLineEqual(new, orig.strip())
77
78 def test_multiline_key(self):
79 schema = ImplicitTypeSchema(self._testfile('base.conf'))
80 config = schema.load(self._testfile('local.conf'))
81- self.meq(config['section_33'].key2, """\
82+ self.assertMultiLineEqual(config['section_33'].key2, """\
83 multiline value 1
84 multiline value 2""")
85
86diff --git a/tox.ini b/tox.ini
87index 24f5373..cdc0a8c 100644
88--- a/tox.ini
89+++ b/tox.ini
90@@ -1,11 +1,12 @@
91 [tox]
92 envlist =
93 py27
94- py34
95 py35
96 py36
97 py37
98 py38
99+ py39
100+ py310
101 coverage
102 skip_missing_interpreters = True
103

Subscribers

People subscribed via source and target branches