Skip to content

Commit

Permalink
Remove another future import.
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonspeed committed Mar 1, 2024
1 parent a9015cd commit 0985468
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/allmydata/test/storage_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Ported to Python 3.
"""

from future.utils import native_str_to_bytes
from six import ensure_str

import attr
Expand Down Expand Up @@ -87,7 +86,7 @@ def get_client_resource(self, configuration):
"""
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.
Expand All @@ -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)
Expand Down

0 comments on commit 0985468

Please sign in to comment.