Skip to content

Conversation

@ZeroIntensity
Copy link
Member

@ZeroIntensity ZeroIntensity commented Nov 11, 2025

@ZeroIntensity ZeroIntensity added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Nov 11, 2025
@bedevere-app bedevere-app bot added awaiting core review docs Documentation in the Doc dir skip news labels Nov 11, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Nov 11, 2025
Comment on lines 234 to 235
Get the string representation of *bytes*. This function is used to
implement :meth:`!bytes.__repr__` in Python.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Get the string representation of *bytes*. This function is used to
implement :meth:`!bytes.__repr__` in Python.
Get the string representation of *bytes*.
*bytes* must be a bytes object.
This function is used to implement :meth:`!bytes.__repr__` in Python.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark as the other PR, this reads as "segfault if this isn't a bytes object".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it will lead to undefined behaviour.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yuck! I think we should have a more explicit note then. That definitely surprised me.

ZeroIntensity and others added 3 commits November 11, 2025 12:20
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Copy link
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ZeroIntensity ZeroIntensity merged commit 37e2762 into python:main Nov 11, 2025
28 checks passed
@ZeroIntensity ZeroIntensity deleted the document-pybytes branch November 11, 2025 20:32
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Nov 11, 2025
@miss-islington-app
Copy link

Thanks @ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @ZeroIntensity, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 37e2762ee12c2d7fc465938d7161a9a0640bd71f 3.14

@miss-islington-app
Copy link

Sorry, @ZeroIntensity, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 37e2762ee12c2d7fc465938d7161a9a0640bd71f 3.13

@bedevere-app
Copy link

bedevere-app bot commented Nov 12, 2025

GH-141440 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Nov 12, 2025
ZeroIntensity added a commit to ZeroIntensity/cpython that referenced this pull request Nov 12, 2025
…ythonGH-141407)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
(cherry picked from commit 37e2762)
ZeroIntensity added a commit to ZeroIntensity/cpython that referenced this pull request Nov 12, 2025
…cape` (pythonGH-141407)

(cherry picked from commit 37e2762)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Nov 12, 2025

GH-141441 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 12, 2025
ZeroIntensity added a commit to ZeroIntensity/cpython that referenced this pull request Nov 12, 2025
…ythonGH-141407)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
(cherry picked from commit 37e2762)
ZeroIntensity added a commit to ZeroIntensity/cpython that referenced this pull request Nov 12, 2025
…cape` (pythonGH-141407)

(cherry picked from commit 37e2762)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
ZeroIntensity added a commit that referenced this pull request Nov 12, 2025
…H-141407) (GH-141440)

* gh-141004: Document `PyBytes_Repr` and `PyBytes_DecodeEscape` (GH-141407)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
(cherry picked from commit 37e2762)
ZeroIntensity added a commit that referenced this pull request Nov 12, 2025
…H-141407) (GH-141441)

* gh-141004: Document `PyBytes_Repr` and `PyBytes_DecodeEscape` (GH-141407)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
(cherry picked from commit 37e2762)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants