Skip to content
This repository has been 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 opened this issue Aug 8, 2022 · 0 comments
Open

Use PEP 675 LiteralString to refine database function annotations #13473

DMRobertson opened this issue Aug 8, 2022 · 0 comments
Labels
A-Database DB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the db O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact

Comments

@DMRobertson
Copy link
Contributor

DMRobertson commented Aug 8, 2022

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).

@DMRobertson DMRobertson added T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. P4 (OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact labels Aug 8, 2022
@DMRobertson DMRobertson added S-Tolerable Minor significance, cosmetic issues, low or no impact to users. O-Uncommon Most users are unlikely to come across this or unexpected workflow and removed P4 (OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches labels Aug 24, 2022
@MadLittleMods MadLittleMods added the A-Database DB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the db label Apr 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Database DB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the db O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact
Projects
None yet
Development

No branches or pull requests

2 participants