PEP585 introduced support for the generics syntax in all standard collections currently available in the typing module. At the same time, it deprecated the use of typing for all these types.
While only supported from 3.9, it can work also from 3.7 with an import of annotations from __future__
The deprecated functionality may eventually be removed from the typing module. Removal will occur no sooner than Python 3.9’s end of life, scheduled for October 2025.
We still have time to migrate, but this needs to be done (and the current situation must not made worse at every change).
PEP585 introduced support for the generics syntax in all standard collections currently available in the
typing
module. At the same time, it deprecated the use oftyping
for all these types.While only supported from 3.9, it can work also from 3.7 with an import of
annotations
from__future__
We still have time to migrate, but this needs to be done (and the current situation must not made worse at every change).