pypa / setuptools

Official project repository for the Setuptools build system
https://pypi.org/project/setuptools/
MIT License
2.34k stars 1.14k forks source link

Re-evaluate if `typing_extensions` is still needed as a vendored dependency for `pkg_resources` #4324

Closed abravalheri closed 1 week ago

abravalheri commented 3 weeks ago

This (typing_extensions) was not listed. The vendored.txt file says the following:

# required for platformdirs on Python < 3.8
typing_extensions==4.4.0

But now we removed support to Python < 3.8, so I guess we can remove this vendored dependency?

_Originally posted by @abravalheri in https://github.com/pypa/setuptools/pull/4320#discussion_r1574742424_

Avasam commented 3 weeks ago

I'd be surprised if we can't just hide whatever usage of typing_extensions behind TYPE_CHECKING checks and from __future__ import annotations.