fixed faulty dict access syntax which causes an attribute error #1040
Conversation
doctest failure is unrelated and was fixed in #1038 |
38b0303
into
ethereum:master
40 of 41 checks passed
40 of 41 checks passed
@@ -1416,7 +1416,7 @@ def parse_block_identifier(web3, block_identifier): | |||
elif block_identifier in ['latest', 'earliest', 'pending']: | |||
return block_identifier | |||
elif isinstance(block_identifier, bytes) or is_hex_encoded_block_hash(block_identifier): | |||
return web3.eth.getBlock(block_identifier).number |
carver
Sep 3, 2018
Collaborator
FWIW, replacing all the middlewares as the user did in #1039 is almost definitely not what they wanted to do. There will be a lot of things that work incorrectly, like: fields won't be converted to and from python native types. I'm not suggesting that we should encourage attribute syntax, but this is only one of many things that will work in unexpected ways if the user drops all the middleware.
FWIW, replacing all the middlewares as the user did in #1039 is almost definitely not what they wanted to do. There will be a lot of things that work incorrectly, like: fields won't be converted to and from python native types. I'm not suggesting that we should encourage attribute syntax, but this is only one of many things that will work in unexpected ways if the user drops all the middleware.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
What was wrong?
Related to Issue #1039
How was it fixed?
By fixing the syntax (as detailed in issue #1039).
I could not think of any other possible implications.
Cute Animal Picture