Skip to content

Merge types-requests into psf/requests with py.typed marker #6211

@kkirsche

Description

@kkirsche

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions