diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ba4bafd..e15dfcf4 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 @@ -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-setuptools, pydantic] diff --git a/setup.py b/setup.py index 2d28d03a..2cb79ec1 100644 --- a/setup.py +++ b/setup.py @@ -5,13 +5,13 @@ extras_require = { "test": [ # `test` GitHub Action jobs uses this "pytest>=6.0", # Core testing package - "pytest-xdist", # multi-process runner + "pytest-xdist", # Multi-process runner "pytest-cov", # Coverage analyzer plugin "hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer ], "lint": [ - "black>=23.11.0,<24", # Auto-formatter and linter - "mypy>=1.7.0,<2", # Static type analyzer + "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 "isort>=5.10.1,<6", # Import sorting linter @@ -69,7 +69,7 @@ install_requires=[ "click", # Use same version as eth-ape "eth-ape>=0.7.0,<1.0", - "ethpm_types", # Use same version as eth-ape + "eth-pydantic-types", # Use same version as eth-ape "pydantic_settings", # Use same version as eth-ape "taskiq[metrics]>=0.6.0,<0.7.0", ], diff --git a/silverback/middlewares.py b/silverback/middlewares.py index 2f6989fe..770dca2e 100644 --- a/silverback/middlewares.py +++ b/silverback/middlewares.py @@ -3,7 +3,7 @@ from ape.logging import logger from ape.types import ContractLog from ape.utils import ManagerAccessMixin -from ethpm_types import HexBytes +from eth_pydantic_types import HexBytes from taskiq import TaskiqMessage, TaskiqMiddleware, TaskiqResult from silverback.persistence import HandlerResult @@ -83,7 +83,7 @@ def pre_execute(self, message: TaskiqMessage) -> TaskiqMessage: elif "event" in message.task_name: # NOTE: Just in case the user doesn't specify type as `ContractLog` - message.args[0] = ContractLog.parse_obj(message.args[0]) + message.args[0] = ContractLog.model_validate(message.args[0]) logger.info(f"{self._create_label(message)} - Started") return message