Merge ~jelmer/launchpadlib:extra-keyring into launchpadlib:main

Proposed by Jelmer Vernooij
Status: Merged
Merged at revision: de8165d107c282e8614a2d5783af4e446f80110d
Proposed branch: ~jelmer/launchpadlib:extra-keyring
Merge into: launchpadlib:main
Diff against target: 20 lines (+1/-1)
1 file modified
setup.py (+1/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+432745@code.launchpad.net

Commit message

Make keyring an extra

Description of the change

The keyring support in launchpadlib is already optional - the code is written such that it can function fine without keyring. However, in setup.py there is a hard dependency on keyring, which pulls in both keyring and its many dependencies (including e.g. dbus).

This moves keyring to an extra, which does mean that anybody that needs the keyring support will need to explicitly specify it. It would be nice if there was a way to add a no-keyring extra, but that's unfortunately not how pip works :-(

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve
Revision history for this message
Colin Watson (cjwatson) wrote :

I think this is probably OK. I bumped the minor version to 1.11.0 to account for this.

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

For my understanding...
Colin, as you are also the maintainer of the deb for launchpadlib.. what does this change mean for packaging the deb? Will keyring then also be an optional dependency?

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

Jelmer already made such a change in https://salsa.debian.org/python-team/packages/python-launchpadlib/-/commit/842dd5191ca3ef1acb800579b7a02cda6cbeeb31 (note that the commit message says Suggests when it should have said Recommends, but those are different "strengths" of optional dependency).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/setup.py b/setup.py
2index 002e766..58e1e84 100755
3--- a/setup.py
4+++ b/setup.py
5@@ -44,7 +44,6 @@ def generate(*docname_or_string):
6 install_requires = [
7 "httplib2",
8 'importlib-metadata; python_version < "3.8"',
9- "keyring",
10 "lazr.restfulclient>=0.14.2",
11 "lazr.uri",
12 "six",
13@@ -90,6 +89,7 @@ setup(
14 "Programming Language :: Python :: 3.11",
15 ],
16 extras_require={
17+ "keyring": ["keyring"],
18 "docs": ["Sphinx"],
19 # Dependencies useful when testing other packages with launchpadlib.
20 "testing": [

Subscribers

People subscribed via source and target branches