Merge lp:~cjwatson/python-timeline/py3 into lp:python-timeline

Proposed by Colin Watson
Status: Merged
Merged at revision: 13
Proposed branch: lp:~cjwatson/python-timeline/py3
Merge into: lp:python-timeline
Diff against target: 213 lines (+33/-7)
13 files modified
.bzrignore (+1/-0)
NEWS (+2/-0)
setup.py (+4/-1)
timeline/__init__.py (+3/-1)
timeline/nestingtimedaction.py (+3/-1)
timeline/tests/__init__.py (+2/-0)
timeline/tests/test_nestingtimedaction.py (+2/-0)
timeline/tests/test_timedaction.py (+2/-0)
timeline/tests/test_timeline.py (+3/-1)
timeline/tests/test_wsgi.py (+2/-0)
timeline/timedaction.py (+2/-0)
timeline/timeline.py (+4/-2)
timeline/wsgi.py (+3/-1)
To merge this branch: bzr merge lp:~cjwatson/python-timeline/py3
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+341301@code.launchpad.net

Commit message

Add Python 3 support.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2011-11-16 03:53:17 +0000
3+++ .bzrignore 2018-03-12 12:48:39 +0000
4@@ -1,3 +1,4 @@
5+__pycache__
6 ./eggs/*
7 ./.installed.cfg
8 ./develop-eggs
9
10=== modified file 'NEWS'
11--- NEWS 2011-11-16 04:12:15 +0000
12+++ NEWS 2018-03-12 12:48:39 +0000
13@@ -6,6 +6,8 @@
14 NEXT
15 ----
16
17+* Add Python 3 support. (Colin Watson)
18+
19 0.0.3
20 -----
21
22
23=== modified file 'setup.py'
24--- setup.py 2011-11-16 04:32:24 +0000
25+++ setup.py 2018-03-12 12:48:39 +0000
26@@ -18,7 +18,8 @@
27 from distutils.core import setup
28 import os.path
29
30-description = file(os.path.join(os.path.dirname(__file__), 'README'), 'rb').read()
31+with open(os.path.join(os.path.dirname(__file__), 'README')) as f:
32+ description = f.read()
33
34 setup(name="timeline",
35 version="0.0.3",
36@@ -35,6 +36,8 @@
37 'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
38 'Operating System :: OS Independent',
39 'Programming Language :: Python',
40+ 'Programming Language :: Python :: 2',
41+ 'Programming Language :: Python :: 3',
42 ],
43 install_requires = [
44 'pytz',
45
46=== modified file 'timeline/__init__.py'
47--- timeline/__init__.py 2011-11-16 04:32:24 +0000
48+++ timeline/__init__.py 2018-03-12 12:48:39 +0000
49@@ -13,6 +13,8 @@
50 # You should have received a copy of the GNU Lesser General Public License
51 # along with this program. If not, see <http://www.gnu.org/licenses/>.
52
53+from __future__ import absolute_import, print_function
54+
55 # same format as sys.version_info: "A tuple containing the five components of
56 # the version number: major, minor, micro, releaselevel, and serial. All
57 # values except releaselevel are integers; the release level is 'alpha',
58@@ -30,4 +32,4 @@
59 'Timeline',
60 ]
61
62-from timeline import Timeline
63+from timeline.timeline import Timeline
64
65=== modified file 'timeline/nestingtimedaction.py'
66--- timeline/nestingtimedaction.py 2011-11-16 04:32:24 +0000
67+++ timeline/nestingtimedaction.py 2018-03-12 12:48:39 +0000
68@@ -15,6 +15,8 @@
69 """Time an action which calls other timed actions."""
70
71
72+from __future__ import absolute_import, print_function
73+
74 __all__ = ['NestingTimedAction']
75
76 __metaclass__ = type
77@@ -22,7 +24,7 @@
78
79 import datetime
80
81-from timedaction import TimedAction
82+from timeline.timedaction import TimedAction
83
84
85 class NestingTimedAction(TimedAction):
86
87=== modified file 'timeline/tests/__init__.py'
88--- timeline/tests/__init__.py 2011-11-16 04:32:24 +0000
89+++ timeline/tests/__init__.py 2018-03-12 12:48:39 +0000
90@@ -14,6 +14,8 @@
91
92 """Tests for timeline."""
93
94+from __future__ import absolute_import, print_function
95+
96 from unittest import TestLoader
97
98
99
100=== modified file 'timeline/tests/test_nestingtimedaction.py'
101--- timeline/tests/test_nestingtimedaction.py 2011-11-16 04:32:24 +0000
102+++ timeline/tests/test_nestingtimedaction.py 2018-03-12 12:48:39 +0000
103@@ -14,6 +14,8 @@
104
105 """Tests of the TimedAction class."""
106
107+from __future__ import absolute_import, print_function
108+
109 __metaclass__ = type
110
111 import datetime
112
113=== modified file 'timeline/tests/test_timedaction.py'
114--- timeline/tests/test_timedaction.py 2011-11-16 04:32:24 +0000
115+++ timeline/tests/test_timedaction.py 2018-03-12 12:48:39 +0000
116@@ -14,6 +14,8 @@
117
118 """Tests of the TimedAction class."""
119
120+from __future__ import absolute_import, print_function
121+
122 __metaclass__ = type
123
124 import datetime
125
126=== modified file 'timeline/tests/test_timeline.py'
127--- timeline/tests/test_timeline.py 2011-11-16 04:32:24 +0000
128+++ timeline/tests/test_timeline.py 2018-03-12 12:48:39 +0000
129@@ -14,6 +14,8 @@
130
131 """Tests of the Timeline class."""
132
133+from __future__ import absolute_import, print_function
134+
135 __metaclass__ = type
136
137 import datetime
138@@ -127,7 +129,7 @@
139 timeline = Timeline()
140 action = timeline.start("Sending mail", "Noone")
141 self.assertNotEqual(None, action.backtrace)
142- self.assertIsInstance(action.backtrace, basestring)
143+ self.assertIsInstance(action.backtrace, str)
144
145 def test_backtraces_can_be_disabled(self):
146 # Passing format_stack=None to Timeline prevents backtrace gathering.
147
148=== modified file 'timeline/tests/test_wsgi.py'
149--- timeline/tests/test_wsgi.py 2011-11-16 04:32:24 +0000
150+++ timeline/tests/test_wsgi.py 2018-03-12 12:48:39 +0000
151@@ -14,6 +14,8 @@
152
153 """Tests of the WSGI integration."""
154
155+from __future__ import absolute_import, print_function
156+
157 import testtools
158
159 from timeline.timeline import Timeline
160
161=== modified file 'timeline/timedaction.py'
162--- timeline/timedaction.py 2011-11-16 04:32:24 +0000
163+++ timeline/timedaction.py 2018-03-12 12:48:39 +0000
164@@ -15,6 +15,8 @@
165 """Time a single categorised action."""
166
167
168+from __future__ import absolute_import, print_function
169+
170 __all__ = ['TimedAction']
171
172 __metaclass__ = type
173
174=== modified file 'timeline/timeline.py'
175--- timeline/timeline.py 2011-11-16 04:32:24 +0000
176+++ timeline/timeline.py 2018-03-12 12:48:39 +0000
177@@ -14,6 +14,8 @@
178
179 """Coordinate a sequence of non overlapping TimedActionss."""
180
181+from __future__ import absolute_import, print_function
182+
183 __all__ = ['Timeline']
184
185 __metaclass__ = type
186@@ -23,8 +25,8 @@
187
188 from pytz import utc as UTC
189
190-from timedaction import TimedAction
191-from nestingtimedaction import NestingTimedAction
192+from timeline.nestingtimedaction import NestingTimedAction
193+from timeline.timedaction import TimedAction
194
195
196 class OverlappingActionError(Exception):
197
198=== modified file 'timeline/wsgi.py'
199--- timeline/wsgi.py 2011-11-16 04:32:24 +0000
200+++ timeline/wsgi.py 2018-03-12 12:48:39 +0000
201@@ -14,9 +14,11 @@
202
203 """WSGI integration."""
204
205+from __future__ import absolute_import, print_function
206+
207 __all__ = ['make_app']
208
209-from timeline import Timeline
210+from timeline.timeline import Timeline
211
212 def make_app(app):
213 """Create a WSGI app wrapping app.

Subscribers

People subscribed via source and target branches

to all changes: