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

Proposed by Colin Watson
Status: Merged
Merged at revision: 4
Proposed branch: lp:~cjwatson/python-oops-timeline/py3
Merge into: lp:python-oops-timeline
Diff against target: 103 lines (+14/-2)
7 files modified
.bzrignore (+1/-0)
NEWS (+2/-0)
oops_timeline/__init__.py (+1/-0)
oops_timeline/hooks.py (+2/-0)
oops_timeline/tests/__init__.py (+2/-0)
oops_timeline/tests/test_hooks.py (+2/-0)
setup.py (+4/-2)
To merge this branch: bzr merge lp:~cjwatson/python-oops-timeline/py3
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+345342@code.launchpad.net

Commit message

Add Python 3 support.

Description of the change

This is almost entirely just fixing up setup.py; the rest is for good hygiene.

The one significant test change (adding action.finish()) fixes non-deterministic behaviour that could have broken on Python 2 (if the two calls to action.logTuple() spanned a millisecond boundary) but were almost guaranteed to break on Python 3 prior to https://code.launchpad.net/~cjwatson/python-timeline/division/+merge/345341. That MP makes this test change less necessary, but we still might as well.

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-09-18 21:34:25 +0000
3+++ .bzrignore 2018-05-10 08:54:05 +0000
4@@ -1,3 +1,4 @@
5+__pycache__
6 ./eggs/*
7 ./.installed.cfg
8 ./develop-eggs
9
10=== modified file 'NEWS'
11--- NEWS 2012-08-14 06:34:34 +0000
12+++ NEWS 2018-05-10 08:54:05 +0000
13@@ -6,6 +6,8 @@
14 NEXT
15 ----
16
17+* Add Python 3 support. (Colin Watson)
18+
19 0.0.2
20 -----
21
22
23=== modified file 'oops_timeline/__init__.py'
24--- oops_timeline/__init__.py 2012-08-14 06:34:34 +0000
25+++ oops_timeline/__init__.py 2018-05-10 08:54:05 +0000
26@@ -78,6 +78,7 @@
27 $ bin/py -m testtools.run oops_timeline.tests.test_suite
28 """
29
30+from __future__ import absolute_import, print_function
31
32 # same format as sys.version_info: "A tuple containing the five components of
33 # the version number: major, minor, micro, releaselevel, and serial. All
34
35=== modified file 'oops_timeline/hooks.py'
36--- oops_timeline/hooks.py 2012-08-14 06:34:34 +0000
37+++ oops_timeline/hooks.py 2018-05-10 08:54:05 +0000
38@@ -15,6 +15,8 @@
39
40 """oops creation and filtering hooks for working with timelines."""
41
42+from __future__ import absolute_import, print_function
43+
44 __all__ = [
45 'install_hooks',
46 'flatten_timeline',
47
48=== modified file 'oops_timeline/tests/__init__.py'
49--- oops_timeline/tests/__init__.py 2012-08-14 06:34:34 +0000
50+++ oops_timeline/tests/__init__.py 2018-05-10 08:54:05 +0000
51@@ -14,6 +14,8 @@
52
53 """Tests for oops_timeline."""
54
55+from __future__ import absolute_import, print_function
56+
57 from unittest import TestLoader
58
59
60
61=== modified file 'oops_timeline/tests/test_hooks.py'
62--- oops_timeline/tests/test_hooks.py 2012-08-14 06:34:34 +0000
63+++ oops_timeline/tests/test_hooks.py 2018-05-10 08:54:05 +0000
64@@ -14,6 +14,7 @@
65
66 """Tests for the various hooks included in oops-timeline."""
67
68+from __future__ import absolute_import, print_function
69
70 from oops import Config
71 from testtools import TestCase
72@@ -38,6 +39,7 @@
73 def test_flatten_timeline(self):
74 timeline = Timeline()
75 action = timeline.start('foo', 'bar')
76+ action.finish()
77 context = dict(timeline=timeline)
78 report = {}
79 flatten_timeline(report, context)
80
81=== modified file 'setup.py'
82--- setup.py 2012-08-14 06:34:34 +0000
83+++ setup.py 2018-05-10 08:54:05 +0000
84@@ -18,8 +18,8 @@
85 from distutils.core import setup
86 import os.path
87
88-description = file(
89- os.path.join(os.path.dirname(__file__), 'README'), 'rb').read()
90+with open(os.path.join(os.path.dirname(__file__), 'README')) as f:
91+ description = f.read()
92
93 setup(name="oops_timeline",
94 version="0.0.2",
95@@ -37,6 +37,8 @@
96 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
97 'Operating System :: OS Independent',
98 'Programming Language :: Python',
99+ 'Programming Language :: Python :: 2',
100+ 'Programming Language :: Python :: 3',
101 ],
102 install_requires = [
103 'oops',

Subscribers

People subscribed via source and target branches

to all changes: