launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #22499
[Merge] lp:~cjwatson/python-oops-timeline/py3 into lp:python-oops-timeline
Colin Watson has proposed merging lp:~cjwatson/python-oops-timeline/py3 into lp:python-oops-timeline.
Commit message:
Add Python 3 support.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/python-oops-timeline/py3/+merge/345342
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.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/python-oops-timeline/py3 into lp:python-oops-timeline.
=== modified file '.bzrignore'
--- .bzrignore 2011-09-18 21:34:25 +0000
+++ .bzrignore 2018-05-10 08:54:05 +0000
@@ -1,3 +1,4 @@
+__pycache__
./eggs/*
./.installed.cfg
./develop-eggs
=== modified file 'NEWS'
--- NEWS 2012-08-14 06:34:34 +0000
+++ NEWS 2018-05-10 08:54:05 +0000
@@ -6,6 +6,8 @@
NEXT
----
+* Add Python 3 support. (Colin Watson)
+
0.0.2
-----
=== modified file 'oops_timeline/__init__.py'
--- oops_timeline/__init__.py 2012-08-14 06:34:34 +0000
+++ oops_timeline/__init__.py 2018-05-10 08:54:05 +0000
@@ -78,6 +78,7 @@
$ bin/py -m testtools.run oops_timeline.tests.test_suite
"""
+from __future__ import absolute_import, print_function
# same format as sys.version_info: "A tuple containing the five components of
# the version number: major, minor, micro, releaselevel, and serial. All
=== modified file 'oops_timeline/hooks.py'
--- oops_timeline/hooks.py 2012-08-14 06:34:34 +0000
+++ oops_timeline/hooks.py 2018-05-10 08:54:05 +0000
@@ -15,6 +15,8 @@
"""oops creation and filtering hooks for working with timelines."""
+from __future__ import absolute_import, print_function
+
__all__ = [
'install_hooks',
'flatten_timeline',
=== modified file 'oops_timeline/tests/__init__.py'
--- oops_timeline/tests/__init__.py 2012-08-14 06:34:34 +0000
+++ oops_timeline/tests/__init__.py 2018-05-10 08:54:05 +0000
@@ -14,6 +14,8 @@
"""Tests for oops_timeline."""
+from __future__ import absolute_import, print_function
+
from unittest import TestLoader
=== modified file 'oops_timeline/tests/test_hooks.py'
--- oops_timeline/tests/test_hooks.py 2012-08-14 06:34:34 +0000
+++ oops_timeline/tests/test_hooks.py 2018-05-10 08:54:05 +0000
@@ -14,6 +14,7 @@
"""Tests for the various hooks included in oops-timeline."""
+from __future__ import absolute_import, print_function
from oops import Config
from testtools import TestCase
@@ -38,6 +39,7 @@
def test_flatten_timeline(self):
timeline = Timeline()
action = timeline.start('foo', 'bar')
+ action.finish()
context = dict(timeline=timeline)
report = {}
flatten_timeline(report, context)
=== modified file 'setup.py'
--- setup.py 2012-08-14 06:34:34 +0000
+++ setup.py 2018-05-10 08:54:05 +0000
@@ -18,8 +18,8 @@
from distutils.core import setup
import os.path
-description = file(
- os.path.join(os.path.dirname(__file__), 'README'), 'rb').read()
+with open(os.path.join(os.path.dirname(__file__), 'README')) as f:
+ description = f.read()
setup(name="oops_timeline",
version="0.0.2",
@@ -37,6 +37,8 @@
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
'Operating System :: OS Independent',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 3',
],
install_requires = [
'oops',