ethereum / eth-abi

Ethereum ABI utilities for python
MIT License
248 stars 269 forks source link

Dependency errors for newer versions of uth-utils>=2.0.0 and eth-abi>=3.0.0 #202

Closed artemd24 closed 1 year ago

artemd24 commented 1 year ago

If this is a bug report, please fill in the following sections. If this is a feature request, delete and describe what you would like with examples.

What was wrong?

Dependencies problems when I want to use eth-abi>=3.0.1

Code that produced the error

from eth_abi import decode_abi, decode_single 

Full error output

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
eth-event 1.2.3 requires eth-abi<3.0.0,>=2.0.0, but you have eth-abi 3.0.1 which is incompatible.
eth-event 1.2.3 requires eth-utils<2.0.0,>=1.2.0, but you have eth-utils 2.1.0 which is incompatible. 

Anyway in comments in abi.py in eth-abi library you can see that this functions were deprecated

decode_abi = default_codec.decode_abi  # deprecated
decode_single = default_codec.decode_single  # deprecated

How can it be fixed?

It could be easily fixed by changing decode_abi and decode_single to function decode, I already did it and all tests were finished successfully.