Skip to content

web3.eth.account.sign method missing in web3==4.0.0? #753

@miguelsimon

Description

@miguelsimon
  • Version: web3==4.0.0b11
  • Python: 3.6
  • OS: ubuntu

What was wrong?

I recently reinstalled web3==4.0.0b11 with pip and the web3.eth.account.sign method described in the docs seems to be gone: https://github.com/ethereum/web3.py/blob/master/docs/web3.eth.account.rst#sign-a-message

To reproduce:

bash-4.2# python3 -m venv env
bash-4.2# source env/bin/activate
(env) bash-4.2# pip install --no-cache-dir web3==4.0.0b11
(env) bash-4.2# python 
Python 3.6.3 (default, Apr  7 2018, 16:26:36) 
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from web3.auto import w3
>>> for k in dir(w3.eth.account):
...     print(k)
... 
__class__
__delattr__
__dict__
__dir__
__doc__
__eq__
__format__
__ge__
__getattribute__
__gt__
__hash__
__init__
__init_subclass__
__le__
__lt__
__module__
__ne__
__new__
__reduce__
__reduce_ex__
__repr__
__setattr__
__sizeof__
__str__
__subclasshook__
__weakref__
_keys
create
decrypt
encrypt
privateKeyToAccount
recoverHash
recoverTransaction
setKeyBackend
signHash
signTransaction
>>> 

A set difference of dir(web3.eth.account) between an old web3==4.0.0b11 build and the new one shows that these methods are no longer there: {'sign', 'recover', 'recoverMessage', 'hashMessage'} while these methods are now present: {'recoverHash', 'signHash', 'init_subclass'}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions