From 784250f29a0fea85daf53f248a3be24c1bbaf9bb Mon Sep 17 00:00:00 2001 From: Ben Hauser <35276322+iamdefinitelyahuman@users.noreply.github.com> Date: Tue, 4 Feb 2020 03:25:00 +0400 Subject: [PATCH] V1.6.1 (#352) * bump dependency versions * fix mypy issues * minor docs update, changelog * bump version to 1.6.1 --- CHANGELOG.md | 3 +++ brownie/_cli/__main__.py | 2 +- brownie/convert/datatypes.py | 12 ++++++------ brownie/network/contract.py | 2 +- docs/conf.py | 2 +- docs/core-transactions.rst | 7 +++++-- requirements-dev.txt | 2 -- requirements.txt | 20 ++++++++++---------- setup.cfg | 2 +- setup.py | 2 +- tox.ini | 2 +- 11 files changed, 30 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12311641a..5ea63ef8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ This changelog format is based on [Keep a Changelog](https://keepachangelog.com/ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased](https://github.com/iamdefinitelyahuman/brownie) +## [1.6.1](https://github.com/iamdefinitelyahuman/brownie/tree/v1.6.1) - 2020-02-03 +### Changed +- Bump dependency versions, notably [web3.py](https://github.com/ethereum/web3.py) [v5.5.0](https://web3py.readthedocs.io/en/stable/releases.html#v5-5-0-2020-02-03) to support the new [ENS registry](https://medium.com/the-ethereum-name-service/ens-registry-migration-bug-fix-new-features-64379193a5a) ## [1.6.0](https://github.com/iamdefinitelyahuman/brownie/tree/v1.6.0) - 2020-02-02 ### Added diff --git a/brownie/_cli/__main__.py b/brownie/_cli/__main__.py index 3af41bcd8..0c0954bc0 100644 --- a/brownie/_cli/__main__.py +++ b/brownie/_cli/__main__.py @@ -10,7 +10,7 @@ from brownie.utils import color, notify from brownie.utils.docopt import docopt, levenshtein_norm -__version__ = "1.6.0" +__version__ = "1.6.1" __doc__ = """Usage: brownie [...] [options ] diff --git a/brownie/convert/datatypes.py b/brownie/convert/datatypes.py index 57e100736..cb14612a9 100644 --- a/brownie/convert/datatypes.py +++ b/brownie/convert/datatypes.py @@ -2,7 +2,7 @@ from copy import deepcopy from decimal import Decimal -from typing import Any, Dict, ItemsView, KeysView, List, Optional, Sequence, TypeVar +from typing import Any, Dict, ItemsView, KeysView, List, Optional, Sequence, TypeVar, Union import eth_utils from hexbytes import HexBytes @@ -176,10 +176,10 @@ class EthAddress(str): """String subclass that raises TypeError when compared to a non-address.""" - def __new__(cls, value: Any) -> str: # type: ignore + def __new__(cls, value: Union[bytes, str]) -> str: if isinstance(value, bytes): value = HexBytes(value).hex() - value = eth_utils.add_0x_prefix(str(value)) + value = eth_utils.add_0x_prefix(str(value)) # type: ignore try: value = eth_utils.to_checksum_address(value) except ValueError: @@ -257,7 +257,7 @@ def _to_hex(value: Any) -> str: if value in ("", "0x"): return "0x00" if eth_utils.is_hex(value): - return eth_utils.add_0x_prefix(value) + return eth_utils.add_0x_prefix(value) # type: ignore raise ValueError(f"Cannot convert {type(value).__name__} '{value}' to a hex string") @@ -280,10 +280,10 @@ def __new__(cls, values: Sequence, abi: Optional[List] = None) -> "ReturnValue": self._dict = {i["name"]: values[c] for c, i in enumerate(self._abi) if i["name"]} return self - def __hash__(self) -> Any: + def __hash__(self) -> int: return super().__hash__() - def __eq__(self, other: Any) -> Any: + def __eq__(self, other: Any) -> bool: return _kwargtuple_compare(self, other) def __getitem__(self, key: Any) -> Any: diff --git a/brownie/network/contract.py b/brownie/network/contract.py index 6961a2fe1..45e6c10dc 100644 --- a/brownie/network/contract.py +++ b/brownie/network/contract.py @@ -557,7 +557,7 @@ def _signature(abi: Dict) -> str: def _verify_deployed_code(address: str, expected_bytecode: str) -> bool: actual_bytecode = web3.eth.getCode(address).hex()[2:] - expected_bytecode = remove_0x_prefix(expected_bytecode) + expected_bytecode = remove_0x_prefix(expected_bytecode) # type: ignore if expected_bytecode.startswith("730000000000000000000000000000000000000000"): # special case for Solidity libraries diff --git a/docs/conf.py b/docs/conf.py index f793a8887..75fc6b222 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,7 +37,7 @@ def setup(sphinx): # The short X.Y version version = "" # The full version, including alpha/beta/rc tags -release = "v1.6.0" +release = "v1.6.1" # -- General configuration --------------------------------------------------- diff --git a/docs/core-transactions.rst b/docs/core-transactions.rst index 0555b8a05..329a0b04b 100644 --- a/docs/core-transactions.rst +++ b/docs/core-transactions.rst @@ -130,10 +130,13 @@ Internal Transactions and Deployments .. code-block:: python - >>> tx = Deployer.deploy_new_token() + >>> deployer + + + >>> tx = deployer.deployNewContract() Transaction sent: 0x6c3183e41670101c4ab5d732bfe385844815f67ae26d251c3bd175a28604da92 Gas price: 0.0 gwei Gas limit: 79781 - Deployer.deploy_new_contract confirmed - Block: 4 Gas used: 79489 (99.63%) + Deployer.deployNewContract confirmed - Block: 4 Gas used: 79489 (99.63%) >>> tx.new_contracts ["0x1262567B3e2e03f918875370636dE250f01C528c"] diff --git a/requirements-dev.txt b/requirements-dev.txt index 414459c6d..60674c9e1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,10 +5,8 @@ coveralls==1.9.2 flake8==3.7.7 isort==4.3.21 mypy==0.720 -pytest==5.3.2 pytest-cov==2.8.1 pytest-mock==1.12.0 -pytest-xdist==1.31.0 sphinx==2.0.1 sphinx_rtd_theme==0.4.3 pygments_lexer_solidity==0.4.0 diff --git a/requirements.txt b/requirements.txt index 85c53ea5a..ad0a30c32 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,21 +1,21 @@ colorama>=0.4.1;platform_system=='Windows' -eth-abi==2.0.0 -eth-event>=0.2.1,<1.0.0 +eth-abi==2.1.0 +eth-event>=0.2.2,<1.0.0 eth-hash[pycryptodome]==0.2.0 -eth-utils==1.8.0 +eth-utils==1.8.4 hexbytes==0.2.0 -hypothesis==5.3.0 -psutil>=5.6.2,<6.0.0 +hypothesis==5.4.1 +psutil>=5.6.7,<6.0.0 py>=1.5.0 pyreadline==2.1;platform_system=='Windows' py-solc-ast>=1.1.0,<2.0.0 py-solc-x>=0.7.1,<1.0.0 -pytest==5.3.2 +pytest==5.3.5 pytest-xdist==1.31.0 pythx==1.4.1 -pyyaml>=5.1.0,<6.0.0 +pyyaml>=5.3.0,<6.0.0 requests>=2.22.0,<3.0.0 -semantic-version>=2.8.2,<3.0.0 -tqdm==4.41.0 +semantic-version>=2.8.4,<3.0.0 +tqdm==4.42.1 vyper==0.1.0b16 -web3==5.3.0 +web3==5.5.0 diff --git a/setup.cfg b/setup.cfg index aa122a059..efa0ffd05 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.6.0 +current_version = 1.6.1 [bumpversion:file:setup.py] diff --git a/setup.py b/setup.py index 57099fabc..936dba3d2 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name="eth-brownie", packages=find_packages(), - version="1.6.0", # don't change this manually, use bumpversion instead + version="1.6.1", # don't change this manually, use bumpversion instead license="MIT", description="A Python framework for Ethereum smart contract deployment, testing and interaction.", # noqa: E501 long_description=long_description, diff --git a/tox.ini b/tox.ini index fa6891b04..f126b1fb5 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ envdir = py38,plugintest: {toxinidir}/.tox/py38 deps = py{36,37,38},{mix,evm,plugin}test: coverage==4.5.4 - py{36,37,38},{mix,evm,plugin}test: pytest==5.3.2 + py{36,37,38},{mix,evm,plugin}test: pytest==5.3.5 py{36,37,38},{mix,evm,plugin}test: pytest-cov==2.8.1 py{36,37,38},{mix,evm,plugin}test: pytest-mock==1.12.0 py{36,37,38},{mix,evm,plugin}test: pytest-xdist==1.31.0