python: Remove default "utf8" argument for encode(), decode().

Partially generated by pyupgrade.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-08-02 14:20:39 -07:00
committed by Tim Abbott
parent 1760897a8c
commit ad5f0c05b5
32 changed files with 54 additions and 56 deletions

View File

@@ -1286,7 +1286,7 @@ def do_deactivate_stream(
# Prepend a substring of the hashed stream ID to the new stream name
streamID = str(stream.id)
stream_id_hash_object = hashlib.sha512(streamID.encode("utf-8"))
stream_id_hash_object = hashlib.sha512(streamID.encode())
hashed_stream_id = stream_id_hash_object.hexdigest()[0:7]
new_name = (hashed_stream_id + "!DEACTIVATED:" + old_name)[: Stream.MAX_NAME_LENGTH]