Skip to content

Commit 91797ee

Browse files
committed
remove parity namespace and refs
1 parent de95191 commit 91797ee

17 files changed

+16
-444
lines changed

docs/README-freebsd.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
### Prerequisites
66

7-
Make sure you've UTF-8 defined for charset and lang in your [~/.login_conf](https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/using-localization.html),
7+
Make sure you've UTF-8 defined for charset and lang in your [~/.login_conf](https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/using-localization.html),
88
otherwise almost every Python 3 module will fail to install.
99

1010
`~/.login_conf`:
11+
1112
```
1213
me:\
1314
:charset=UTF-8:\
@@ -17,6 +18,7 @@ me:\
1718
Also make sure you've defined valid include and library paths in `~/.pydistutils.cfg`, otherwise native compilations fail.
1819

1920
`~/.pydistutils.cfg`:
21+
2022
```
2123
[build_ext]
2224
include_dirs=/usr/local/include
@@ -48,6 +50,7 @@ pip install -e .\[dev\]
4850
#### Prerequisites for integration tests:
4951

5052
##### geth (https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-FreeBSD)
53+
5154
```
5255
pkg install go
5356
cd /tmp
@@ -56,23 +59,3 @@ cd go-ethereum
5659
make geth
5760
cp build/bin/geth /usr/local/bin/
5861
```
59-
60-
##### parity (https://github.com/paukstis/freebsd_parity/blob/v1.6/README.md)
61-
```
62-
BROKEN (build crashes on FreeBSD 11.2)
63-
```
64-
65-
```
66-
cd web3.py
67-
tox -e py36-core
68-
tox -e py36-ens
69-
tox -e py36-integration
70-
etc
71-
72-
or
73-
74-
py.test tests/core
75-
py.test tests/ens
76-
py.test tests/integration
77-
etc
78-
```

docs/contributing.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,5 @@ version explicitly, like ``make release bump="--new-version 4.0.0-alpha.1 devnum
452452
.. _how to create documentation: https://github.com/ethereum/snake-charmers-tactical-manual/blob/master/documentation.md
453453
.. _working on pull requests: https://help.github.com/articles/about-pull-requests/
454454
.. _py-geth: https://github.com/ethereum/py-geth
455-
.. _Github releases: https://github.com/openethereum/openethereum/releases
456-
.. _Build the binary: https://github.com/openethereum/openethereum/#3-building-
457455
.. _pytest documentation: https://docs.pytest.org/en/latest
458456
.. _pytest documentation on fixtures: https://docs.pytest.org/en/latest/how-to/fixtures.html

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ Table of Contents
6969
web3.net
7070
web3.miner
7171
web3.geth
72-
web3.parity
7372
web3.utils
7473
gas_price
7574
ens

docs/middleware.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Middleware Order
104104
~~~~~~~~~~~~~~~~~~
105105

106106
Think of the middleware as being layered in an onion, where you initiate a web3.py request at
107-
the outermost layer of the onion, and the Ethereum node (like geth or parity) receives and responds
107+
the outermost layer of the onion, and the Ethereum node (like geth) receives and responds
108108
to the request inside the innermost layer of the onion. Here is a (simplified) diagram:
109109

110110
.. code-block:: none

docs/node.rst

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ How do I choose which node to use?
2424
Due to the nature of Ethereum, this is largely a question of personal preference, but
2525
it has significant ramifications on security and usability. Further, node software is
2626
evolving quickly, so please do your own research about the current options.
27-
We won't advocate for any particular node,
28-
but list some popular options and some basic details on each.
2927

3028
One of the key decisions is whether to use a local node or a hosted
3129
node. A quick summary is at :ref:`local_vs_hosted`.
@@ -47,20 +45,16 @@ node manage keys for you (a popular option), you must use a local node.
4745
Note that even if you run a node on your own machine, you are still trusting
4846
the node software with any accounts you create on the node.
4947

50-
The most popular self-run node options are:
51-
52-
- `geth (go-ethereum) <https://ethereum.github.io/go-ethereum/>`_
53-
- `parity <https://www.parity.io/>`_
54-
55-
You can find a fuller list of node software at `ethdocs.org
56-
<http://ethdocs.org/en/latest/ethereum-clients/>`_.
48+
You can find a list of node software at `ethereum.org
49+
<https://ethereum.org/en/developers/docs/nodes-and-clients/>`__.
5750

5851
Some people decide that the time it takes to sync a local node from scratch is too
5952
high, especially if they are just exploring Ethereum for the first time. One way to
6053
work around this issue is to use a hosted node.
6154

62-
The most popular hosted node option is `Infura <infura.io>`_.
63-
You can connect to it as if it were a local node,
55+
Hosted node options can also be found at
56+
`ethereum.org <https://ethereum.org/en/developers/docs/nodes-and-clients/nodes-as-a-service/>`__.
57+
You can connect to a hosted node as if it were a local node,
6458
with a few caveats. It cannot (and *should not*) host private keys for
6559
you, meaning that some common methods like :meth:`w3.eth.send_transaction()
6660
<web3.eth.Eth.send_transaction>` are not directly available. To send transactions
@@ -94,20 +88,10 @@ then you connect to the main Ethereum network.
9488

9589
If you want to test these things without using real ether, though, then you
9690
need to connect to a test network. There are several test networks to
97-
choose from, Rinkeby and Goerli being the longest running.
98-
99-
There are some alternative networks that limit the damage of spam attacks, but
100-
they are not standardized across node software. Geth runs their own (Rinkeby).
101-
See a full comparison in this `Stackexchange Q&A
102-
<https://ethereum.stackexchange.com/a/30072/1461>`_.
103-
104-
So roughly, choose this way:
105-
106-
- If using Parity, connect to Kovan
107-
- If using Geth, connect to Rinkeby
108-
- If using a different node, or testing mining, connect to Ropsten
91+
choose from; view the list on
92+
`ethereum.org <https://ethereum.org/en/developers/docs/networks/#ethereum-testnets>`__.
10993

110-
Each of their networks has their own version of Ether. Main network ether must
94+
Each network has its own version of Ether. Main network ether must
11195
be purchased, naturally, but test network ether is usually available for free.
11296
See :ref:`faucets`
11397

docs/web3.eth.account.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Local vs Hosted Nodes
1010

1111
Local Node
1212
A local node is started and controlled by you. It is as safe as you keep it.
13-
When you run ``geth`` or ``parity`` on your machine, you are running a local node.
13+
When you run ``geth`` on your machine, for example, you are running a local node.
1414

1515
Hosted Node
1616
A hosted node is controlled by someone else. When you connect to Infura, you are

docs/web3.geth.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ GethTxPool API
312312

313313
The ``web3.geth.txpool`` object exposes methods to interact with the RPC APIs under
314314
the ``txpool_`` namespace. These methods are only exposed under the ``geth`` namespace
315-
since they are not standard nor supported in Parity.
315+
since they are not standard.
316316

317317
The following methods are available on the ``web3.geth.txpool`` namespace.
318318

docs/web3.main.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,6 @@ Each ``Web3`` instance also exposes these namespaced API modules.
359359
360360
See :doc:`./web3.geth`
361361

362-
.. py:attribute:: Web3.parity
363-
364-
See :doc:`./web3.parity`
365-
366362

367363
These internal modules inherit from the ``web3.module.Module`` class which give them some configurations internal to the
368364
web3.py library.

docs/web3.parity.rst

Lines changed: 0 additions & 82 deletions
This file was deleted.

newsfragments/2718.breaking.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove Parity module and references.

web3/_utils/method_formatters.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
from web3.exceptions import (
8989
BlockNotFound,
9090
ContractLogicError,
91-
InvalidParityMode,
9291
OffchainLookup,
9392
TransactionNotFound,
9493
)
@@ -642,16 +641,9 @@ def raise_contract_logic_error_on_revert(response: RPCResponse) -> RPCResponse:
642641
return response
643642

644643

645-
def raise_invalid_parity_mode(response: RPCResponse) -> NoReturn:
646-
# eth-tester sends back an invalid RPCError, which makes mypy complain
647-
error_message = response["error"].get("message") # type: ignore
648-
raise InvalidParityMode(error_message)
649-
650-
651644
ERROR_FORMATTERS: Dict[RPCEndpoint, Callable[..., Any]] = {
652645
RPC.eth_estimateGas: raise_contract_logic_error_on_revert,
653646
RPC.eth_call: raise_contract_logic_error_on_revert,
654-
RPC.parity_setMode: raise_invalid_parity_mode,
655647
}
656648

657649

web3/_utils/rpc_abi.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,6 @@ class RPC:
125125
net_peerCount = RPCEndpoint("net_peerCount")
126126
net_version = RPCEndpoint("net_version")
127127

128-
# parity
129-
parity_addReservedPeer = RPCEndpoint("parity_addReservedPeer")
130-
parity_enode = RPCEndpoint("parity_enode")
131-
parity_listStorageKeys = RPCEndpoint("parity_listStorageKeys")
132-
parity_netPeers = RPCEndpoint("parity_netPeers")
133-
parity_mode = RPCEndpoint("parity_mode")
134-
parity_setMode = RPCEndpoint("parity_setMode")
135-
136128
# personal
137129
personal_ecRecover = RPCEndpoint("personal_ecRecover")
138130
personal_importRawKey = RPCEndpoint("personal_importRawKey")
@@ -220,8 +212,6 @@ class RPC:
220212
"personal_sign": [None, "address", None],
221213
"personal_signTypedData": [None, "address", None],
222214
"trace_call": TRACE_PARAMS_ABIS,
223-
# parity
224-
"parity_listStorageKeys": ["address", None, None, None],
225215
}
226216

227217

web3/exceptions.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,6 @@ def __init__(self, payload: Dict[str, Any]) -> None:
259259
super().__init__()
260260

261261

262-
class InvalidParityMode(TypeError, ValueError):
263-
# Inherits from TypeError for backwards compatibility
264-
"""
265-
Raised when web3.parity.set_mode() is called with no or invalid args
266-
"""
267-
pass
268-
269-
270262
class InvalidTransaction(Exception):
271263
"""
272264
Raised when a transaction includes an invalid combination of arguments.

web3/main.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,6 @@
9393
AsyncNet,
9494
Net,
9595
)
96-
from web3.parity import (
97-
Parity,
98-
ParityPersonal,
99-
)
10096
from web3.providers import (
10197
AsyncBaseProvider,
10298
BaseProvider,
@@ -138,12 +134,6 @@ def get_default_modules() -> Dict[str, Union[Type[Module], Sequence[Any]]]:
138134
"eth": Eth,
139135
"net": Net,
140136
"version": Version,
141-
"parity": (
142-
Parity,
143-
{
144-
"personal": ParityPersonal,
145-
},
146-
),
147137
"geth": (
148138
Geth,
149139
{
@@ -231,7 +221,6 @@ def to_checksum_address(value: Union[AnyAddress, str, bytes]) -> ChecksumAddress
231221

232222
# mypy Types
233223
eth: Eth
234-
parity: Parity
235224
geth: Geth
236225
net: Net
237226
async_net: AsyncNet

0 commit comments

Comments
 (0)