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

gh-135698: Fix _interpqueues.create(): max_size >= 0 by vstinner · Pull Request #135703 · python/cpython · GitHub

Repository navigation

gh-135698: Fix _interpqueues.create(): max_size >= 0 - #135703

Closed
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:queues_create
Closed

vstinner wants to merge 1 commit into
python:mainfrom
vstinner:queues_create

Conversation

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

Copy link
Copy Markdown
Member

Make sure that the queue maximum size is greater than or equal to 0.

Make sure that the queue maximum size is greater than or equal to 0.

Copy link
Copy Markdown
Member Author

@ericsnowcurrently: Would you mind to review my change?

Comment on lines +1491 to +1495
if (maxsize < 0) {
PyErr_SetString(PyExc_ValueError,
"max_size must be greater than or equal to 0");
return NULL;
}

ericsnowcurrently Jun 19, 2025 •
edited
Loading

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

A negative value is fine. That's the same as queue.Queue. The logic (and the assert) in _queue_is_full() is actually wrong. I'll put up a PR.

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

See gh-135724.

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

Oh I see! I closed my PR.

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

Thanks for taking time on this!

vstinner closed this Jun 23, 2025
AA-Turner removed needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Aug 14, 2025
vstinner deleted the queues_create branch December 3, 2025 15:36
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