launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #32034
[Merge] ~ikoruk/launchpad:update-openid into launchpad:master
Yuliy Schwartzburg has proposed merging ~ikoruk/launchpad:update-openid into launchpad:master.
Commit message:
Change from `python-openid2` to `python3-openid` and do the minimal amount of changes to make it work
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~ikoruk/launchpad/+git/launchpad/+merge/478462
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ikoruk/launchpad:update-openid into launchpad:master.
diff --git a/lib/lp/services/openid/model/baseopenidstore.py b/lib/lp/services/openid/model/baseopenidstore.py
index e024175..a576732 100644
--- a/lib/lp/services/openid/model/baseopenidstore.py
+++ b/lib/lp/services/openid/model/baseopenidstore.py
@@ -54,11 +54,11 @@ class BaseStormOpenIDAssociation:
def as_association(self):
"""Return an equivalent openid-python `Association` object."""
return Association(
- self.handle.encode("ASCII"),
+ str(self.handle),
self.secret,
self.issued,
self.lifetime,
- self.assoc_type.encode("ASCII"),
+ str(self.assoc_type),
)
@@ -103,11 +103,11 @@ class BaseStormOpenIDStore(OpenIDStore):
def getAssociation(self, server_url, handle=None):
"""See `OpenIDStore`."""
store = IPrimaryStore(self.Association)
- server_url = six.ensure_text(server_url)
+ server_url = str(server_url)
if handle is None:
result = store.find(self.Association, server_url=server_url)
else:
- handle = six.ensure_text(handle, "ASCII")
+ handle = str(handle)
result = store.find(
self.Association, server_url=server_url, handle=handle
)
@@ -116,7 +116,7 @@ class BaseStormOpenIDStore(OpenIDStore):
associations = []
for db_assoc in db_associations:
assoc = db_assoc.as_association()
- if assoc.getExpiresIn() == 0:
+ if assoc.expiresIn == 0:
store.remove(db_assoc)
else:
associations.append(assoc)
diff --git a/requirements/launchpad.txt b/requirements/launchpad.txt
index 8c05d7e..5578fcc 100644
--- a/requirements/launchpad.txt
+++ b/requirements/launchpad.txt
@@ -143,7 +143,7 @@ pystache==0.5.3
python-dateutil==2.9.0.post0
python-debian==0.1.32
python-keystoneclient==3.21.0
-python-openid2==3.2
+python3-openid==3.2
python-swiftclient==4.6.0
PyYAML==6.0.2
rabbitfixture==0.5.3
diff --git a/setup.cfg b/setup.cfg
index 8cf3c6c..9f1b662 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -80,7 +80,7 @@ install_requires =
python-dateutil
python-debian
python-keystoneclient
- python-openid2
+ python3-openid
python-subunit
python-swiftclient
PyYAML