From d74452eecc46ef4f86798f96c71a5704f8e60442 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Tue, 20 Aug 2019 10:44:38 -0400
Subject: [PATCH] Bump to a Tahoe-LAFS w/ a working get_storage_client consumer

---
 src/_zkapauthorizer/_plugin.py           | 12 +++++-------
 src/_zkapauthorizer/tests/test_plugin.py | 19 ++++++-------------
 tahoe-lafs.nix                           |  6 +++---
 3 files changed, 14 insertions(+), 23 deletions(-)

diff --git a/src/_zkapauthorizer/_plugin.py b/src/_zkapauthorizer/_plugin.py
index 5db7928..8886a60 100644
--- a/src/_zkapauthorizer/_plugin.py
+++ b/src/_zkapauthorizer/_plugin.py
@@ -111,13 +111,11 @@ class ZKAPAuthorizer(object):
 
 
     def get_storage_client(self, node_config, announcement, get_rref):
-        return succeed(
-            ZKAPAuthorizerStorageClient(
-                get_rref,
-                # TODO: Make the caller figure out the correct number of
-                # passes to extract.
-                partial(self._get_store(node_config).extract_passes, 1),
-            )
+        return ZKAPAuthorizerStorageClient(
+            get_rref,
+            # TODO: Make the caller figure out the correct number of
+            # passes to extract.
+            partial(self._get_store(node_config).extract_passes, 1),
         )
 
 
diff --git a/src/_zkapauthorizer/tests/test_plugin.py b/src/_zkapauthorizer/tests/test_plugin.py
index 25fefb5..2587904 100644
--- a/src/_zkapauthorizer/tests/test_plugin.py
+++ b/src/_zkapauthorizer/tests/test_plugin.py
@@ -36,11 +36,6 @@ from testtools.matchers import (
 from testtools.twistedsupport import (
     succeeded,
 )
-from testtools.twistedsupport._deferred import (
-    # I'd rather use https://twistedmatrix.com/trac/ticket/8900 but efforts
-    # there appear to have stalled.
-    extract_result,
-)
 
 from hypothesis import (
     given,
@@ -235,8 +230,8 @@ class ClientPluginTests(TestCase):
     @given(tahoe_configs(), announcements())
     def test_interface(self, get_config, announcement):
         """
-        ``get_storage_client`` returns a ``Deferred`` that fires with an object
-        which provides ``IStorageServer``.
+        ``get_storage_client`` returns an object which provides
+        ``IStorageServer``.
         """
         tempdir = self.useFixture(TempDir())
         node_config = get_config(
@@ -244,15 +239,15 @@ class ClientPluginTests(TestCase):
             b"tub.port",
         )
 
-        storage_client_deferred = storage_server.get_storage_client(
+        storage_client = storage_server.get_storage_client(
             node_config,
             announcement,
             get_rref,
         )
 
         self.assertThat(
-            storage_client_deferred,
-            succeeded(Provides([IStorageServer])),
+            storage_client,
+            Provides([IStorageServer]),
         )
 
 
@@ -289,14 +284,12 @@ class ClientPluginTests(TestCase):
         store.add(voucher, [token])
         store.insert_passes_for_voucher(voucher, [zkap])
 
-        storage_client_deferred = storage_server.get_storage_client(
+        storage_client = storage_server.get_storage_client(
             node_config,
             announcement,
             get_rref,
         )
 
-        storage_client = extract_result(storage_client_deferred)
-
         # This is hooked up to a garbage reference.  We don't care about its
         # _result_, anyway, right now.
         d = storage_client.renew_lease(
diff --git a/tahoe-lafs.nix b/tahoe-lafs.nix
index ebd6d02..f9460c4 100644
--- a/tahoe-lafs.nix
+++ b/tahoe-lafs.nix
@@ -11,9 +11,9 @@ buildPythonPackage rec {
     owner = "LeastAuthority";
     repo = "tahoe-lafs";
     # HEAD of an integration branch for all of the storage plugin stuff.  Last
-    # updated August 19th 2019.
-    rev = "c37743ac82becc14a4ab066e73c4e77abf73d172";
-    sha256 = "0f46j50arml2giwybaw630dfvrsxsakpsn1vkzcsgn8ai8vaccv1";
+    # updated August 20th 2019.
+    rev = "ba2f31f5f3719c7cf9f621852571e89ab445bf61";
+    sha256 = "02c3zghx1951zw1912c2qf9s7n41wsbz8ld5700myak69nvkh0gs";
   };
 
   postPatch = ''
-- 
GitLab