openzim / python-scraperlib

Collection of Python code to re-use across Python-based scrapers
GNU General Public License v3.0
18 stars 16 forks source link

PEP585: remove use of deprecated imports from `typing` #106

Open benoit74 opened 12 months ago

benoit74 commented 12 months ago

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).