Skip to content

Commit 3d14361

Browse files
authored
Merge pull request #1033 from dylanjw/_utils
Move web3.utils to web3._utils
2 parents a8a5032 + 7b13fd5 commit 3d14361

File tree

129 files changed

+374
-330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+374
-330
lines changed

conftest.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
import time
33
import warnings
44

5+
from web3._utils.threads import (
6+
Timeout,
7+
)
8+
from web3.main import (
9+
Web3,
10+
)
511
from web3.providers.eth_tester import (
612
EthereumTesterProvider,
713
)
8-
from web3.utils.threads import (
9-
Timeout,
10-
)
11-
from web3.main import Web3
1214

1315

1416
class PollDelayCounter:

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
to_bytes,
55
)
66

7-
from web3.utils.toolz import (
7+
from web3._utils.toolz import (
88
identity,
99
)
1010

tests/core/caching-utils/test_generate_cache_key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
strategies as st,
99
)
1010

11-
from web3.utils.caching import (
11+
from web3._utils.caching import (
1212
generate_cache_key,
1313
)
1414

tests/core/contracts/test_args_and_kwargs_merger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from web3.utils.abi import (
3+
from web3._utils.abi import (
44
merge_args_and_kwargs,
55
)
66

tests/core/contracts/test_contract_ambiguous_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
HexBytes,
55
)
66

7-
from web3.utils.toolz import (
7+
from web3._utils.toolz import (
88
compose,
99
curry,
1010
)

tests/core/contracts/test_contract_buildTransaction.py

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

33
import pytest
44

5-
from web3.utils.toolz import (
5+
from web3._utils.toolz import (
66
dissoc,
77
)
88

tests/core/contracts/test_contract_call_interface.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
HexBytes,
1414
)
1515

16+
from web3._utils.ens import (
17+
contract_ens_addresses,
18+
)
19+
from web3._utils.toolz import (
20+
identity,
21+
)
1622
from web3.exceptions import (
1723
BadFunctionCallOutput,
1824
BlockNumberOutofRange,
@@ -21,12 +27,6 @@
2127
NoABIFunctionsFound,
2228
ValidationError,
2329
)
24-
from web3.utils.ens import (
25-
contract_ens_addresses,
26-
)
27-
from web3.utils.toolz import (
28-
identity,
29-
)
3030

3131
# Ignore warning in pyethereum 1.6 - will go away with the upgrade
3232
pytestmark = pytest.mark.filterwarnings("ignore:implicit cast from 'char *'")

tests/core/contracts/test_contract_init.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import pytest
22

3+
from web3._utils.ens import (
4+
contract_ens_addresses,
5+
ens_addresses,
6+
)
37
from web3.exceptions import (
48
BadFunctionCallOutput,
59
NameNotFound,
610
)
7-
from web3.utils.ens import (
8-
contract_ens_addresses,
9-
ens_addresses,
10-
)
1111

1212

1313
@pytest.fixture()

tests/core/contracts/test_contract_method_to_argument_matching.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import json
22
import pytest
33

4-
from web3.exceptions import (
5-
ValidationError,
6-
)
7-
from web3.utils.abi import (
4+
from web3._utils.abi import (
85
get_abi_input_types,
96
)
10-
from web3.utils.function_identifiers import (
7+
from web3._utils.function_identifiers import (
118
FallbackFn,
129
)
10+
from web3.exceptions import (
11+
ValidationError,
12+
)
1313

1414
SINGLE_FN_NO_ARGS = json.loads('[{"constant":false,"inputs":[],"name":"a","outputs":[],"type":"function"}]') # noqa: E501
1515
SINGLE_FN_ONE_ARG = json.loads('[{"constant":false,"inputs":[{"name":"","type":"uint256"}],"name":"a","outputs":[],"type":"function"}]') # noqa: E501

tests/core/contracts/test_contract_transact_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
to_bytes,
77
)
88

9-
from web3.utils.empty import (
9+
from web3._utils.empty import (
1010
empty,
1111
)
1212

0 commit comments

Comments
 (0)