Merge lp:~canonical-platform-qa/uci-config/py3-packaging into lp:~canonical-ci-engineering/uci-config/trunk

Proposed by Leo Arias
Status: Needs review
Proposed branch: lp:~canonical-platform-qa/uci-config/py3-packaging
Merge into: lp:~canonical-ci-engineering/uci-config/trunk
Prerequisite: lp:~canonical-platform-qa/uci-config/py3-items
Diff against target: 154 lines (+41/-5)
8 files modified
debian/control (+13/-2)
debian/python-uci-config.install (+1/-0)
debian/python3-uci-config.install (+1/-0)
debian/rules (+2/-1)
uciconfig/errors.py (+1/-0)
uciconfig/options.py (+5/-0)
uciconfig/tests/test_options.py (+5/-0)
uciconfig/tests/test_stacks.py (+13/-2)
To merge this branch: bzr merge lp:~canonical-platform-qa/uci-config/py3-packaging
Reviewer Review Type Date Requested Status
Canonical CI Engineering Pending
Review via email: mp+243757@code.launchpad.net

Commit message

Make uciconfig work compatible with python3.
Added the python3-uci-config debian package.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

This still needs uci-tests to be py3.

68. By Leo Arias

Added python3 ucitests to the dependencies.

69. By Leo Arias

Updated the name of the scripts.

Unmerged revisions

69. By Leo Arias

Updated the name of the scripts.

68. By Leo Arias

Added python3 ucitests to the dependencies.

67. By Leo Arias

Made all the tests pass with py3.

66. By Leo Arias

Run the py3 tests.

65. By Leo Arias

Make the py3 debian package.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-04-15 08:13:39 +0000
3+++ debian/control 2015-01-05 16:50:11 +0000
4@@ -3,9 +3,14 @@
5 Priority: optional
6 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
7 XSBC-Original-Maintainer: Vincent Ladeuil <vila+ci@canonical.com>
8-Build-Depends: python-uci-tests,
9+Build-Depends: debhelper (>= 9),
10+ dh-python,
11+ python-uci-tests,
12 python-all,
13- debhelper (>= 9)
14+ python-setuptools,
15+ python3-all,
16+ python3-uci-tests,
17+ python3-setuptools
18 Standards-Version: 3.9.4
19 XS-Testsuite: autopkgtest
20
21@@ -14,3 +19,9 @@
22 Depends: ${misc:Depends},
23 ${python:Depends}
24 Description: Ubuntu Continuous Integration configuration framework.
25+
26+Package: python3-uci-config
27+Architecture: all
28+Depends: ${misc:Depends},
29+ ${python3:Depends}
30+Description: Ubuntu Continuous Integration configuration framework.
31
32=== added file 'debian/python-uci-config.install'
33--- debian/python-uci-config.install 1970-01-01 00:00:00 +0000
34+++ debian/python-uci-config.install 2015-01-05 16:50:11 +0000
35@@ -0,0 +1,1 @@
36+usr/lib/python2*
37
38=== added file 'debian/python3-uci-config.install'
39--- debian/python3-uci-config.install 1970-01-01 00:00:00 +0000
40+++ debian/python3-uci-config.install 2015-01-05 16:50:11 +0000
41@@ -0,0 +1,1 @@
42+usr/lib/python3*
43
44=== modified file 'debian/rules'
45--- debian/rules 2014-05-20 10:00:02 +0000
46+++ debian/rules 2015-01-05 16:50:11 +0000
47@@ -2,7 +2,8 @@
48 #export DH_VERBOSE=1
49
50 %:
51- dh "$@" --with python2
52+ dh "$@" --with python2,python3 --buildsystem=pybuild
53
54 override_dh_auto_test:
55+ PYTHONPATH=. uci-run-tests2
56 PYTHONPATH=. uci-run-tests
57
58=== modified file 'uciconfig/errors.py'
59--- uciconfig/errors.py 2014-03-23 21:16:02 +0000
60+++ uciconfig/errors.py 2015-01-05 16:50:11 +0000
61@@ -31,6 +31,7 @@
62 return self.fmt.format([], **self.__dict__)
63
64 __repr__ = __unicode__
65+ __str__ = __unicode__
66
67
68 class ParseError(ConfigError):
69
70=== modified file 'uciconfig/options.py'
71--- uciconfig/options.py 2014-02-15 16:49:46 +0000
72+++ uciconfig/options.py 2015-01-05 16:50:11 +0000
73@@ -18,6 +18,7 @@
74
75 import os
76 import re
77+import sys
78 import warnings
79
80
81@@ -27,6 +28,10 @@
82 )
83
84
85+if sys.version_info >= (3,):
86+ unicode = str
87+
88+
89 class Option(object):
90 """An option definition.
91
92
93=== modified file 'uciconfig/tests/test_options.py'
94--- uciconfig/tests/test_options.py 2014-02-15 16:49:46 +0000
95+++ uciconfig/tests/test_options.py 2015-01-05 16:50:11 +0000
96@@ -16,6 +16,7 @@
97
98 from __future__ import unicode_literals
99
100+import sys
101 import unittest
102 import warnings
103
104@@ -31,6 +32,10 @@
105 )
106
107
108+if sys.version_info >= (3,):
109+ unicode = str
110+
111+
112 class TestOption(unittest.TestCase):
113
114 def test_default_value(self):
115
116=== modified file 'uciconfig/tests/test_stacks.py'
117--- uciconfig/tests/test_stacks.py 2014-03-26 23:22:19 +0000
118+++ uciconfig/tests/test_stacks.py 2015-01-05 16:50:11 +0000
119@@ -16,6 +16,7 @@
120
121 from __future__ import unicode_literals
122
123+import sys
124 import unittest
125
126
127@@ -33,6 +34,10 @@
128 )
129
130
131+if sys.version_info >= (3,):
132+ unicode = str
133+
134+
135 class TestSectionMatcher(unittest.TestCase):
136
137 def setUp(self):
138@@ -653,8 +658,14 @@
139 self.conf.expand_options('{foo}')
140 self.assertEqual('{foo}', cm.exception.string)
141 self.assertEqual('foo', cm.exception.refs)
142- self.assertEqual('''Loop involving u'foo' while expanding "{foo}".''',
143- unicode(cm.exception))
144+ if sys.version_info < (3,):
145+ self.assertEqual(
146+ '''Loop involving u'foo' while expanding "{foo}".''',
147+ unicode(cm.exception))
148+ else:
149+ self.assertEqual(
150+ '''Loop involving 'foo' while expanding "{foo}".''',
151+ unicode(cm.exception))
152
153 def test_indirect_loop(self):
154 self.conf.store._load_from_string('''

Subscribers

People subscribed via source and target branches