mirror of
https://github.com/FlipsideCrypto/web3.py.git
synced 2026-02-06 10:56:47 +00:00
Updates for the latest eth-testrpc
This commit is contained in:
parent
d5f8ea9f59
commit
f0deb65ff1
11
README.md
11
README.md
@ -10,7 +10,6 @@
|
||||
A python implementation of [web3.js](https://github.com/ethereum/web3.js)
|
||||
|
||||
* Python 2.7, 3.4, 3.5 support
|
||||
* Largely feature-for-feature python implementation of Web3.js
|
||||
|
||||
|
||||
## Installation
|
||||
@ -23,8 +22,14 @@ pip install web3
|
||||
### Testing
|
||||
|
||||
For testing you can use the `TestRPCProvider`. This depends on
|
||||
`eth-testrpc>=0.8.4` which must be installed independently (It is not included
|
||||
as a hard dependency for this package.)
|
||||
`eth-testrpc>=0.9.0` which must be eithe installed independently or with the
|
||||
following installation command.
|
||||
|
||||
```sh
|
||||
pip install web3[TestRPCProvider]
|
||||
```
|
||||
|
||||
Then in your code:
|
||||
|
||||
|
||||
```python
|
||||
|
||||
3
setup.py
3
setup.py
@ -33,6 +33,9 @@ setup(
|
||||
"pysha3>=0.3",
|
||||
"pylru>=1.0.9",
|
||||
],
|
||||
extras_require={
|
||||
'TestRPCProvider': ["eth-testrpc>=0.9.0"],
|
||||
},
|
||||
py_modules=['web3'],
|
||||
license="MIT",
|
||||
zip_safe=False,
|
||||
|
||||
@ -176,15 +176,14 @@ class TestRPCProvider(RPCProvider):
|
||||
if not is_testrpc_available():
|
||||
raise Exception("`TestRPCProvider` requires the `eth-testrpc` package to be installed")
|
||||
from gevent.pywsgi import WSGIServer
|
||||
from testrpc.server import application
|
||||
from testrpc.testrpc import evm_reset
|
||||
from testrpc.server import get_application
|
||||
|
||||
try:
|
||||
logger = kwargs.pop('logger')
|
||||
except KeyError:
|
||||
logger = logging.getLogger('testrpc')
|
||||
|
||||
evm_reset()
|
||||
application = get_application()
|
||||
|
||||
self.server = WSGIServer(
|
||||
(host, port),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user