From 216d4030ca38067e54dc4dab685dc4101fc8ebde Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Tue, 22 Oct 2019 09:41:14 -0400
Subject: [PATCH] Remove the ChoiceOf in sharenums

---
 src/_zkapauthorizer/foolscap.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/_zkapauthorizer/foolscap.py b/src/_zkapauthorizer/foolscap.py
index 4e77b5a..52a43c6 100644
--- a/src/_zkapauthorizer/foolscap.py
+++ b/src/_zkapauthorizer/foolscap.py
@@ -125,7 +125,10 @@ class RIPrivacyPassAuthorizedStorageServer(RemoteInterface):
 
     def share_sizes(
             storage_index_or_slot=StorageIndex,
-            sharenums=ChoiceOf(None, SetOf(int, maxLength=MAX_BUCKETS)),
+            # Notionally, ChoiceOf(None, SetOf(int, maxLength=MAX_BUCKETS)).
+            # However, support for such a construction appears to be
+            # unimplemented in Foolscap.  So, instead...
+            sharenums=Any(),
     ):
         """
         Get the size of the given shares in the given storage index or slot.  If a
-- 
GitLab