Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all used datastructures from utils module #1038

Merged
merged 2 commits into from
Sep 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ Fetch various data about the current state of the ERC20 contract.
>>> erc20.functions.decimals().call()
0
>>> erc20.functions.totalSupply().call()
2038
2039

Get the balance of an account address.

Expand Down
6 changes: 3 additions & 3 deletions tests/core/middleware/test_stalecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
patch,
)

from web3.datastructures import (
AttributeDict,
)
from web3.middleware import (
make_stalecheck_middleware,
)
from web3.middleware.stalecheck import (
StaleBlockchain,
_isfresh,
)
from web3.utils.datastructures import (
AttributeDict,
)


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/core/utilities/test_attributedict.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from web3.utils.datastructures import (
from web3.datastructures import (
AttributeDict,
)

Expand Down
1 change: 0 additions & 1 deletion web3/utils/datastructures.py → web3/datastructures.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from collections import (
Hashable,
Mapping,
Expand Down
6 changes: 3 additions & 3 deletions web3/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
is_list_like,
)

from web3.datastructures import (
NamedElementOnion,
)
from web3.exceptions import (
CannotHandleRequest,
UnhandledRequest,
Expand All @@ -22,9 +25,6 @@
from web3.providers import (
AutoProvider,
)
from web3.utils.datastructures import (
NamedElementOnion,
)
from web3.utils.empty import (
empty,
)
Expand Down
2 changes: 1 addition & 1 deletion web3/middleware/attrdict.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
is_dict,
)

from web3.utils.datastructures import (
from web3.datastructures import (
AttributeDict,
)
from web3.utils.toolz import (
Expand Down
6 changes: 3 additions & 3 deletions web3/providers/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
to_dict,
)

from web3.datastructures import (
NamedElementOnion,
)
from web3.middleware import (
http_retry_request_middleware,
)
from web3.utils.datastructures import (
NamedElementOnion,
)
from web3.utils.http import (
construct_user_agent,
)
Expand Down
6 changes: 3 additions & 3 deletions web3/utils/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
to_tuple,
)

from web3.datastructures import (
AttributeDict,
)
from web3.exceptions import (
MismatchedABI,
)
from web3.utils.datastructures import (
AttributeDict,
)
from web3.utils.encoding import (
hexstr_if_str,
to_bytes,
Expand Down