Skip to content

bpo-45831: _Py_DumpASCII() uses a single write() call if possible#29596

Merged
ambv merged 1 commit into
python:mainfrom
vstinner:traceback
Nov 17, 2021
Merged

bpo-45831: _Py_DumpASCII() uses a single write() call if possible#29596
ambv merged 1 commit into
python:mainfrom
vstinner:traceback

Conversation

@vstinner

@vstinner vstinner commented Nov 17, 2021

Copy link
Copy Markdown
Member

If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.

https://bugs.python.org/issue45831

@ambv ambv changed the title _Py_DumpASCII() uses a single write() call if possible bpo-45831: _Py_DumpASCII() uses a single write() call if possible Nov 17, 2021
If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 17, 2021
…thonGH-29596)

If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
(cherry picked from commit b919d81)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-bot

Copy link
Copy Markdown

GH-29597 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 17, 2021
…thonGH-29596)

If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
(cherry picked from commit b919d81)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Nov 17, 2021
@bedevere-bot

Copy link
Copy Markdown

GH-29598 is a backport of this pull request to the 3.10 branch.

ambv pushed a commit that referenced this pull request Nov 17, 2021
…-29596) (GH-29598)

If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
(cherry picked from commit b919d81)

Co-authored-by: Victor Stinner <vstinner@python.org>
ambv pushed a commit that referenced this pull request Nov 17, 2021
…-29596) (GH-29597)

If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
(cherry picked from commit b919d81)

Co-authored-by: Victor Stinner <vstinner@python.org>
remykarem pushed a commit to remykarem/cpython that referenced this pull request Dec 7, 2021
…thonGH-29596)

If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
@vstinner vstinner deleted the traceback branch December 13, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants