Merge ~cpete/ubuntu-dev-tools:update-python-launchpadlib into ubuntu-dev-tools:main

Proposed by Chris Peterson
Status: Merged
Merged at revision: f01234e8a55689e3d72dda9f2776a87c6c58961a
Proposed branch: ~cpete/ubuntu-dev-tools:update-python-launchpadlib
Merge into: ubuntu-dev-tools:main
Diff against target: 159 lines (+74/-23)
5 files modified
debian/copyright (+4/-1)
running-autopkgtests (+14/-1)
ubuntutools/running_autopkgtests.py (+11/-10)
ubuntutools/test/test_requestsync.py (+35/-0)
ubuntutools/test/test_running_autopkgtests.py (+10/-11)
Reviewer Review Type Date Requested Status
Lukas Märdian Approve
Andreas Hasenack Needs Information
Review via email: mp+461309@code.launchpad.net

Description of the change

Replace the dependency on python3-launchpadlib with
python3-launchpadlib-desktop. This package is the same as python3-launchpadlib
except that it also includes python3-keyring, which is a requirement for
some of the desktop-centric code paths. In the case, requestsync has a
path for logging in via a web browser which also requires python3-keyring
to be installed. This had caused a ModuleNotFoundError when
python3-launchpadlib dropped python3-keyring from Recommends to Suggests
(LP: #2049217).

To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) :
review: Needs Information
Revision history for this message
Chris Peterson (cpete) wrote :

Thanks for your review! I think maybe I've made this confusing by linking to the upstream MP for the bug fix. Would it be more appropriate to handle the bug fix and upstream changes separately? i.e. produce a debdiff on the bug just for the packaging changes needed and then get things fixed here later?

Revision history for this message
Lukas Märdian (slyon) wrote :

How did you come to the conclusion we should be using AGPL here? Can't we just stick to the original license?

review: Needs Information
Revision history for this message
Colin Watson (cjwatson) wrote :

Indeed, this isn't server-side code so AGPL seems inappropriate (even by Canonical's conventions).

Revision history for this message
Chris Peterson (cpete) wrote :

>How did you come to the conclusion we should be using AGPL here? Can't we just stick to the original license?

As discussed out of band, I had misunderstood both the licensing and our requirements. I have updated the copyright to be GPLv3 where possible and to retain the original licensing otherwise (i.e. new files in ubuntutools/tests/* are ISC since this is how it was specified in debian/copyright).

Please let me know if this is acceptable or how I could improve it.

(Apologies if you get this twice, I thought I had hit send but on refresh my comment disappeared.)

Revision history for this message
Lukas Märdian (slyon) wrote :

Thanks for the discussion and corresponding updates! LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/copyright b/debian/copyright
2index 5551b55..1bec868 100644
3--- a/debian/copyright
4+++ b/debian/copyright
5@@ -85,10 +85,12 @@ Files: doc/bitesize.1
6 merge-changelog
7 pyproject.toml
8 run-linters
9+ running-autopkgtests
10 setup-packaging-environment
11 syncpackage
12+ ubuntutools/running_autopkgtests.py
13 Copyright: 2010, Benjamin Drung <bdrung@ubuntu.com>
14- 2007-2023, Canonical Ltd.
15+ 2007-2024, Canonical Ltd.
16 2008, Jonathan Patrick Davies <jpds@ubuntu.com>
17 2008-2010, Martin Pitt <martin.pitt@canonical.com>
18 2009, Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com>
19@@ -182,6 +184,7 @@ Copyright: 2009-2023, Benjamin Drung <bdrung@ubuntu.com>
20 2008, Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com>
21 2010-2011, Stefano Rivera <stefanor@ubuntu.com>
22 2017-2021, Dan Streetman <ddstreet@canonical.com>
23+ 2024, Canonical Ltd.
24 License: ISC
25 Permission to use, copy, modify, and/or distribute this software for any
26 purpose with or without fee is hereby granted, provided that the above
27diff --git a/running-autopkgtests b/running-autopkgtests
28index 8b7977d..14f52fe 100755
29--- a/running-autopkgtests
30+++ b/running-autopkgtests
31@@ -4,7 +4,20 @@
32 # Authors:
33 # Andy P. Whitcroft
34 # Christian Ehrhardt
35-
36+# Chris Peterson <chris.peterson@canonical.com>
37+#
38+# Copyright (C) 2024 Canonical Ltd.
39+# This program is free software: you can redistribute it and/or modify it
40+# under the terms of the GNU General Public License version 3, as published
41+# by the Free Software Foundation.
42+#
43+# This program is distributed in the hope that it will be useful, but
44+# WITHOUT ANY WARRANTY; without even the implied warranties of
45+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.
46+# See the GNU General Public License for more details.
47+#
48+# You should have received a copy of the GNU General Public License along
49+# with this program. If not, see <http://www.gnu.org/licenses/>.
50 """Dumps a list of currently running tests in Autopkgtest"""
51
52 __example__ = """
53diff --git a/ubuntutools/running_autopkgtests.py b/ubuntutools/running_autopkgtests.py
54index f583544..54efd67 100644
55--- a/ubuntutools/running_autopkgtests.py
56+++ b/ubuntutools/running_autopkgtests.py
57@@ -1,18 +1,19 @@
58 # Copyright (C) 2024 Canonical Ltd.
59 # Author: Chris Peterson <chris.peterson@canonical.com>
60+# Author: Andy P. Whitcroft
61+# Author: Christian Ehrhardt
62 #
63-# This program is free software: you can redistribute it and/or modify
64-# it under the terms of the GNU Affero General Public License as
65-# published by the Free Software Foundation, either version 3 of the
66-# License, or (at your option) any later version.
67+# This program is free software: you can redistribute it and/or modify it
68+# under the terms of the GNU General Public License version 3, as published
69+# by the Free Software Foundation.
70 #
71-# This program is distributed in the hope that it will be useful,
72-# but WITHOUT ANY WARRANTY; without even the implied warranty of
73-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74-# GNU Affero General Public License for more details.
75+# This program is distributed in the hope that it will be useful, but
76+# WITHOUT ANY WARRANTY; without even the implied warranties of
77+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.
78+# See the GNU General Public License for more details.
79 #
80-# You should have received a copy of the GNU Affero General Public License
81-# along with this program. If not, see <http://www.gnu.org/licenses/>.
82+# You should have received a copy of the GNU General Public License along
83+# with this program. If not, see <http://www.gnu.org/licenses/>.
84
85 import datetime
86 import json
87diff --git a/ubuntutools/test/test_requestsync.py b/ubuntutools/test/test_requestsync.py
88new file mode 100644
89index 0000000..a9cfc73
90--- /dev/null
91+++ b/ubuntutools/test/test_requestsync.py
92@@ -0,0 +1,35 @@
93+# Copyright (C) 2024 Canonical Ltd.
94+# Author: Chris Peterson <chris.peterson@canonical.com>
95+#
96+# Permission to use, copy, modify, and/or distribute this software for any
97+# purpose with or without fee is hereby granted, provided that the above
98+# copyright notice and this permission notice appear in all copies.
99+#
100+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
101+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
102+# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
103+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
104+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
105+# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
106+# PERFORMANCE OF THIS SOFTWARE.
107+
108+import unittest
109+
110+
111+# Binary Tests
112+class BinaryTests(unittest.TestCase):
113+
114+ # The requestsync binary has the option of using the launchpad api
115+ # to log in but requires python3-keyring in addition to
116+ # python3-launchpadlib. Testing the integrated login functionality
117+ # automatically isn't very feasbile, but we can at least write a smoke
118+ # test to make sure the required packages are installed.
119+ # See LP: #2049217
120+ def test_keyring_installed(self):
121+ """Smoke test for required lp api dependencies"""
122+ try:
123+ import keyring # noqa: F401
124+ except ModuleNotFoundError:
125+ raise ModuleNotFoundError(
126+ "package python3-keyring is not installed"
127+ )
128diff --git a/ubuntutools/test/test_running_autopkgtests.py b/ubuntutools/test/test_running_autopkgtests.py
129index ec68acd..915ca68 100644
130--- a/ubuntutools/test/test_running_autopkgtests.py
131+++ b/ubuntutools/test/test_running_autopkgtests.py
132@@ -1,18 +1,17 @@
133 # Copyright (C) 2024 Canonical Ltd.
134 # Author: Chris Peterson <chris.peterson@canonical.com>
135 #
136-# This program is free software: you can redistribute it and/or modify
137-# it under the terms of the GNU Affero General Public License as
138-# published by the Free Software Foundation, either version 3 of the
139-# License, or (at your option) any later version.
140+# Permission to use, copy, modify, and/or distribute this software for any
141+# purpose with or without fee is hereby granted, provided that the above
142+# copyright notice and this permission notice appear in all copies.
143 #
144-# This program is distributed in the hope that it will be useful,
145-# but WITHOUT ANY WARRANTY; without even the implied warranty of
146-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
147-# GNU Affero General Public License for more details.
148-#
149-# You should have received a copy of the GNU Affero General Public License
150-# along with this program. If not, see <http://www.gnu.org/licenses/>.
151+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
152+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
153+# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
154+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
155+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
156+# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
157+# PERFORMANCE OF THIS SOFTWARE.
158 """ Tests for running_autopkgtests
159 Tests using cached data from autopkgtest servers.
160

Subscribers

People subscribed via source and target branches