summary refs log tree commit diff
path: root/synapse/util/caches
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-05-15 19:17:06 +0100
committerRichard van der Hoff <richard@matrix.org>2020-05-15 19:37:41 +0100
commitd4676910c91dd492ca5cc7c207969fa7bfe1bbee (patch)
treec2dc156b782c596f7f8393324058e749c120af30 /synapse/util/caches
parentremove `builtins.buffer` code from storage code (diff)
downloadsynapse-d4676910c91dd492ca5cc7c207969fa7bfe1bbee.tar.xz
remove miscellaneous PY2 code
Diffstat (limited to 'synapse/util/caches')
-rw-r--r--synapse/util/caches/__init__.py7
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