From 9bf7b39d296d96553502acd58162dc8e15339923 Mon Sep 17 00:00:00 2001 From: Nick Gheorghita Date: Mon, 11 Mar 2019 15:34:54 +0100 Subject: [PATCH] Add deprecation warning to jsonrpc endpoints dropped in EIP 1474 --- web3/eth.py | 7 +++++++ web3/net.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/web3/eth.py b/web3/eth.py index 195fdd056b..aaeaca268b 100644 --- a/web3/eth.py +++ b/web3/eth.py @@ -1,3 +1,5 @@ +import warnings + from eth_account import ( Account, ) @@ -375,6 +377,11 @@ def setContractFactory(self, contractFactory): self.defaultContractFactory = contractFactory def getCompilers(self): + warnings.warn( + "web3.eth.getCompilers() to be deprecated in v5 as it's no longer included in " + "the standard set of JSON-RPC endpoints: " + "https://github.com/ethereum/EIPs/pull/1474/files." + ) return self.web3.manager.request_blocking("eth_getCompilers", []) def getWork(self): diff --git a/web3/net.py b/web3/net.py index dddca64179..e9be18e059 100644 --- a/web3/net.py +++ b/web3/net.py @@ -1,3 +1,5 @@ +import warnings + from web3.module import ( Module, ) @@ -14,6 +16,11 @@ def peerCount(self): @property def chainId(self): + warnings.warn( + "web3.eth.getCompilers() to be deprecated in v5 as it's no longer included in " + "the standard set of JSON-RPC endpoints: " + "https://github.com/ethereum/EIPs/pull/1474/files." + ) return None @property