Skip to content

Commit

Permalink
Fix compatibility with typing_extensions>=4.6.0 and importlib_resources
Browse files Browse the repository at this point in the history
Fixes #10. Fixes #11. Fixes #14.
  • Loading branch information
sg495 committed Dec 18, 2023
1 parent 5395b16 commit d8f2aca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"esbonio.sphinx.confDir": "${workspaceFolder}\\docs",
"workbench.colorTheme": "Default Dark+"
"workbench.colorTheme": "Default Dark Modern"
}
4 changes: 4 additions & 0 deletions multiformats/multihash/_hashfuns/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from .utils import Hashfun, validate_hashfun_args

def _keccak(digest_bits: int) -> Hashfun:
# FIXME: pysha3 is not longer available
raise NotImplementedError("keccak hashes are not currently supported.")
try:
import sha3 # type: ignore # pylint: disable = import-outside-toplevel
except ImportError as e:
Expand All @@ -25,6 +27,8 @@ def hashfun(data: BytesLike, size: Optional[int] = None) -> bytes:
return hashfun

def _jit_register_keccak(m, register) -> bool: # type: ignore
# FIXME: pysha3 is not longer available
raise NotImplementedError("keccak hashes are not currently supported.")
digest_bits = int(m[1])
if register is not None:
register(f"keccak-{digest_bits}", _keccak(digest_bits), digest_bits//8)
Expand Down

0 comments on commit d8f2aca

Please sign in to comment.