This issue is to merge the existing type hints available in typeshed (here) into this repository.
Currently, psf/requests supports only Python 3.7+ per https://github.com/psf/requests/blob/main/setup.py#L10
As a result, type-related code would not impact usability by end users. Performance concerns related to additional imports may also be addressed by protecting the type-only imports under the typing.TYPE_CHECKING boolean and using the correct syntax downstream.
By making this change, it will keep type information paired with the code, ensuring they get updated together, it will reduce the maintenance burden on the typeshed team (not requested, just a side effect), and will enable more users to get type-hint related information without having to install separate packages.
Depending on your point of view on type hints, they also can reduce the risk of bugs caused by refactoring.
This issue is to merge the existing type hints available in typeshed (here) into this repository.
Currently, psf/requests supports only Python 3.7+ per https://github.com/psf/requests/blob/main/setup.py#L10
As a result, type-related code would not impact usability by end users. Performance concerns related to additional imports may also be addressed by protecting the type-only imports under the
typing.TYPE_CHECKINGboolean and using the correct syntax downstream.By making this change, it will keep type information paired with the code, ensuring they get updated together, it will reduce the maintenance burden on the typeshed team (not requested, just a side effect), and will enable more users to get type-hint related information without having to install separate packages.
Depending on your point of view on type hints, they also can reduce the risk of bugs caused by refactoring.