Merge lp:~cjwatson/lazr.config/py37 into lp:lazr.config

Proposed by Colin Watson on 2019-11-03
Status: Merged
Merged at revision: 21
Proposed branch: lp:~cjwatson/lazr.config/py37
Merge into: lp:lazr.config
Diff against target: 101 lines (+29/-16)
4 files modified
NEWS.rst (+6/-0)
setup.py (+5/-0)
src/lazr/config/docs/usage.rst (+17/-15)
tox.ini (+1/-1)
To merge this branch: bzr merge lp:~cjwatson/lazr.config/py37
Reviewer Review Type Date Requested Status
Tom Wardill 2019-11-03 Approve on 2019-11-04
Review via email: mp+375064@code.launchpad.net

Commit message

Officially add support for Python 3.7 and 3.8.

Description of the change

The test suite required some changes since the `repr` of `datetime.timedelta` objects changed in 3.7.

To post a comment you must log in.
Tom Wardill (twom) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS.rst'
--- NEWS.rst 2019-11-02 23:51:01 +0000
+++ NEWS.rst 2019-11-03 00:30:08 +0000
@@ -2,6 +2,12 @@
2NEWS for lazr.config2NEWS for lazr.config
3====================3====================
44
52.2.2
6=====
7- Officially add support for Python 3.7 and 3.8. The test suite required
8 some changes since the `repr` of `datetime.timedelta` objects changed in
9 3.7.
10
52.2.1 (2017-10-20)112.2.1 (2017-10-20)
6==================12==================
7- Adjust versioning strategy to avoid importing pkg_resources, which is slow13- Adjust versioning strategy to avoid importing pkg_resources, which is slow
814
=== modified file 'setup.py'
--- setup.py 2017-10-05 03:38:59 +0000
+++ setup.py 2019-11-03 00:30:08 +0000
@@ -57,5 +57,10 @@
57 'Programming Language :: Python :: 2.6',57 'Programming Language :: Python :: 2.6',
58 'Programming Language :: Python :: 2.7',58 'Programming Language :: Python :: 2.7',
59 'Programming Language :: Python :: 3',59 'Programming Language :: Python :: 3',
60 'Programming Language :: Python :: 3.4',
61 'Programming Language :: Python :: 3.5',
62 'Programming Language :: Python :: 3.6',
63 'Programming Language :: Python :: 3.7',
64 'Programming Language :: Python :: 3.8',
60 ],65 ],
61 )66 )
6267
=== modified file 'src/lazr/config/docs/usage.rst'
--- src/lazr/config/docs/usage.rst 2017-02-08 22:55:13 +0000
+++ src/lazr/config/docs/usage.rst 2019-11-03 00:30:08 +0000
@@ -1230,39 +1230,41 @@
1230The function converts from an integer to the equivalent number of seconds.1230The function converts from an integer to the equivalent number of seconds.
12311231
1232 >>> as_timedelta('45s')1232 >>> as_timedelta('45s')
1233 datetime.timedelta(0, 45)1233 datetime.timedelta(...)
1234 >>> print(as_timedelta('45s'))
1235 0:00:45
12341236
1235The function also accepts suffixes ``m`` for minutes...1237The function also accepts suffixes ``m`` for minutes...
12361238
1237 >>> as_timedelta('3m')1239 >>> print(as_timedelta('3m'))
1238 datetime.timedelta(0, 180)1240 0:03:00
12391241
1240...``h`` for hours...1242...``h`` for hours...
12411243
1242 >>> as_timedelta('2h')1244 >>> print(as_timedelta('2h'))
1243 datetime.timedelta(0, 7200)1245 2:00:00
12441246
1245...and ``d`` for days...1247...and ``d`` for days...
12461248
1247 >>> as_timedelta('4d')1249 >>> print(as_timedelta('4d'))
1248 datetime.timedelta(4)1250 4 days, 0:00:00
12491251
1250...and ``w`` for weeks.1252...and ``w`` for weeks.
12511253
1252 >>> as_timedelta('4w')1254 >>> print(as_timedelta('4w'))
1253 datetime.timedelta(28)1255 28 days, 0:00:00
12541256
1255The function accepts a fractional number of seconds, indicating microseconds.1257The function accepts a fractional number of seconds, indicating microseconds.
12561258
1257 >>> as_timedelta('3.2s')1259 >>> print(as_timedelta('3.2s'))
1258 datetime.timedelta(0, 3, 200000)1260 0:00:03.200000
12591261
1260It also accepts any combination thereof.1262It also accepts any combination thereof.
12611263
1262 >>> as_timedelta('3m22.5s')1264 >>> print(as_timedelta('3m22.5s'))
1263 datetime.timedelta(0, 202, 500000)1265 0:03:22.500000
1264 >>> as_timedelta('4w2d9h3s')1266 >>> print(as_timedelta('4w2d9h3s'))
1265 datetime.timedelta(30, 32403)1267 30 days, 9:00:03
12661268
1267But doesn't accept "weird" or duplicate combinations.1269But doesn't accept "weird" or duplicate combinations.
12681270
12691271
=== modified file 'tox.ini'
--- tox.ini 2017-02-08 22:55:13 +0000
+++ tox.ini 2019-11-03 00:30:08 +0000
@@ -1,5 +1,5 @@
1[tox]1[tox]
2envlist = py27,py34,py35,py362envlist = py27,py34,py35,py36,py37,py38
3skip_missing_interpreters = True3skip_missing_interpreters = True
44
55

Subscribers

People subscribed via source and target branches