From 845bce4921411ecec93713cbf7b29fb82c03182c Mon Sep 17 00:00:00 2001 From: kclowes Date: Fri, 9 Sep 2022 10:25:24 -0600 Subject: [PATCH] Remove references to deprecated Kovan testnet (#2635) * Remove references to the deprecated Kovan testnet * Add newsfragment --- docs/ethpm.rst | 1 - docs/node.rst | 4 ++-- ethpm/constants.py | 1 - ethpm/validation/uri.py | 2 +- newsfragments/2635.breaking-change.rst | 1 + tests/ethpm/_utils/test_chain_utils.py | 1 - web3/auto/infura/endpoints.py | 1 - web3/auto/infura/kovan.py | 15 --------------- 8 files changed, 4 insertions(+), 22 deletions(-) create mode 100644 newsfragments/2635.breaking-change.rst delete mode 100644 web3/auto/infura/kovan.py diff --git a/docs/ethpm.rst b/docs/ethpm.rst index 1c1db395c9..8004986e7b 100644 --- a/docs/ethpm.rst +++ b/docs/ethpm.rst @@ -237,7 +237,6 @@ way through the EIP process) - 3: Ropsten - 4: Rinkeby - 5: Goerli - - 42: Kovan - ``package-name``: Must conform to the package-name as specified in the diff --git a/docs/node.rst b/docs/node.rst index 11b623c90d..55438d77d8 100644 --- a/docs/node.rst +++ b/docs/node.rst @@ -99,8 +99,8 @@ However, spam and mining attacks have happened, which is disruptive when you want to test out a contract. There are some alternative networks that limit the damage of spam attacks, but -they are not standardized across node software. Geth runs their own (Rinkeby), -and Parity runs their own (Kovan). See a full comparison in this `Stackexchange Q&A +they are not standardized across node software. Geth runs their own (Rinkeby). +See a full comparison in this `Stackexchange Q&A `_. So roughly, choose this way: diff --git a/ethpm/constants.py b/ethpm/constants.py index 2ca5ca09db..c895c4a591 100644 --- a/ethpm/constants.py +++ b/ethpm/constants.py @@ -15,5 +15,4 @@ 3: "ropsten", 4: "rinkeby", 5: "goerli", - 42: "kovan", } diff --git a/ethpm/validation/uri.py b/ethpm/validation/uri.py index 3ae7fd6f3e..f162e81d1c 100644 --- a/ethpm/validation/uri.py +++ b/ethpm/validation/uri.py @@ -103,7 +103,7 @@ def validate_registry_uri_authority(auth: str) -> None: if not is_supported_chain_id(to_int(text=chain_id)): raise EthPMValidationError( f"Chain ID: {chain_id} is not supported. Supported chain ids include: " - "1 (mainnet), 3 (ropsten), 4 (rinkeby), 5 (goerli) and 42 (kovan). " + "1 (mainnet), 3 (ropsten), 4 (rinkeby), and 5 (goerli)" "Please try again with a valid registry URI." ) diff --git a/newsfragments/2635.breaking-change.rst b/newsfragments/2635.breaking-change.rst new file mode 100644 index 0000000000..6002626c54 --- /dev/null +++ b/newsfragments/2635.breaking-change.rst @@ -0,0 +1 @@ +Remove Kovan auto provider diff --git a/tests/ethpm/_utils/test_chain_utils.py b/tests/ethpm/_utils/test_chain_utils.py index 51545b5857..92c2b00e52 100644 --- a/tests/ethpm/_utils/test_chain_utils.py +++ b/tests/ethpm/_utils/test_chain_utils.py @@ -49,7 +49,6 @@ def test_parse_BIP122_uri(value, expected_resource_type): (3, True), (4, True), (5, True), - (42, True), (2, False), ("1", False), ({}, False), diff --git a/web3/auto/infura/endpoints.py b/web3/auto/infura/endpoints.py index 14af93fb19..55258f9a57 100644 --- a/web3/auto/infura/endpoints.py +++ b/web3/auto/infura/endpoints.py @@ -20,7 +20,6 @@ INFURA_ROPSTEN_DOMAIN = "ropsten.infura.io" INFURA_GOERLI_DOMAIN = "goerli.infura.io" INFURA_RINKEBY_DOMAIN = "rinkeby.infura.io" -INFURA_KOVAN_DOMAIN = "kovan.infura.io" WEBSOCKET_SCHEME = "wss" HTTP_SCHEME = "https" diff --git a/web3/auto/infura/kovan.py b/web3/auto/infura/kovan.py deleted file mode 100644 index e9b12005f4..0000000000 --- a/web3/auto/infura/kovan.py +++ /dev/null @@ -1,15 +0,0 @@ -from web3 import Web3 -from web3.providers.auto import ( - load_provider_from_uri, -) - -from .endpoints import ( - INFURA_KOVAN_DOMAIN, - build_http_headers, - build_infura_url, -) - -_headers = build_http_headers() -_infura_url = build_infura_url(INFURA_KOVAN_DOMAIN) - -w3 = Web3(load_provider_from_uri(_infura_url, _headers))