ethereum / eth-typing

Python types for type hinting commonly used ethereum types
MIT License
31 stars 35 forks source link

Warn about deprecated EthPM types #67

Closed reedsa closed 5 months ago

reedsa commented 6 months ago

What was wrong?

Removal of EthPM in web3.py v7 means the types are no longer needed (as part of the EthPM module).

Related to https://github.com/ethereum/web3.py/pull/3261

How was it fixed?

Tried issuing a warning on the types but because they are NewType declarations and not a class, the deprecated decorator (or a custom one) cant be used. Using a decorator or just warning in the module itself causes the warning to show up for every import from eth_typing.

Ended up just adding a deprecation notice in the the EthPM section of the docs and to the web3 migration guide (https://github.com/ethereum/web3.py/pull/3413).

Todo:

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

reedsa commented 6 months ago

Not finding a convenient way to make this warn when those types are imported specifically. Should the deprecation belong in the web3 v7 migration guide? @kclowes @fselmo @pacrob

pacrob commented 6 months ago

Should the deprecation belong in the web3 v7 migration guide?

Yeah, can be mentioned along with the removal of the EthPM module there.

I don't have any better ideas for getting the deprecation to show up though. Is your _DeprecatedType not working as planned?