Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Use PEP 675 LiteralString to refine database function annotations #13473

Open
@DMRobertson

Description

@DMRobertson

PEP 675 proposes a new typing.LiteralString type. The idea is that typecheckers should check that a LiteralString is composed only from string literals (i.e. cannot contain user-provided data), to help mitigate e.g. SQL injection attacks. This sounds like a nice-to-have for us, though it's probably not worth picking up until mypy has support for the type (python/mypy#12554).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DatabaseDB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the dbO-UncommonMost users are unlikely to come across this or unexpected workflowS-TolerableMinor significance, cosmetic issues, low or no impact to users.T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.Z-Dev-WishlistMakes developers' lives better, but doesn't have direct user impact

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions