Skip to content

Commit

Permalink
v0.5.29 (#426)
Browse files Browse the repository at this point in the history
* Move enforce types decorator from SignatureFix.
* Bump version: 0.5.28 → 0.5.29
  • Loading branch information
calina-c authored Aug 4, 2021
1 parent e535db5 commit fd94861
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.5.28
current_version = 0.5.29
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
author = "ocean.py contributors"

# The full version, including alpha/beta/rc tags
release = "0.5.28"
release = "0.5.29"
# The short X.Y version
release_parts = release.split(".") # a list
version = release_parts[0] + "." + release_parts[1]
Expand Down
2 changes: 1 addition & 1 deletion ocean_lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

__author__ = """OceanProtocol"""
# fmt: off
__version__ = '0.5.28'
__version__ = '0.5.29'
# fmt: on
4 changes: 3 additions & 1 deletion ocean_lib/web3_internal/web3_overrides/signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from eth_utils import int_to_big_endian


@enforce_types
class SignatureFix(Signature):

"""
Expand All @@ -30,20 +29,23 @@ def __init__(
] = None,
) -> None:
"""Initialises SignatureFix object."""
# can not apply the enforce types decorator on init due to the Signature hacking
v, r, s = vrs
if v == 27 or v == 28:
v -= 27

vrs = (v, r, s)
Signature.__init__(self, signature_bytes, vrs, backend)

@enforce_types
def to_hex_v_hacked(self) -> str:
# Need the 'type: ignore' comment below because of
# https://github.com/python/typeshed/issues/300
return "0x" + codecs.decode(
codecs.encode(self.to_bytes_v_hacked(), "hex"), "ascii"
) # type: ignore

@enforce_types
def to_bytes_v_hacked(self) -> bytes:
v = self.v
if v == 0 or v == 1:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
url="https://github.com/oceanprotocol/ocean.py",
# fmt: off
# bumpversion.sh needs single-quotes
version='0.5.28',
version='0.5.29',
# fmt: on
zip_safe=False,
)

0 comments on commit fd94861

Please sign in to comment.