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

gh-135698: Fix Cross-interpreter Queue.full() With Negative/Default max_size by ericsnowcurrently · Pull Request #135724 · python/cpython · GitHub

Repository navigation

gh-135698: Fix Cross-interpreter Queue.full() With Negative/Default max_size - #135724

Merged
ericsnowcurrently merged 2 commits into
python:mainfrom
ericsnowcurrently:fix-queue-is-full
Jun 20, 2025
Merged

ericsnowcurrently merged 2 commits into
python:mainfrom
ericsnowcurrently:fix-queue-is-full

Conversation

ericsnowcurrently commented Jun 19, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

We weren't handling non-positive maxsize values (including the default) properly in Queue.full(). This change fixes that and adjusts an associated assert.

Copy link
Copy Markdown

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

ericsnowcurrently deleted the fix-queue-is-full branch June 20, 2025 20:26
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 20, 2025
…ault max_size (pythongh-135724)

We weren't handling non-positive maxsize values (including the default) properly
in Queue.full().  This change fixes that and adjusts an associated assert.
(cherry picked from commit c5ea8e8)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>

bedevere-app Bot commented Jun 20, 2025

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

cherry_picker c5ea8e8e8fc725f39ed23ff6259b3cc157a0785f 3.13

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jun 20, 2025
ericsnowcurrently added a commit that referenced this pull request Jun 20, 2025
…fault max_size (gh-135775)

We weren't handling non-positive maxsize values (including the default) properly
in Queue.full().  This change fixes that and adjusts an associated assert.

(cherry picked from commit c5ea8e8, AKA gh-135724)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
ericsnowcurrently added a commit to ericsnowcurrently/cpython that referenced this pull request Jun 20, 2025
…ault max_size (pythongh-135724)

We weren't handling non-positive maxsize values (including the default) properly
in Queue.full().  This change fixes that and adjusts an associated assert.
Comment on lines +712 to +714
*p_is_full = queue->items.maxsize > 0
? queue->items.count == queue->items.maxsize
: 0;

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

Why not write this as queue->items.count >= queue->items.maxsize?

Copy link
Copy Markdown
Member 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

Yeah, that would have worked.

ericsnowcurrently added a commit that referenced this pull request Jun 23, 2025
…fault max_size (gh-135778)

We weren't handling non-positive maxsize values (including the default) properly
in Queue.full().  This change fixes that and adjusts an associated assert.

(cherry picked from commit c5ea8e8, AKA gh-135724)
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
…ault max_size (pythongh-135724)

We weren't handling non-positive maxsize values (including the default) properly
in Queue.full().  This change fixes that and adjusts an associated assert.
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
…ault max_size (pythongh-135724)

We weren't handling non-positive maxsize values (including the default) properly
in Queue.full().  This change fixes that and adjusts an associated assert.

Copy link
Copy Markdown
Member

Reminder about backporting. @ericsnowcurrently

encukou commented Aug 15, 2025

Copy link
Copy Markdown
Member

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

encukou removed the needs backport to 3.13 only security fixes label Aug 15, 2025
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
…ault max_size (pythongh-135724)

We weren't handling non-positive maxsize values (including the default) properly
in Queue.full().  This change fixes that and adjusts an associated assert.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL