Releases: eth-brownie/brownie
Releases · eth-brownie/brownie
v1.22.0.dev2
This just fixes a TypeError. My bad.
What's Changed
- fix: TypeError in _get_deployment by @dependabot[bot] in #2122
Full Changelog: v1.22.0.dev1...v1.22.0.dev2
v1.22.0.dev1
What's Changed
- chore: Compile C files for source control by @github-actions[bot] in #2034
- feat(cicd): normalize C files for diffchecking by @github-actions[bot] in #2040
- chore: remove black from requirements.in by @github-actions[bot] in #2041
- feat: add
faster-hexbytesto build deps by @github-actions[bot] in #2046 - feat: add
prompt-toolkitto build deps by @github-actions[bot] in #2047 - fix(cicd): pip compile with
--no-strip-extrasby @github-actions[bot] in #2048 - Fix spelling errors by @nivanovvv in #2036
- chore: set mypyc group name by @github-actions[bot] in #2049
- fix: pin build dependencies by @github-actions[bot] in #2050
- feat(mypy): proper overloading for
ReturnValue.__getitem__by @github-actions[bot] in #2051 - feat: add
eth-keysandeth-accountto build deps by @github-actions[bot] in #2052 - feat(mypy): PCMap NewType by @github-actions[bot] in #2053
- feat: add
py-solc-astto build deps by @github-actions[bot] in #2054 - feat: add
py-solc-xto build deps by @github-actions[bot] in #2055 - feat(mypy):
EvmVersionNewType by @github-actions[bot] in #2056 - feat: add
vvmto build deps by @github-actions[bot] in #2057 - feat(cicd): cleanup black github action by @github-actions[bot] in #2058
- fix: PEP625 compliance by @github-actions[bot] in #2059
- feat: add
websocketsto build deps by @github-actions[bot] in #2060 - feat: add
vyperto build deps by @github-actions[bot] in #2061 - feat: add
eip712to build deps by @github-actions[bot] in #2062 - feat: set mypyc flag strict_dunder_typing=True by @github-actions[bot] in #2063
- fix: build wheel on Windows by @github-actions[bot] in #2064
- fix: 32-bit Windows wheels by @github-actions[bot] in #2065
- feat: add
web3to build deps by @github-actions[bot] in #2066 - fix(test): rate limit errs in _load_project helper by @github-actions[bot] in #2067
- feat(test): cache wheels for evm tests by @github-actions[bot] in #2069
- fix(cicd): dependency conflict in pip-compile runner by @github-actions[bot] in #2070
- chore: split out requirements-docs from requirements-dev by @github-actions[bot] in #2071
- feat(test): cache wheels for functionality tests by @github-actions[bot] in #2072
- feat(test): cache wheels for linting tests by @github-actions[bot] in #2073
- chore: disable flake8 error code E226 by @github-actions[bot] in #2074
- chore: fix linter errors by @github-actions[bot] in #2075
- feat: add hypothesis to build deps by @github-actions[bot] in #2076
- chore: ensure all type: ignore comments are specific by @github-actions[bot] in #2078
- chore: run black formatter
black .by @github-actions[bot] in #2079 - chore: fix linter errors in events.py by @github-actions[bot] in #2080
- feat(mypy): proper typing in networks cli module by @github-actions[bot] in #2082
- chore: fix linter errors by @github-actions[bot] in #2084
- feat(mypy): better type hints by @github-actions[bot] in #2086
- chore: run black formatter
black .by @github-actions[bot] in #2089 - chore: fix some typos in comment by @hustrust in #2087
- chore: pip compile by @github-actions[bot] in #2090
- chore(cicd): cleanup compile workflow with mypycify composite action by @github-actions[bot] in #2091
- fix brownie console crash when X11 is not available by @kernel1983 in #2088
- Fix grammar and typos by @nivanovvv in #2095
- chore: fix variable name by @weifangc in #2096
- fix: system err in console by @github-actions[bot] in #2098
- Fix ganache version URL mismatch by @nivanovvv in #2099
- ci: bump actions/checkout to v6 by @rejected-l in #2100
- chore: bump dep pins by @BobTheBuidler in #2101
- fix: correct typo in Base network fork name by @nivanovvv in #2103
- chore: remove unused
type: ignorecomments by @nvy-0x in #1936 - FIX: sepolia-ETH API endpoint needs
/apisuffix, ref https://ethereum.stackexchange.com/a/147268 by @koyo922 in #1799 - feat(cicd): run pyupgrade & autoflake in github runner by @dependabot[bot] in #2105
- chore: run black formatter
black .by @github-actions[bot] in #2109 - fix(mypy): fix type hints for **kwargs by @dependabot[bot] in #2110
- Bump version from 1.22.0.dev0 to 1.22.0.dev1 by @Faolain in #2111
- chore: add classifiers for python3.13 and 3.14 by @dependabot[bot] in #2113
- feat(cicd): run isort in github runner by @dependabot[bot] in #2118
- feat: bump mypy to v1.19.0 by @dependabot[bot] in #2119
- fix(release) invalid wheel tag in release runner by @dependabot[bot] in #2120
- chore(deps): bump virtualenv from 20.35.4 to 20.36.1 by @dependabot[bot] in #2112
New Contributors
- @nivanovvv made their first contribution in #2036
- @hustrust made their first contribution in #2087
- @kernel1983 made their first contribution in #2088
- @weifangc made their first contribution in #2096
- @rejected-l made their first contribution in #2100
- @koyo922 made their first contribution in #1799
Full Changelog: v1.22.0.dev0...v1.22.0.dev1
v1.22.0.dev0
Brownie v1.22.0.dev0: What Changed?
Fixed
- typing for *args and **kwargs (#1870)
- singleton metaclass instance typing (#1888)
- various other minor typing issues
- Various typos in API and core documentation for readability
Changed
- With Brownie
v1.22.0.dev0, much of the codebase is now compiled to C using mypyc, rather than running purely as interpreted Python. (#1875 and others) This brings significant performance improvements—but also some important differences in how the code runs. More on this below. - Support Python3.14 and 3.14t (#2008)
- Replace eth-utils with faster-eth-utils (#1885)
- Replace eth-abi with faster-eth-abi (#1977)
- Replace hexbytes with faster-hexbytes (#2004)
- Replaced builtin json with (ujson) for 4x encoding/decoding speed improvements (#2005)
- Support eth-utils v5 (#1872)
- optimize EventDict.contains and .count (#1868)
- Various TypedDict definitions and other typing improvements
⚡ Compiled vs. Interpreted Code in Brownie v1.22.0.dev0
Interpreted Python: How Brownie Used to Work
Traditionally, Brownie (like most Python code) runs via the Python interpreter:
- Execution: Each line of code is parsed and executed at runtime.
- Flexibility: Features like dynamic typing, introspection, monkeypatching, and hot reloading work seamlessly.
- Performance: Interpreted code tends to be slower, especially for heavy computation and tight loops.
Compiled with mypyc: What’s New?
With mypyc:
- Compilation: Type-annotated Python is compiled to C, producing native shared libraries (
.soor.pydfiles) loaded by Python as extension modules. - Performance: This brings significantly faster execution, particularly for computation-heavy or frequently-used code paths.
- Limitations: Some highly dynamic Python features might not work as before—such as certain reflection patterns, monkeypatching, or on-the-fly class/attribute modifications. You can read more about the differences vs interpreted Python here.
- Type hints now enforced: Brownie’s codebase now makes greater use of Python type hints, both internally and at the user-facing boundary. With mypyc compilation, many of these type hints are enforced at runtime—so passing an unexpected type may now raise a
TypeErrorimmediately, where previously such issues might have gone unnoticed. - Distribution: Compiling to C results in substantially longer install times when building from source. To mitigate this for users, we are providing prebuilt wheels on PyPI—allowing for fast, simple installations across systems.
Why Can This Cause Bugs?
- Type hint enforcement: mypyc-enforced type hints mean violations can raise
TypeErrors at runtime that would have been silently ignored in pure Python. You may encounter different errors if your code passes unexpected types to Brownie functions. - The C-compiled code path could expose edge cases previously unseen.
- Third-party plugins or code relying on Brownie’s internal Python structures or dynamic features may not function exactly identically. We've taken steps to minimize the frequency of this, but you may find cases that we need to know about before pushing v1.22.0.
- Some subtle differences in error reporting or debugging (e.g., shorter stack traces).
Help Us Test!
v1.22.0.dev0 is a prerelease—we are actively seeking testers to help us ensure compatibility and stability before Brownie 1.22.0 is officially released.
- Does your project use Brownie? Upgrade to
v1.22.0.dev0and let us know if you find unexpected behavior. - Found a bug, performance issue, or incompatible plugin? Please open an issue!
- Feedback about speed or experience? We want to hear from you!
How to Try the Prerelease
pip install --pre eth-brownie==1.22.0.dev0brownie 1.21.0
brownie 1.20.7
brownie 1.20.6
brownie 1.20.5
brownie 1.20.4
Fixed
- Fall back to ABI when
Contract.from_explorercompilation fails (#1772)