Repository: ethereum/web3.py

Issue:
Drop repeated rpc endpoints
* Version: 4.6

### What was wrong?

web3.py has a few repeated endpoints, for example: `web3.version.net` and `web3.net.version`


### How can it be fixed?
Deprecate the endpoint api's that don't mirror the json-rpc spec namespacing, in favor of those that do.


Discussion:

Resolving patch:
diff --git a/web3/miner.py b/web3/miner.py
--- a/web3/miner.py
+++ b/web3/miner.py
@@ -4,10 +4,6 @@
 
 
 class Miner(Module):
-    @property
-    def hashrate(self):
-        return self.web3.manager.request_blocking("eth_hashrate", [])
-
     def makeDAG(self, number):
         return self.web3.manager.request_blocking("miner_makeDag", [number])
 
diff --git a/web3/version.py b/web3/version.py
--- a/web3/version.py
+++ b/web3/version.py
@@ -13,10 +13,6 @@ def api(self):
     def node(self):
         return self.web3.manager.request_blocking("web3_clientVersion", [])
 
-    @property
-    def network(self):
-        return self.web3.manager.request_blocking("net_version", [])
-
     @property
     def ethereum(self):
         return self.web3.manager.request_blocking("eth_protocolVersion", [])


Test patch:
diff --git a/tests/core/mining-module/conftest.py b/tests/core/mining-module/conftest.py
--- a/tests/core/mining-module/conftest.py
+++ b/tests/core/mining-module/conftest.py
@@ -11,4 +11,3 @@ def always_wait_for_mining_start(web3,
 
     assert web3.eth.mining
     assert web3.eth.hashrate
-    assert web3.miner.hashrate
diff --git a/tests/core/mining-module/test_miner_hashrate.py b/tests/core/mining-module/test_miner_hashrate.py
--- a/tests/core/mining-module/test_miner_hashrate.py
+++ b/tests/core/mining-module/test_miner_hashrate.py
@@ -7,5 +7,5 @@
 def test_miner_hashrate(web3_empty, wait_for_miner_start):
     web3 = web3_empty
 
-    hashrate = web3.miner.hashrate
+    hashrate = web3.eth.hashrate
     assert hashrate > 0
diff --git a/tests/core/mining-module/test_miner_start.py b/tests/core/mining-module/test_miner_start.py
--- a/tests/core/mining-module/test_miner_start.py
+++ b/tests/core/mining-module/test_miner_start.py
@@ -15,7 +15,7 @@ def test_miner_start(web3_empty, wait_for_miner_start):
 
     # sanity
     assert web3.eth.mining
-    assert web3.miner.hashrate
+    assert web3.eth.hashrate
 
     web3.miner.stop()
 
@@ -24,11 +24,11 @@ def test_miner_start(web3_empty, wait_for_miner_start):
             timeout.sleep(random.random())
 
     assert not web3.eth.mining
-    assert not web3.miner.hashrate
+    assert not web3.eth.hashrate
 
     web3.miner.start(1)
 
     wait_for_miner_start(web3)
 
     assert web3.eth.mining
-    assert web3.miner.hashrate
+    assert web3.eth.hashrate
diff --git a/tests/core/mining-module/test_miner_stop.py b/tests/core/mining-module/test_miner_stop.py
--- a/tests/core/mining-module/test_miner_stop.py
+++ b/tests/core/mining-module/test_miner_stop.py
@@ -14,7 +14,7 @@ def test_miner_stop(web3_empty):
     web3 = web3_empty
 
     assert web3.eth.mining
-    assert web3.miner.hashrate
+    assert web3.eth.hashrate
 
     web3.miner.stop()
 
@@ -24,4 +24,4 @@ def test_miner_stop(web3_empty):
             timeout.check()
 
     assert not web3.eth.mining
-    assert not web3.miner.hashrate
+    assert not web3.eth.hashrate
diff --git a/tests/core/txpool-module/conftest.py b/tests/core/txpool-module/conftest.py
--- a/tests/core/txpool-module/conftest.py
+++ b/tests/core/txpool-module/conftest.py
@@ -11,4 +11,3 @@ def skip_testrpc_and_wait_for_mining_start(web3,
 
     assert web3.eth.mining
     assert web3.eth.hashrate
-    assert web3.miner.hashrate
diff --git a/tests/core/txpool-module/test_txpool_content.py b/tests/core/txpool-module/test_txpool_content.py
--- a/tests/core/txpool-module/test_txpool_content.py
+++ b/tests/core/txpool-module/test_txpool_content.py
@@ -11,7 +11,7 @@ def test_txpool_content(web3_empty):
     web3.miner.stop()
 
     with Timeout(60) as timeout:
-        while web3.miner.hashrate or web3.eth.mining:
+        while web3.eth.hashrate or web3.eth.mining:
             timeout.sleep(random.random())
 
     txn_1_hash = web3.eth.sendTransaction({
diff --git a/tests/core/txpool-module/test_txpool_inspect.py b/tests/core/txpool-module/test_txpool_inspect.py
--- a/tests/core/txpool-module/test_txpool_inspect.py
+++ b/tests/core/txpool-module/test_txpool_inspect.py
@@ -11,7 +11,7 @@ def test_txpool_inspect(web3_empty):
     web3.miner.stop()
 
     with Timeout(60) as timeout:
-        while web3.miner.hashrate or web3.eth.mining:
+        while web3.eth.hashrate or web3.eth.mining:
             timeout.sleep(random.random())
 
     txn_1_hash = web3.eth.sendTransaction({
diff --git a/web3/_utils/module_testing/version_module.py b/web3/_utils/module_testing/version_module.py
--- a/web3/_utils/module_testing/version_module.py
+++ b/web3/_utils/module_testing/version_module.py
@@ -4,12 +4,6 @@
 
 
 class VersionModuleTest:
-    def test_net_version(self, web3):
-        version = web3.version.network
-
-        assert is_string(version)
-        assert version.isdigit()
-
     def test_eth_protocolVersion(self, web3):
         protocol_version = web3.version.ethereum