diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-05-15 19:17:06 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-05-15 19:37:41 +0100 |
commit | d4676910c91dd492ca5cc7c207969fa7bfe1bbee (patch) | |
tree | c2dc156b782c596f7f8393324058e749c120af30 /synapse/util/caches | |
parent | remove `builtins.buffer` code from storage code (diff) | |
download | synapse-d4676910c91dd492ca5cc7c207969fa7bfe1bbee.tar.xz |
remove miscellaneous PY2 code
Diffstat (limited to 'synapse/util/caches')
-rw-r--r-- | synapse/util/caches/__init__.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/synapse/util/caches/__init__.py b/synapse/util/caches/__init__.py index 4b8a0c7a8f..dd356bf156 100644 --- a/synapse/util/caches/__init__.py +++ b/synapse/util/caches/__init__.py @@ -15,11 +15,9 @@ # limitations under the License. import logging +from sys import intern from typing import Callable, Dict, Optional -import six -from six.moves import intern - import attr from prometheus_client.core import Gauge @@ -154,9 +152,6 @@ def intern_string(string): return None try: - if six.PY2: - string = string.encode("ascii") - return intern(string) except UnicodeEncodeError: return string |