← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad-buildd:remove-defer-returnValue into launchpad-buildd:master

 

Colin Watson has proposed merging ~cjwatson/launchpad-buildd:remove-defer-returnValue into launchpad-buildd:master.

Commit message:
Stop using twisted.internet.defer.returnValue

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

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

`defer.returnValue` was only needed in Python 2; in Python 3, a simple
`return` is fine.

`twisted.internet.defer.returnValue` is deprecated as of Twisted 24.7.0.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:remove-defer-returnValue into launchpad-buildd:master.
diff --git a/debian/changelog b/debian/changelog
index 6444ec9..394e07b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,11 @@
 launchpad-buildd (248) UNRELEASED; urgency=medium
 
+  [ Jürgen Gmach ]
   * Set REQUESTS_CA_BUNDLE so craft tools can fetch files via requests.
 
+  [ Colin Watson ]
+  * Stop using twisted.internet.defer.returnValue.
+
  -- Jürgen Gmach <juergen.gmach@xxxxxxxxxxxxx>  Fri, 22 Nov 2024 13:53:23 +0100
 
 launchpad-buildd (247) focal; urgency=medium
diff --git a/lpbuildd/tests/test_snap.py b/lpbuildd/tests/test_snap.py
index dfc6d19..addc71d 100644
--- a/lpbuildd/tests/test_snap.py
+++ b/lpbuildd/tests/test_snap.py
@@ -859,7 +859,7 @@ class TestSnapBuildManagerIteration(TestCase):
                 "stderr", text_content(err.decode("UTF-8", "replace"))
             )
             self.assertEqual(0, code)
-        defer.returnValue(out)
+        return out
 
     @defer.inlineCallbacks
     def test_fetch_via_proxy(self):