dmlc / dgl

Python package built to ease deep learning on graph, on top of existing DL frameworks.
http://dgl.ai
Apache License 2.0
13.41k stars 3k forks source link

[Misc] Aliases in `typing` are deprecated since py 3.9 #7400

Open Skeleton003 opened 4 months ago

Skeleton003 commented 4 months ago

🔨Work Item

IMPORTANT:

Project tracker: https://github.com/orgs/dmlc/projects/2

Description

According to https://docs.python.org/3/library/typing.html#deprecated-aliases , most of the aliases in typing are deprecated since python version 3.9. It is better to replace them with their alternatives. However, given that many users are still using python<=3.8, maybe now is not the right time for a radical change. This issue is created to track this requirement.

Depending work items or issues

Skeleton003 commented 4 months ago

According to https://www.dgl.ai/pages/start.html, current (2024/05/11) supported Python versions are 3.8, 3.9, 3.10, 3.11, 3.12. If one day python3.8 is no longer supported, we need to remove all imports of typing and replace them with their alternatives.