Skip to content

Commit

Permalink
Add deprecation warning to jsonrpc endpoints dropped in EIP 1474
Browse files Browse the repository at this point in the history
  • Loading branch information
njgheorghita committed Mar 11, 2019
1 parent 7a3d44d commit 9bf7b39
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web3/eth.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

from eth_account import (
Account,
)
Expand Down Expand Up @@ -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):
Expand Down
7 changes: 7 additions & 0 deletions web3/net.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import warnings

from web3.module import (
Module,
)
Expand All @@ -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
Expand Down

0 comments on commit 9bf7b39

Please sign in to comment.