Skip to content

Commit 64d16f5

Browse files
committed
upgraded web3,py and eth-abi
removed python 3.6
1 parent 898ce3f commit 64d16f5

File tree

10 files changed

+25
-12
lines changed

10 files changed

+25
-12
lines changed

Dockerfile

+1-1
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 <[email protected]>
33
ENV PROJECT_DIR=ethereum-etl
44

ethereumetl/executors/batch_work_executor.py

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+4-5
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,<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==7.1.2',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"jsonrpc": "2.0",
3+
"id": 1,
4+
"result": "0x1234"
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"jsonrpc": "2.0",
3+
"id": 1,
4+
"result": "0x1234"
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"jsonrpc": "2.0",
3+
"id": 1,
4+
"result": "0x1234"
5+
}

tox.ini

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist=
3-
py{36,37,38,39}
3+
py{37,38,39}
44

55
[testenv]
66
usedevelop=True
@@ -11,7 +11,6 @@ commands=
1111
deps=
1212
.[dev,streaming]
1313
basepython=
14-
py36: python3.6
1514
py37: python3.7
1615
py38: python3.8
1716
py39: python3.9

0 commit comments

Comments
 (0)