From 09854684e6a3c47e23c7aae8cfcfd676f5d8ffdd Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 1 Mar 2024 13:08:09 -0500 Subject: [PATCH] Remove another future import. --- src/allmydata/test/storage_plugin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/allmydata/test/storage_plugin.py b/src/allmydata/test/storage_plugin.py index f638d298f..46088903f 100644 --- a/src/allmydata/test/storage_plugin.py +++ b/src/allmydata/test/storage_plugin.py @@ -5,7 +5,6 @@ functionality. Ported to Python 3. """ -from future.utils import native_str_to_bytes from six import ensure_str import attr @@ -87,7 +86,7 @@ class DummyStorage(object): """ items = configuration.items(self._client_section_name, []) resource = Data( - native_str_to_bytes(dumps(dict(items))), + dumps(dict(items)).encode("utf-8"), ensure_str("text/json"), ) # Give it some dynamic stuff too. @@ -105,7 +104,7 @@ class GetCounter(Resource, object): value = 0 def render_GET(self, request): self.value += 1 - return native_str_to_bytes(dumps({"value": self.value})) + return dumps({"value": self.value}).encode("utf-8") @implementer(RIDummy)