Skip to content

Commit

Permalink
Fix deprecation warnings on 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNaif2018 committed Mar 15, 2024
1 parent 9937e9c commit 5eb73b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ addopts = ["--cov=.", "--cov-report", "term-missing"]
filterwarnings = [
"error::DeprecationWarning",
"error::PendingDeprecationWarning",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
]

[tool.black]
Expand Down
6 changes: 3 additions & 3 deletions tronpy/keys/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import hashlib
import os
from collections.abc import ByteString, Hashable
from collections.abc import Hashable, Sequence
from typing import Any, Iterator, Union

import base58
Expand Down Expand Up @@ -127,7 +127,7 @@ def is_address(value: str) -> bool:
return is_base58check_address(value) or is_hex_address(value)


class BaseKey(ByteString, Hashable):
class BaseKey(Sequence, Hashable):
_raw_key = None # type: bytes

# compatible with bytes.hex()
Expand Down Expand Up @@ -282,7 +282,7 @@ def from_passphrase(cls, passphrase: bytes) -> "PrivateKey":
return cls(sha256(passphrase))


class Signature(ByteString):
class Signature(Sequence):
"""The signature object."""

_raw_signature = None
Expand Down

0 comments on commit 5eb73b4

Please sign in to comment.