8000 gh-119182: Decode PyUnicode_FromFormat() format string from UTF-8 by vstinner · Pull Request #120248 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-119182: Decode PyUnicode_FromFormat() format string from UTF-8 #120248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't mention the strict error handler
  • Loading branch information
vstinner committed Jun 11, 2024
commit 94da5e7680e817a7f54b6b5137fe748b66be3f5f
3 changes: 1 addition & 2 deletions Doc/c-api/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,7 @@ APIs:
arguments, calculate the size of the resulting Python Unicode string and return
a string with the values formatted into it. The variable arguments must be C
types and must correspond exactly to the format characters in the *format*
string. The *format* string is decoded from UTF-8 with the "strict" error
handler.
string. The *format* string is decoded from UTF-8.

A conversion specifier contains two or more characters and has the following
components, which must occur in this order:
Expand Down
4 changes: 2 additions & 2 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ New Features
Porting to Python 3.14
----------------------

* :c:func:`PyUnicode_FromFormat` now decodes the format string from UTF-8 with
the "strict" error handler, instead of decoding it from ASCII.
* :c:func:`PyUnicode_FromFormat` now decodes the format string from UTF-8,
instead of ASCII.
(Contributed by Victor Stinner in :gh:`119182`.)

Deprecated
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
:c:func:`PyUnicode_FromFormat` now decodes the format string from UTF-8 with
the "strict" error handler, instead of decoding it from ASCII. Patch by
Victor Stinner.
:c:func:`PyUnicode_FromFormat` now decodes the format string from UTF-8,
instead of ASCII. Patch by Victor Stinner.
Loading
0