Skip to content

Commit 53c1b59

Browse files
authored
Merge pull request #339 from dbfreem/develop
web3 upgrade
2 parents d085d5a + 50925fc commit 53c1b59

11 files changed

Lines changed: 26 additions & 15 deletions

File tree

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ language: python
22
dist: xenial
33
matrix:
44
include:
5-
- python: "3.6"
6-
env: TOX_POSARGS="-e py36"
7-
- python: "3.7"
5+
- python: "3.7.2"
86
env: TOX_POSARGS="-e py37"
97
- python: "3.8"
108
env: TOX_POSARGS="-e py38"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.6
1+
FROM python:3.7
22
MAINTAINER Evgeny Medvedev <evge.medvedev@gmail.com>
33
ENV PROJECT_DIR=ethereum-etl
44

ethereumetl/executors/batch_work_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import time
2525

2626
from requests.exceptions import Timeout as RequestsTimeout, HTTPError, TooManyRedirects
27-
from web3.utils.threads import Timeout as Web3Timeout
27+
from web3._utils.threads import Timeout as Web3Timeout
2828

2929
from ethereumetl.executors.bounded_executor import BoundedExecutor
3030
from ethereumetl.executors.fail_safe_executor import FailSafeExecutor

ethereumetl/providers/ipc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import socket
2626

2727
from web3.providers.ipc import IPCProvider
28-
from web3.utils.threads import (
28+
from web3._utils.threads import (
2929
Timeout,
3030
)
3131

ethereumetl/providers/rpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
from web3 import HTTPProvider
25-
from web3.utils.request import make_post_request
25+
from web3._utils.request import make_post_request
2626

2727

2828
# Mostly copied from web3.py/providers/rpc.py. Supports batch requests.

ethereumetl/web3_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626

2727
def build_web3(provider):
2828
w3 = Web3(provider)
29-
w3.middleware_stack.inject(geth_poa_middleware, layer=0)
29+
w3.middleware_onion.inject(geth_poa_middleware, layer=0)
3030
return w3

setup.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,16 @@ def read(fname):
2424
'Intended Audience :: Developers',
2525
'License :: OSI Approved :: MIT License',
2626
'Programming Language :: Python :: 3',
27-
'Programming Language :: Python :: 3.6',
2827
'Programming Language :: Python :: 3.7',
2928
'Programming Language :: Python :: 3.8',
3029
'Programming Language :: Python :: 3.9'
3130
],
3231
keywords='ethereum',
33-
python_requires='>=3.6,<4',
32+
python_requires='>=3.7.2,<4',
3433
install_requires=[
35-
'web3==4.7.2',
36-
'eth-utils==1.10.0',
37-
'eth-abi==1.3.0',
34+
'web3>=5.29,<6',
35+
'eth-utils==1.10',
36+
'eth-abi==2.1.1',
3837
# TODO: This has to be removed when "ModuleNotFoundError: No module named 'eth_utils.toolz'" is fixed at eth-abi
3938
'python-dateutil>=2.8.0,<3',
4039
'click==8.0.4',
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"jsonrpc": "2.0",
3+
"id": 1,
4+
"result": "0x1234"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"jsonrpc": "2.0",
3+
"id": 1,
4+
"result": "0x1234"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"jsonrpc": "2.0",
3+
"id": 1,
4+
"result": "0x1234"
5+
}

0 commit comments

Comments
 (0)