FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-131357: Add tests for zero-sized bytes objects in test_bytes.py by abstractedfox · Pull Request #134234 · python/cpython · GitHub

Repository navigation

gh-131357: Add tests for zero-sized bytes objects in test_bytes.py - #134234

Merged
vstinner merged 9 commits into
python:mainfrom
abstractedfox:main
May 20, 2025
Merged

vstinner merged 9 commits into
python:mainfrom
abstractedfox:main

Conversation

abstractedfox commented May 19, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Concerns issue #131357 and adds slightly more descriptive comments for a few functions that crash when passed null

python-cla-bot Bot commented May 19, 2025 •
edited
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

bedevere-app Bot added the tests Tests in the Lib/test dir label May 19, 2025

This comment was marked as resolved.

This comment was marked as resolved.

StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You need to sign the CLA.

Comment thread Lib/test/test_capi/test_bytes.py Outdated
Comment thread Lib/test/test_capi/test_bytes.py Outdated
self.assertTrue(check(b''))

# CRASHES check(NULL)
# CRASHES check(NULL) #PyBytes_CheckExact() expects PyObject*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

How are these comments related? They should probably be on two lines.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Apologies; that was meant to explain why it crashes (it felt a little vague whether or not it was expected behavior). Would it be better on the next line, or in parenthesis or similar?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

explain why it crashes

Then it should be on the same line, but without the #, as that makes it seem like 2 different notes.

This comment was marked as resolved.

Copy link
Copy Markdown
Member

Please do not click the "Update" button for no reason, see the devguide.

Copy link
Copy Markdown
Contributor Author

Please do not click the "Update" button for no reason, see the devguide.

Oh, I apologize

Comment thread Lib/test/test_capi/test_bytes.py Outdated
Comment thread Lib/test/test_capi/test_bytes.py Outdated

Copy link
Copy Markdown
Member

I clicked on [Update branch] to try to repair the CI.

Copy link
Copy Markdown
Member

Many CI fail with "cancelled", I don't know why :-(

Copy link
Copy Markdown
Member

@vstinner Myself and @webknjaz figured it out, its a longstanding issue with the concurrency group specifier in our workflow not sufficiently disambiguating PRs when multiple contributors submit a PR with the same branch name, in this case main. @abstractedfox will have a PR we assisted them on to fix this that should unblock this one.

Copy link
Copy Markdown
Member

Close/reopen the PR to try to repair the CI.

Copy link
Copy Markdown
Member

@vstinner Myself and @webknjaz figured it out, its a longstanding issue with the concurrency group specifier in our workflow not sufficiently disambiguating PRs when multiple contributors submit a PR with the same branch name, in this case main. @abstractedfox will have a PR we assisted them on to fix this that should unblock this one.

I suppose that it's this PR: #134310.

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

vstinner enabled auto-merge (squash) May 20, 2025 12:00
vstinner merged commit 306f9e0 into python:main May 20, 2025

picnixz commented May 20, 2025

Copy link
Copy Markdown
Member

@vstinner We backported the tests for bytesarray, do you want to backport those tests as well?

vstinner added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels May 20, 2025

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 20, 2025
….py (pythonGH-134234)

(cherry picked from commit 306f9e0)

Co-authored-by: abstractedfox <coldcaption@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 20, 2025
….py (pythonGH-134234)

(cherry picked from commit 306f9e0)

Co-authored-by: abstractedfox <coldcaption@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>

bedevere-app Bot commented May 20, 2025

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 20, 2025

bedevere-app Bot commented May 20, 2025

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.13 only security fixes label May 20, 2025

Copy link
Copy Markdown
Member

@vstinner We backported the tests for bytesarray, do you want to backport those tests as well?

Sure. Let me backport these changes to 3.13 and 3.14 branches.

vstinner added a commit that referenced this pull request May 20, 2025
…s.py (GH-134234) (#134379)

gh-131357: Add tests for zero-sized bytes objects in test_bytes.py (GH-134234)
(cherry picked from commit 306f9e0)

Co-authored-by: abstractedfox <coldcaption@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this pull request May 20, 2025
…s.py (GH-134234) (#134378)

gh-131357: Add tests for zero-sized bytes objects in test_bytes.py (GH-134234)
(cherry picked from commit 306f9e0)

Co-authored-by: abstractedfox <coldcaption@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
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

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL