Update dependencies; test on py3.9; drop python 3.5 support

This commit is contained in:
Alexander Graf committed 2021-03-20 17:30:15 +01:00
1 parent 08eaa7d474
commit e2cec0a0bf
10 files changed
+252 -161

No files matched your search

+1 -5
View File
@@ -150,11 +150,7 @@ class NodeIterator(Iterator[T]):
@property
def magic(self) -> str:
"""Magic string for easily identifying a matching iterator file for resuming (hash of some parameters)."""
if 'blake2b' not in hashlib.algorithms_available:
magic_hash = hashlib.new('sha224')
else:
# Use blake2b when possible, i.e. on Python >= 3.6.
magic_hash = hashlib.blake2b(digest_size=6) # type:ignore # pylint: disable=no-member
magic_hash = hashlib.blake2b(digest_size=6)
magic_hash.update(json.dumps(
[self._query_hash, self._query_variables, self._query_referer, self._context.username]
).encode())