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
diff --git a/NEWS.rst b/NEWS.rst
index d7a814b..6d56a48 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -8,6 +8,8 @@ NEWS for lazr.config
8- Publish Documentation on Read the Docs.8- Publish Documentation on Read the Docs.
9- Apply inclusive naming via the woke pre-commit hook.9- Apply inclusive naming via the woke pre-commit hook.
10- Test using ``zope.testrunner`` rather than ``nose``.10- Test using ``zope.testrunner`` rather than ``nose``.
11- Officially add support for Python 3.9 and 3.10.
12- Drop support for Python 2.6 and 3.4.
1113
122.2.3 (2021-01-26)142.2.3 (2021-01-26)
13==================15==================
diff --git a/setup.py b/setup.py
index b51bef1..201f7eb 100755
--- a/setup.py
+++ b/setup.py
@@ -59,14 +59,14 @@ files. The format supports schema validation.
59 "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",59 "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
60 "Operating System :: OS Independent",60 "Operating System :: OS Independent",
61 'Programming Language :: Python',61 'Programming Language :: Python',
62 'Programming Language :: Python :: 2.6',
63 'Programming Language :: Python :: 2.7',62 'Programming Language :: Python :: 2.7',
64 'Programming Language :: Python :: 3',63 'Programming Language :: Python :: 3',
65 'Programming Language :: Python :: 3.4',
66 'Programming Language :: Python :: 3.5',64 'Programming Language :: Python :: 3.5',
67 'Programming Language :: Python :: 3.6',65 'Programming Language :: Python :: 3.6',
68 'Programming Language :: Python :: 3.7',66 'Programming Language :: Python :: 3.7',
69 'Programming Language :: Python :: 3.8',67 'Programming Language :: Python :: 3.8',
68 'Programming Language :: Python :: 3.9',
69 'Programming Language :: Python :: 3.10',
70 ],70 ],
71 extras_require=dict(71 extras_require=dict(
72 docs=['Sphinx'],72 docs=['Sphinx'],
diff --git a/src/lazr/config/interfaces.py b/src/lazr/config/interfaces.py
index 0b8a497..203ff7d 100644
--- a/src/lazr/config/interfaces.py
+++ b/src/lazr/config/interfaces.py
@@ -85,7 +85,6 @@ class ConfigErrors(ConfigSchemaError):
85 :param message: a message string85 :param message: a message string
86 :param errors: a list of errors in the config, or None86 :param errors: a list of errors in the config, or None
87 """87 """
88 # Without the suppression above, this produces a warning in Python 2.6.
89 self.message = message88 self.message = message
90 self.errors = errors89 self.errors = errors
9190
diff --git a/src/lazr/config/tests/test_config.py b/src/lazr/config/tests/test_config.py
index fa2e232..8a572b6 100644
--- a/src/lazr/config/tests/test_config.py
+++ b/src/lazr/config/tests/test_config.py
@@ -49,10 +49,6 @@ from lazr.config.interfaces import (
4949
5050
51class TestConfig(unittest.TestCase):51class TestConfig(unittest.TestCase):
52 def setUp(self):
53 # Python 2.6 does not have assertMultilineEqual
54 self.meq = getattr(self, 'assertMultiLineEqual', self.assertEqual)
55
56 def _testfile(self, conf_file):52 def _testfile(self, conf_file):
57 return pkg_resources.resource_filename(53 return pkg_resources.resource_filename(
58 'lazr.config.tests.testdata', conf_file)54 'lazr.config.tests.testdata', conf_file)
@@ -198,7 +194,7 @@ key1: schema suffixes are not permitted
198multiline value 1194multiline value 1
199 multiline value 2"""195 multiline value 2"""
200 new = convert(orig)196 new = convert(orig)
201 self.meq(new, orig)197 self.assertMultiLineEqual(new, orig)
202198
203 def test_multiline_strips_leading_and_trailing_whitespace(self):199 def test_multiline_strips_leading_and_trailing_whitespace(self):
204 schema = ImplicitTypeSchema(self._testfile('base.conf'))200 schema = ImplicitTypeSchema(self._testfile('base.conf'))
@@ -209,12 +205,12 @@ multiline value 1
209 multiline value 2205 multiline value 2
210 """206 """
211 new = convert(orig)207 new = convert(orig)
212 self.meq(new, orig.strip())208 self.assertMultiLineEqual(new, orig.strip())
213209
214 def test_multiline_key(self):210 def test_multiline_key(self):
215 schema = ImplicitTypeSchema(self._testfile('base.conf'))211 schema = ImplicitTypeSchema(self._testfile('base.conf'))
216 config = schema.load(self._testfile('local.conf'))212 config = schema.load(self._testfile('local.conf'))
217 self.meq(config['section_33'].key2, """\213 self.assertMultiLineEqual(config['section_33'].key2, """\
218multiline value 1214multiline value 1
219multiline value 2""")215multiline value 2""")
220216
diff --git a/tox.ini b/tox.ini
index 24f5373..cdc0a8c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,11 +1,12 @@
1[tox]1[tox]
2envlist =2envlist =
3 py273 py27
4 py34
5 py354 py35
6 py365 py36
7 py376 py37
8 py387 py38
8 py39
9 py310
9 coverage10 coverage
10skip_missing_interpreters = True11skip_missing_interpreters = True
1112

Subscribers

People subscribed via source and target branches