ethereum / py-geth

Python wrapping for running Go-Ethereum as a subprocess
MIT License
100 stars 218 forks source link

Typed py geth #216

Closed pacrob closed 4 months ago

pacrob commented 5 months ago

What was wrong?

py-geth had no typing.

Closes #116

How was it fixed?

Added typing

Notable updates:

See release notes for full detail.

Thanks, @DavidRomanovizc for your assistance in the initial test PR #161

Todo:

Cute Animal Picture

image

kclowes commented 5 months ago

It looks like the README needs to be updated as well since LiveGethProcess doesn't exist any more

kclowes commented 5 months ago

This may be an existing bug, or just something weird in my env, but running through the README examples, when I ask the DevGethProcess for accounts, I get a double of the same address:

>>> from geth import DevGethProcess
>>> g = DevGethProcess()
>>> g.accounts
('0xa95c66bff0c92edecb365c23d86f687026b48d79',
 '0xa95c66bff0c92edecb365c23d86f687026b48d79')
pacrob commented 4 months ago

It looks like the README needs to be updated as well since LiveGethProcess doesn't exist any more

I'm not seeing any reference to LiveGethProcess anywhere except changelog and newsfragments. Where are you seeing it?

pacrob commented 4 months ago

This may be an existing bug, or just something weird in my env, but running through the README examples, when I ask the DevGethProcess for accounts, I get a double of the same address:

>>> from geth import DevGethProcess
>>> g = DevGethProcess()
>>> g.accounts
('0xa95c66bff0c92edecb365c23d86f687026b48d79',
 '0xa95c66bff0c92edecb365c23d86f687026b48d79')

That is pre-existing - I get the same with the current release 4.4.0 Not sure why, but maybe related to the 2 instances of password on ln 157 of accounts.py?

Opened issue #218 to look at separately.

pacrob commented 4 months ago

Nice work! I believe we use py-geth to generate our fixtures in web3. Did you check that to make sure any ripple effects are handled? Otherwise, I left some small inline comments

Test pr here: https://github.com/ethereum/web3.py/pull/3417

Passes all web3 tests with current typed-py-geth branch as dep.