From 3cbed6b304e5613994c9a0439ea2df3bd049b799 Mon Sep 17 00:00:00 2001 From: antazoey Date: Fri, 31 May 2024 14:09:01 -0500 Subject: [PATCH] feat!: Ape 0.8 target (#28) Co-authored-by: Dalena --- .github/workflows/test.yaml | 2 +- README.md | 2 +- ape_polygon/__init__.py | 4 ++-- pyproject.toml | 2 +- setup.py | 5 ++--- tests/test_integration.py | 14 +++++++------- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 11c14c5..5604236 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -61,7 +61,7 @@ jobs: # TODO: Replace with macos-latest when works again. # https://github.com/actions/setup-python/issues/808 os: [ubuntu-latest, macos-12] # eventually add `windows-latest` - python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] + python-version: [3.9, "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index 6223ea4..ae6d3dd 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Ecosystem Plugin for Polygon support in Ape. ## Dependencies -- [python3](https://www.python.org/downloads) version 3.8 up to 3.12. +- [python3](https://www.python.org/downloads) version 3.9 up to 3.12. ## Installation diff --git a/ape_polygon/__init__.py b/ape_polygon/__init__.py index b010db5..10ca4d7 100644 --- a/ape_polygon/__init__.py +++ b/ape_polygon/__init__.py @@ -1,6 +1,6 @@ from ape import plugins from ape.api.networks import LOCAL_NETWORK_NAME, ForkedNetworkAPI, NetworkAPI, create_network_type -from ape_geth import GethProvider +from ape_node import Node from ape_test import LocalProvider from .ecosystem import NETWORKS, Polygon, PolygonConfig @@ -29,6 +29,6 @@ def networks(): @plugins.register(plugins.ProviderPlugin) def providers(): for network_name in NETWORKS: - yield "polygon", network_name, GethProvider + yield "polygon", network_name, Node yield "polygon", LOCAL_NETWORK_NAME, LocalProvider diff --git a/pyproject.toml b/pyproject.toml index ae53397..461911b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ write_to = "ape_polygon/version.py" [tool.black] line-length = 100 -target-version = ['py38', 'py39', 'py310', 'py311', 'py312'] +target-version = ['py39', 'py310', 'py311', 'py312'] include = '\.pyi?$' [tool.pytest.ini_options] diff --git a/setup.py b/setup.py index f518707..f218980 100644 --- a/setup.py +++ b/setup.py @@ -60,10 +60,10 @@ url="https://github.com/ApeWorX/ape-polygon", include_package_data=True, install_requires=[ - "eth-ape>=0.7.6,<0.8", + "eth-ape>=0.8.1,<0.9", "ethpm-types", # Use same version as eth-ape ], - python_requires=">=3.8,<4", + python_requires=">=3.9,<4", extras_require=extras_require, py_modules=["ape_polygon"], license="Apache-2.0", @@ -79,7 +79,6 @@ "Operating System :: MacOS", "Operating System :: POSIX", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/tests/test_integration.py b/tests/test_integration.py index b8bf481..b54773d 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -5,13 +5,13 @@ EXPECTED_OUTPUT = """ polygon ├── amoy -│ └── geth (default) +│ └── node (default) ├── local (default) │ └── test (default) ├── mainnet -│ └── geth (default) +│ └── node (default) └── mumbai - └── geth (default) + └── node (default) """.strip() @@ -48,9 +48,9 @@ def assert_rich_text(actual: str, expected: str): def test_networks(runner, cli, polygon): # Do this in case local env changed it. - polygon.mainnet.set_default_provider("geth") - polygon.mumbai.set_default_provider("geth") - polygon.amoy.set_default_provider("geth") + polygon.mainnet.set_default_provider("node") + polygon.mumbai.set_default_provider("node") + polygon.amoy.set_default_provider("node") - result = runner.invoke(cli, ["networks", "list"]) + result = runner.invoke(cli, ("networks", "list")) assert_rich_text(result.output, EXPECTED_OUTPUT)