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
1=== modified file 'NEWS.rst'
2--- NEWS.rst 2019-11-02 23:51:01 +0000
3+++ NEWS.rst 2019-11-03 00:30:08 +0000
4@@ -2,6 +2,12 @@
5 NEWS for lazr.config
6 ====================
7
8+2.2.2
9+=====
10+- Officially add support for Python 3.7 and 3.8. The test suite required
11+ some changes since the `repr` of `datetime.timedelta` objects changed in
12+ 3.7.
13+
14 2.2.1 (2017-10-20)
15 ==================
16 - Adjust versioning strategy to avoid importing pkg_resources, which is slow
17
18=== modified file 'setup.py'
19--- setup.py 2017-10-05 03:38:59 +0000
20+++ setup.py 2019-11-03 00:30:08 +0000
21@@ -57,5 +57,10 @@
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 ],
31 )
32
33=== modified file 'src/lazr/config/docs/usage.rst'
34--- src/lazr/config/docs/usage.rst 2017-02-08 22:55:13 +0000
35+++ src/lazr/config/docs/usage.rst 2019-11-03 00:30:08 +0000
36@@ -1230,39 +1230,41 @@
37 The function converts from an integer to the equivalent number of seconds.
38
39 >>> as_timedelta('45s')
40- datetime.timedelta(0, 45)
41+ datetime.timedelta(...)
42+ >>> print(as_timedelta('45s'))
43+ 0:00:45
44
45 The function also accepts suffixes ``m`` for minutes...
46
47- >>> as_timedelta('3m')
48- datetime.timedelta(0, 180)
49+ >>> print(as_timedelta('3m'))
50+ 0:03:00
51
52 ...``h`` for hours...
53
54- >>> as_timedelta('2h')
55- datetime.timedelta(0, 7200)
56+ >>> print(as_timedelta('2h'))
57+ 2:00:00
58
59 ...and ``d`` for days...
60
61- >>> as_timedelta('4d')
62- datetime.timedelta(4)
63+ >>> print(as_timedelta('4d'))
64+ 4 days, 0:00:00
65
66 ...and ``w`` for weeks.
67
68- >>> as_timedelta('4w')
69- datetime.timedelta(28)
70+ >>> print(as_timedelta('4w'))
71+ 28 days, 0:00:00
72
73 The function accepts a fractional number of seconds, indicating microseconds.
74
75- >>> as_timedelta('3.2s')
76- datetime.timedelta(0, 3, 200000)
77+ >>> print(as_timedelta('3.2s'))
78+ 0:00:03.200000
79
80 It also accepts any combination thereof.
81
82- >>> as_timedelta('3m22.5s')
83- datetime.timedelta(0, 202, 500000)
84- >>> as_timedelta('4w2d9h3s')
85- datetime.timedelta(30, 32403)
86+ >>> print(as_timedelta('3m22.5s'))
87+ 0:03:22.500000
88+ >>> print(as_timedelta('4w2d9h3s'))
89+ 30 days, 9:00:03
90
91 But doesn't accept "weird" or duplicate combinations.
92
93
94=== modified file 'tox.ini'
95--- tox.ini 2017-02-08 22:55:13 +0000
96+++ tox.ini 2019-11-03 00:30:08 +0000
97@@ -1,5 +1,5 @@
98 [tox]
99-envlist = py27,py34,py35,py36
100+envlist = py27,py34,py35,py36,py37,py38
101 skip_missing_interpreters = True
102
103

Subscribers

People subscribed via source and target branches