From 39ea842a8513cfaa590b36af848fa51798bac063 Mon Sep 17 00:00:00 2001 From: NotPeopling2day <32708219+NotPeopling2day@users.noreply.github.com> Date: Wed, 22 Nov 2023 15:17:38 +0100 Subject: [PATCH 1/3] chore: update versions --- .pre-commit-config.yaml | 2 +- setup.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0fb78ed..7944940 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.6.1 + rev: v1.7.0 hooks: - id: mypy additional_dependencies: [types-requests, types-setuptools] diff --git a/setup.py b/setup.py index b67b76f..f870df7 100644 --- a/setup.py +++ b/setup.py @@ -11,15 +11,16 @@ ], "lint": [ "black>=23.11.0,<24", # Auto-formatter and linter - "mypy>=1.6.1,<2", # Static type analyzer - "types-requests", # Needed due to mypy typeshed - "types-setuptools", # Needed due to mypy typeshed - "types-PyYAML", # Needed due to mypy typeshed + "mypy>=1.7.0,<2", # Static type analyzer + "types-requests", # Needed for mypy type shed + "types-setuptools", # Needed for mypy type shed + "types-PyYAML", # Needed for mypy type shed "flake8>=6.1.0,<7", # Style linter "isort>=5.10.1,<6", # Import sorting linter "mdformat>=0.7.17", # Auto-formatter for markdown "mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown "mdformat-frontmatter>=0.4.1", # Needed for frontmatters-style headers in issue templates + "mdformat-pyproject>=0.0.1", # Allows configuring in pyproject.toml ], "release": [ # `release` GitHub Action job uses this "setuptools", # Installation tool @@ -59,7 +60,7 @@ url="https://github.com/ApeWorX/ape-frame", include_package_data=True, install_requires=[ - "eth-ape>=0.6.0,<0.7.0", + "eth-ape>=0.7.0,<0.8", ], python_requires=">=3.8,<4", extras_require=extras_require, From a57d1631cf1edea80049e32f4752319a56214b7d Mon Sep 17 00:00:00 2001 From: NotPeopling2day <32708219+NotPeopling2day@users.noreply.github.com> Date: Mon, 11 Dec 2023 20:24:44 -0600 Subject: [PATCH 2/3] chore: more updates --- .pre-commit-config.yaml | 2 +- ape_frame/accounts.py | 2 +- ape_frame/providers.py | 3 ++- setup.py | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7944940..61b6300 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.7.0 + rev: v1.7.1 hooks: - id: mypy additional_dependencies: [types-requests, types-setuptools] diff --git a/ape_frame/accounts.py b/ape_frame/accounts.py index 215a76b..d24355a 100644 --- a/ape_frame/accounts.py +++ b/ape_frame/accounts.py @@ -52,7 +52,7 @@ def sign_message(self, msg: SignableMessage) -> Optional[MessageSignature]: def sign_transaction(self, txn: TransactionAPI, **signer_options) -> Optional[TransactionAPI]: # TODO: need a way to deserialized from raw bytes # raw_signed_txn_bytes = self.web3.eth.sign_transaction(txn.dict()) - txn_data = txn.dict(exclude={"sender"}) + txn_data = txn.model_dump(mode="json", by_alias=True)(exclude={"sender"}) unsigned_txn = serializable_unsigned_transaction_from_dict(txn_data) try: raw_signature = self.web3.eth.sign(self.address, hexstr=keccak(unsigned_txn).hex()) diff --git a/ape_frame/providers.py b/ape_frame/providers.py index 25b720a..84840b4 100644 --- a/ape_frame/providers.py +++ b/ape_frame/providers.py @@ -1,7 +1,8 @@ from typing import Any -from ape.api import UpstreamProvider, Web3Provider +from ape.api import UpstreamProvider from ape.exceptions import ProviderError +from ape_ethereum.provider import Web3Provider from eth_utils import to_hex from requests import HTTPError # type: ignore[import] from web3 import HTTPProvider, Web3 diff --git a/setup.py b/setup.py index f870df7..1184aba 100644 --- a/setup.py +++ b/setup.py @@ -11,11 +11,11 @@ ], "lint": [ "black>=23.11.0,<24", # Auto-formatter and linter - "mypy>=1.7.0,<2", # Static type analyzer - "types-requests", # Needed for mypy type shed + "mypy>=1.7.1,<2", # Static type analyzer "types-setuptools", # Needed for mypy type shed - "types-PyYAML", # Needed for mypy type shed "flake8>=6.1.0,<7", # Style linter + "flake8-breakpoint>=1.1.0,<2", # Detect breakpoints left in code + "flake8-print>=5.0.0,<6", # Detect print statements left in code "isort>=5.10.1,<6", # Import sorting linter "mdformat>=0.7.17", # Auto-formatter for markdown "mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown From 7afcae6aca1cc8c1eaa2afc8eb91e81705e33d09 Mon Sep 17 00:00:00 2001 From: NotPeopling2day <32708219+NotPeopling2day@users.noreply.github.com> Date: Tue, 12 Dec 2023 15:20:02 -0600 Subject: [PATCH 3/3] chore: more updates --- .pre-commit-config.yaml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 61b6300..9334155 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 23.11.0 + rev: 23.12.0 hooks: - id: black name: black diff --git a/setup.py b/setup.py index 1184aba..98751b3 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ "hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer ], "lint": [ - "black>=23.11.0,<24", # Auto-formatter and linter + "black>=23.12.0,<24", # Auto-formatter and linter "mypy>=1.7.1,<2", # Static type analyzer "types-setuptools", # Needed for mypy type shed "flake8>=6.1.0,<7", # Style linter