Skip to content

Commit

Permalink
Merge pull request #1731 from eth-brownie/v1.19.5
Browse files Browse the repository at this point in the history
v1.19.5
  • Loading branch information
iamdefinitelyahuman authored Jan 31, 2024
2 parents 6b79d41 + 67f66f5 commit b1ca8cf
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 11 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/eth-brownie/brownie)

## [1.19.5](https://github.com/eth-brownie/brownie/tree/v1.19.5) - 2024-01-31
### Added
- Support for custom / typed errors ([#1728](https://github.com/eth-brownie/brownie/pull/1728))

### Changed
- Default to EIP1559-style transactions on live networks ([#1727](https://github.com/eth-brownie/brownie/pull/1727))

### Fixed
- Readthedocs missing config file ([#1729](https://github.com/eth-brownie/brownie/pull/1729))

## [1.19.4](https://github.com/eth-brownie/brownie/tree/v1.19.4) - 2024-01-29
### Added
- `viaIR` optimizer support ([#1572](https://github.com/eth-brownie/brownie/pull/1572))
Expand Down
2 changes: 1 addition & 1 deletion brownie/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from brownie._expansion import expand_posix_vars
from brownie._singleton import _Singleton

__version__ = "1.19.4"
__version__ = "1.19.5"

BROWNIE_FOLDER = Path(__file__).parent
DATA_FOLDER = Path.home().joinpath(".brownie")
Expand Down
5 changes: 3 additions & 2 deletions brownie/project/compiler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
}



def compile_and_format(
contract_sources: Dict[str, str],
solc_version: Optional[str] = None,
Expand Down Expand Up @@ -179,7 +178,9 @@ def generate_input_json(

if evm_version is None:
_module = solidity if language == "Solidity" else vyper
evm_version = next(i[0] for i in _module.EVM_VERSION_MAPPING if _module.get_version() >= i[1])
evm_version = next(
i[0] for i in _module.EVM_VERSION_MAPPING if _module.get_version() >= i[1]
)

input_json: Dict = deepcopy(STANDARD_JSON)
input_json["language"] = language
Expand Down
2 changes: 1 addition & 1 deletion brownie/project/compiler/solidity.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from solcast.nodes import NodeBase, is_inside_offset

from brownie._config import EVM_EQUIVALENTS
from brownie.exceptions import CompilerError, IncompatibleSolcVersion, SOLIDITY_ERROR_CODES # noqa
from brownie.exceptions import SOLIDITY_ERROR_CODES, CompilerError, IncompatibleSolcVersion # noqa
from brownie.project.compiler.utils import _get_alias, expand_source_map

from . import sources
Expand Down
6 changes: 3 additions & 3 deletions brownie/project/flattener.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def path_to_name(cls, pth: str) -> str:
Note, that sometimes there could be several different files with the same name in a project,
so these files should keep uniq name to correct verification.
"""
return 'contracts/' + pth.split('/contracts/')[1]
return "contracts/" + pth.split("/contracts/")[1]

def traverse(self, fp: str) -> None:
"""Traverse a contract source files dependencies.
Expand All @@ -66,8 +66,8 @@ def traverse(self, fp: str) -> None:
# replacement function for re.sub, we just sanitize the path
repl = ( # noqa: E731
lambda m: f'import{m.group("prefix")}'
+ f'"{self.path_to_name(sanitize(m.group("path")))}"'
+ f'{m.group("suffix")}'
+ f'"{self.path_to_name(sanitize(m.group("path")))}"'
+ f'{m.group("suffix")}'
)
self.sources[name] = IMPORT_PATTERN.sub(repl, source)
if fp_obj.name not in self.dependencies:
Expand Down
4 changes: 2 additions & 2 deletions brownie/project/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def load(
project_path: Union[Path, str, None] = None,
name: Optional[str] = None,
raise_if_loaded: bool = True,
compile: bool = True
compile: bool = True,
) -> "Project":
"""Loads a project and instantiates various related objects.
Expand Down Expand Up @@ -1028,7 +1028,7 @@ def _load_sources(project_path: Path, subfolder: str, allow_json: bool) -> Dict:
continue
if next((i for i in path.relative_to(project_path).parts if i.startswith("_")), False):
continue
with path.open(encoding='utf-8') as fp:
with path.open(encoding="utf-8") as fp:
source = fp.read()

if hasattr(hooks, "brownie_load_source"):
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.19.4
current_version = 1.19.5

[bumpversion:file:setup.py]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
setup(
name="eth-brownie",
packages=find_packages(),
version="1.19.4", # don't change this manually, use bumpversion instead
version="1.19.5", # 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,
Expand Down

0 comments on commit b1ca8cf

Please sign in to comment.