Re-phrase docs of set_content behavior for str payloads#2
Merged
Conversation
The previous patch only illustrates this behavior with a very specific edge case, which IMO did not do a good job elucidating the present ambiguous documentation, if not worsening it by obscuring the true intention behind EOL canonicalization for messages of text/* types. This instead should address the more general case, abeit less concrete, which seems like a fair compromise, considering users who care about accurate representation of line endings will likely carefully study the documentation and be assured that this is an expected deviation from the legacy API, while those who do not are not befuddled by a footnote that seems to warn of something out of the blue. I do not know if this is true to the original author's intention, but it is my personal understanding of this implementation at least. :/ The case of bytes is also addressed briefly in a subsequent bullet point to assure the user that it is to be expected that all bytes are preserved as any arbitrary binary file ought to be. I wish I could state this more explicitly, but that seems rather hard without presumably restructuring this particular page, so I will leave it to the original author... :) Signed-off-by: Yizheng Meng <dev@rapidcow.org>
ZeroIntensity
pushed a commit
that referenced
this pull request
Dec 8, 2025
Highlight lazy imports in the new REPL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch for gh-121543
📚 Documentation preview 📚: https://cpython-previews--2.org.readthedocs.build/