[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-dev
Subject:    [Python-Dev] Accepting PEP 675 - Arbitrary Literal String Type
From:       "Gregory P. Smith" <greg () krypto ! org>
Date:       2022-03-21 20:08:08
Message-ID: CAGE7PNJwo2np1f+hKE1xApZpPmRA4QG5WeKAS72MyXfbVAqqSA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On behalf of the Python Steering Council, we are accepting PEP 675 -
Arbitrary Literal String Type <https://peps.python.org/pep-0675/>.

TL;DR - PEP 675 allows type checkers to help prevent bugs allowing
attacker-controlled data to be passed to APIs that declare themselves as
requiring literal, in-code strings.

This is a very thorough PEP with a compelling and highly relevant set of
use cases. If I tried to call out all the things we like about it, it'd
turn into a table of contents. It is long, but everything has a reason to
be there. :)

Once implemented, we expect it to be a challenge to tighten widely used
existing APIs that accept str today to be LiteralString for practical
reasons of what existing code calling unrestricted APIs naturally does. The
community would benefit from anyone who attempts to move a widely used
existing str API to LiteralString sharing their experiences, successful or
not.

-gps for the steering council

[Attachment #5 (text/html)]

<div dir="ltr"><span \
id="gmail-docs-internal-guid-f89f88e7-7fff-b6b5-3431-8e93a9ad03d8"><p dir="ltr" \
style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span \
style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent; \
font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">On \
behalf of the Python Steering Council, we are accepting </span><a \
href="https://peps.python.org/pep-0675/" style="text-decoration-line:none"><span \
style="font-size:11pt;font-family:Arial;background-color:transparent;font-variant-nume \
ric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap">PEP \
675 - Arbitrary Literal String Type</span></a><span \
style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent; \
font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">.</span></p><br><p \
dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span \
style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent; \
font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">TL;DR \
- PEP 675 allows type checkers to help prevent bugs allowing attacker-controlled data \
to be passed to APIs that declare themselves as requiring literal, in-code \
strings.</span></p><br><p dir="ltr" \
style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span \
style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent; \
font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">This \
is a very thorough PEP with a compelling and highly relevant set of use cases. If I \
tried to call out all the things we like about it, it'd turn into a table of \
contents. It is long, but everything has a reason to be there. :)</span></p><br><p \
dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span \
style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent; \
font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">Once \
implemented, we expect it to be a challenge to tighten widely used </span><span \
style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent; \
font-style:italic;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">existing</span><span \
style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent; \
font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"> \
APIs that accept str today to be LiteralString for practical reasons of what existing \
code calling unrestricted APIs naturally does. The community would benefit from \
anyone who attempts to move a widely used existing str API to LiteralString sharing \
their experiences, successful or not.</span></p><br><p dir="ltr" \
style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span \
style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent; \
font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">-gps \
for the steering council</span></p></span><br \
class="gmail-Apple-interchange-newline"></div>



_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/XEOOSSPNYPGZ5NXOJFPLXG2BTN7EVRT5/
 Code of Conduct: http://python.org/psf/codeofconduct/



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic