launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #22243
[Merge] lp:~cjwatson/python-timeline/py3 into lp:python-timeline
Colin Watson has proposed merging lp:~cjwatson/python-timeline/py3 into lp:python-timeline.
Commit message:
Add Python 3 support.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/python-timeline/py3/+merge/341301
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/python-timeline/py3 into lp:python-timeline.
=== modified file '.bzrignore'
--- .bzrignore 2011-11-16 03:53:17 +0000
+++ .bzrignore 2018-03-12 12:48:39 +0000
@@ -1,3 +1,4 @@
+__pycache__
./eggs/*
./.installed.cfg
./develop-eggs
=== modified file 'NEWS'
--- NEWS 2011-11-16 04:12:15 +0000
+++ NEWS 2018-03-12 12:48:39 +0000
@@ -6,6 +6,8 @@
NEXT
----
+* Add Python 3 support. (Colin Watson)
+
0.0.3
-----
=== modified file 'setup.py'
--- setup.py 2011-11-16 04:32:24 +0000
+++ setup.py 2018-03-12 12:48:39 +0000
@@ -18,7 +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="timeline",
version="0.0.3",
@@ -35,6 +36,8 @@
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
'Operating System :: OS Independent',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 3',
],
install_requires = [
'pytz',
=== modified file 'timeline/__init__.py'
--- timeline/__init__.py 2011-11-16 04:32:24 +0000
+++ timeline/__init__.py 2018-03-12 12:48:39 +0000
@@ -13,6 +13,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+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
# values except releaselevel are integers; the release level is 'alpha',
@@ -30,4 +32,4 @@
'Timeline',
]
-from timeline import Timeline
+from timeline.timeline import Timeline
=== modified file 'timeline/nestingtimedaction.py'
--- timeline/nestingtimedaction.py 2011-11-16 04:32:24 +0000
+++ timeline/nestingtimedaction.py 2018-03-12 12:48:39 +0000
@@ -15,6 +15,8 @@
"""Time an action which calls other timed actions."""
+from __future__ import absolute_import, print_function
+
__all__ = ['NestingTimedAction']
__metaclass__ = type
@@ -22,7 +24,7 @@
import datetime
-from timedaction import TimedAction
+from timeline.timedaction import TimedAction
class NestingTimedAction(TimedAction):
=== modified file 'timeline/tests/__init__.py'
--- timeline/tests/__init__.py 2011-11-16 04:32:24 +0000
+++ timeline/tests/__init__.py 2018-03-12 12:48:39 +0000
@@ -14,6 +14,8 @@
"""Tests for timeline."""
+from __future__ import absolute_import, print_function
+
from unittest import TestLoader
=== modified file 'timeline/tests/test_nestingtimedaction.py'
--- timeline/tests/test_nestingtimedaction.py 2011-11-16 04:32:24 +0000
+++ timeline/tests/test_nestingtimedaction.py 2018-03-12 12:48:39 +0000
@@ -14,6 +14,8 @@
"""Tests of the TimedAction class."""
+from __future__ import absolute_import, print_function
+
__metaclass__ = type
import datetime
=== modified file 'timeline/tests/test_timedaction.py'
--- timeline/tests/test_timedaction.py 2011-11-16 04:32:24 +0000
+++ timeline/tests/test_timedaction.py 2018-03-12 12:48:39 +0000
@@ -14,6 +14,8 @@
"""Tests of the TimedAction class."""
+from __future__ import absolute_import, print_function
+
__metaclass__ = type
import datetime
=== modified file 'timeline/tests/test_timeline.py'
--- timeline/tests/test_timeline.py 2011-11-16 04:32:24 +0000
+++ timeline/tests/test_timeline.py 2018-03-12 12:48:39 +0000
@@ -14,6 +14,8 @@
"""Tests of the Timeline class."""
+from __future__ import absolute_import, print_function
+
__metaclass__ = type
import datetime
@@ -127,7 +129,7 @@
timeline = Timeline()
action = timeline.start("Sending mail", "Noone")
self.assertNotEqual(None, action.backtrace)
- self.assertIsInstance(action.backtrace, basestring)
+ self.assertIsInstance(action.backtrace, str)
def test_backtraces_can_be_disabled(self):
# Passing format_stack=None to Timeline prevents backtrace gathering.
=== modified file 'timeline/tests/test_wsgi.py'
--- timeline/tests/test_wsgi.py 2011-11-16 04:32:24 +0000
+++ timeline/tests/test_wsgi.py 2018-03-12 12:48:39 +0000
@@ -14,6 +14,8 @@
"""Tests of the WSGI integration."""
+from __future__ import absolute_import, print_function
+
import testtools
from timeline.timeline import Timeline
=== modified file 'timeline/timedaction.py'
--- timeline/timedaction.py 2011-11-16 04:32:24 +0000
+++ timeline/timedaction.py 2018-03-12 12:48:39 +0000
@@ -15,6 +15,8 @@
"""Time a single categorised action."""
+from __future__ import absolute_import, print_function
+
__all__ = ['TimedAction']
__metaclass__ = type
=== modified file 'timeline/timeline.py'
--- timeline/timeline.py 2011-11-16 04:32:24 +0000
+++ timeline/timeline.py 2018-03-12 12:48:39 +0000
@@ -14,6 +14,8 @@
"""Coordinate a sequence of non overlapping TimedActionss."""
+from __future__ import absolute_import, print_function
+
__all__ = ['Timeline']
__metaclass__ = type
@@ -23,8 +25,8 @@
from pytz import utc as UTC
-from timedaction import TimedAction
-from nestingtimedaction import NestingTimedAction
+from timeline.nestingtimedaction import NestingTimedAction
+from timeline.timedaction import TimedAction
class OverlappingActionError(Exception):
=== modified file 'timeline/wsgi.py'
--- timeline/wsgi.py 2011-11-16 04:32:24 +0000
+++ timeline/wsgi.py 2018-03-12 12:48:39 +0000
@@ -14,9 +14,11 @@
"""WSGI integration."""
+from __future__ import absolute_import, print_function
+
__all__ = ['make_app']
-from timeline import Timeline
+from timeline.timeline import Timeline
def make_app(app):
"""Create a WSGI app wrapping app.