Skip to content

Commit

Permalink
Merge pull request #339 from dbfreem/develop
Browse files Browse the repository at this point in the history
web3 upgrade
  • Loading branch information
medvedev1088 authored May 6, 2022
2 parents d085d5a + 50925fc commit 53c1b59
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 15 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ language: python
dist: xenial
matrix:
include:
- python: "3.6"
env: TOX_POSARGS="-e py36"
- python: "3.7"
- python: "3.7.2"
env: TOX_POSARGS="-e py37"
- python: "3.8"
env: TOX_POSARGS="-e py38"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.6
FROM python:3.7
MAINTAINER Evgeny Medvedev <[email protected]>
ENV PROJECT_DIR=ethereum-etl

Expand Down
2 changes: 1 addition & 1 deletion ethereumetl/executors/batch_work_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import time

from requests.exceptions import Timeout as RequestsTimeout, HTTPError, TooManyRedirects
from web3.utils.threads import Timeout as Web3Timeout
from web3._utils.threads import Timeout as Web3Timeout

from ethereumetl.executors.bounded_executor import BoundedExecutor
from ethereumetl.executors.fail_safe_executor import FailSafeExecutor
Expand Down
2 changes: 1 addition & 1 deletion ethereumetl/providers/ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import socket

from web3.providers.ipc import IPCProvider
from web3.utils.threads import (
from web3._utils.threads import (
Timeout,
)

Expand Down
2 changes: 1 addition & 1 deletion ethereumetl/providers/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


from web3 import HTTPProvider
from web3.utils.request import make_post_request
from web3._utils.request import make_post_request


# Mostly copied from web3.py/providers/rpc.py. Supports batch requests.
Expand Down
2 changes: 1 addition & 1 deletion ethereumetl/web3_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@

def build_web3(provider):
w3 = Web3(provider)
w3.middleware_stack.inject(geth_poa_middleware, layer=0)
w3.middleware_onion.inject(geth_poa_middleware, layer=0)
return w3
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,16 @@ def read(fname):
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9'
],
keywords='ethereum',
python_requires='>=3.6,<4',
python_requires='>=3.7.2,<4',
install_requires=[
'web3==4.7.2',
'eth-utils==1.10.0',
'eth-abi==1.3.0',
'web3>=5.29,<6',
'eth-utils==1.10',
'eth-abi==2.1.1',
# TODO: This has to be removed when "ModuleNotFoundError: No module named 'eth_utils.toolz'" is fixed at eth-abi
'python-dateutil>=2.8.0,<3',
'click==8.0.4',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1234"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1234"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1234"
}
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist=
py{36,37,38,39}
py{37,38,39}

[testenv]
usedevelop=True
Expand All @@ -11,7 +11,6 @@ commands=
deps=
.[dev,streaming]
basepython=
py36: python3.6
py37: python3.7
py38: python3.8
py39: python3.9

0 comments on commit 53c1b59

Please sign in to comment.