← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:storm-0.23+lp415 into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:storm-0.23+lp415 into launchpad:master.

Commit message:
Upgrade to storm 0.23+lp415

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/380845

This merges the 0.23 release.

I cleaned up a few things that can now be implemented more gracefully.

Dependencies MP: https://code.launchpad.net/~cjwatson/lp-source-dependencies/+git/lp-source-dependencies/+merge/380844
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:storm-0.23+lp415 into launchpad:master.
diff --git a/constraints.txt b/constraints.txt
index 541ae44..0a146f7 100644
--- a/constraints.txt
+++ b/constraints.txt
@@ -297,7 +297,7 @@ SimpleTAL==4.3
 soupmatchers==0.4
 soupsieve==1.9
 # lp:~launchpad-committers/storm/lp
-storm==0.22+lp414
+storm==0.23+lp415
 subprocess32==3.2.6
 subvertpy==0.9.1
 testresources==0.2.7
diff --git a/lib/lp/app/browser/tales.py b/lib/lp/app/browser/tales.py
index 3625593..22bb6c4 100644
--- a/lib/lp/app/browser/tales.py
+++ b/lib/lp/app/browser/tales.py
@@ -956,10 +956,7 @@ class BugTaskImageDisplayAPI(ObjectImageDisplayAPI):
 
     def _hasBugBranch(self):
         """Return whether the bug has a branch linked to it."""
-        # XXX cjwatson 2020-03-18: This should use the more efficient
-        # .is_empty(), but that doesn't work on `BoundReferenceSet`s.
-        #   https://code.launchpad.net/~cjwatson/storm/reference-set-is-empty/+merge/380837
-        return self._context.bug.linked_bugbranches.any() is None
+        return not self._context.bug.linked_bugbranches.is_empty()
 
     def _hasSpecification(self):
         """Return whether the bug is linked to a specification."""
diff --git a/lib/lp/services/openid/model/baseopenidstore.py b/lib/lp/services/openid/model/baseopenidstore.py
index a854b78..7b0c336 100644
--- a/lib/lp/services/openid/model/baseopenidstore.py
+++ b/lib/lp/services/openid/model/baseopenidstore.py
@@ -17,8 +17,8 @@ from openid.association import Association
 from openid.store import nonce
 from openid.store.interface import OpenIDStore
 from storm.properties import (
+    Bytes,
     Int,
-    RawStr,
     Unicode,
     )
 
@@ -32,7 +32,7 @@ class BaseStormOpenIDAssociation:
 
     server_url = Unicode()
     handle = Unicode()
-    secret = RawStr()
+    secret = Bytes()
     issued = Int()
     lifetime = Int()
     assoc_type = Unicode()
diff --git a/lib/lp/soyuz/doc/package-cache.txt b/lib/lp/soyuz/doc/package-cache.txt
index 4a9d7b3..2da0376 100644
--- a/lib/lp/soyuz/doc/package-cache.txt
+++ b/lib/lp/soyuz/doc/package-cache.txt
@@ -689,8 +689,8 @@ Content class declarations for FTI
 ==================================
 
 For the FTI to work properly with Storm queries, the fti column on the
-content class must be declared as a RawStr, otherwise unicode errors are
-likely to be thrown.
+content class must be declared as Bytes, otherwise unicode errors are likely
+to be thrown.
 
     >>> transaction.commit()
     >>> binary_name = getUtility(
@@ -702,7 +702,7 @@ likely to be thrown.
 
     >>> cache = DistroSeriesPackageCache.get(id=cache_with_unicode.id)
 
-The following line fails unless the content class FTI column is RawStr:
+The following line fails unless the content class FTI column is Bytes:
 
     >>> cache.fti
     "'\xc3\xa2\xc2\x80\xc2\x9cunicode\xc3\xa2\xc2\x80\xc2\x9c':1B"
diff --git a/lib/lp/soyuz/model/distroseriespackagecache.py b/lib/lp/soyuz/model/distroseriespackagecache.py
index 0a6c1ee..cabf07e 100644
--- a/lib/lp/soyuz/model/distroseriespackagecache.py
+++ b/lib/lp/soyuz/model/distroseriespackagecache.py
@@ -18,7 +18,7 @@ from storm.expr import (
     Max,
     Select,
     )
-from storm.locals import RawStr
+from storm.locals import Bytes
 from zope.interface import implementer
 
 from lp.services.database import bulk
@@ -45,7 +45,7 @@ class DistroSeriesPackageCache(SQLBase):
     binarypackagename = ForeignKey(dbName='binarypackagename',
         foreignKey='BinaryPackageName', notNull=True)
 
-    fti = RawStr(allow_none=True, default=None)
+    fti = Bytes(allow_none=True, default=None)
     name = StringCol(notNull=False, default=None)
     summary = StringCol(notNull=False, default=None)
     description = StringCol(notNull=False, default=None)