remove builtins.buffer code from storage code

this is no longer needed on python 3
This commit is contained in:
Richard van der Hoff 2020-05-15 19:26:54 +01:00
parent 91f51c611c
commit e6027562e2
4 changed files with 5 additions and 31 deletions

View file

@ -17,8 +17,6 @@
import itertools
import logging
import six
from signedjson.key import decode_verify_key_bytes
from synapse.storage._base import SQLBaseStore
@ -28,12 +26,8 @@ from synapse.util.iterutils import batch_iter
logger = logging.getLogger(__name__)
# py2 sqlite has buffer hardcoded as only binary type, so we must use it,
# despite being deprecated and removed in favor of memoryview
if six.PY2:
db_binary_type = six.moves.builtins.buffer
else:
db_binary_type = memoryview
db_binary_type = memoryview
class KeyStore(SQLBaseStore):