You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of Python 3.9 version, it enables support for the generics syntax in all standard collections currently available in the typing module.
Types like typing.Callable is a deprecated alias for collections.abc.Callable and we need to migrate to start using standard collections for type hinting generics.
leandrodamascena
changed the title
Tech debt: Replace typing.Callable with collections.abc.Callable
Tech debt: Migrate generic type hinting to collections module
Apr 15, 2025
Why is this needed?
As of Python 3.9 version, it enables support for the generics syntax in all standard collections currently available in the typing module.
Types like
typing.Callable
is a deprecated alias forcollections.abc.Callable
and we need to migrate to start using standard collections for type hinting generics.See PEP: https://peps.python.org/pep-0585/
Ruff will start checking this soon: astral-sh/ruff#17224
Which area does this relate to?
Other
Suggestion
I will create sub-issues to migrate utilities and will not create a big PR.
Acknowledgment
The text was updated successfully, but these errors were encountered: