-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Add _interpqueues for 3.13
#12240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add _interpqueues for 3.13
#12240
Changes from 3 commits
267b71d
78057cf
d53f42e
a77bcf8
98a79ac
42218c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| from typing import SupportsIndex | ||
|
|
||
| class QueueError(RuntimeError): ... | ||
| class QueueNotFoundError(QueueError): ... | ||
|
|
||
| def bind(qid: SupportsIndex) -> None: ... | ||
| def create(maxsize: SupportsIndex, fmt: SupportsIndex) -> int: ... | ||
| def destroy(qid: SupportsIndex) -> None: ... | ||
| def get(qid: SupportsIndex) -> tuple[object, int]: ... | ||
|
srittau marked this conversation as resolved.
Outdated
|
||
| def get_count(qid: SupportsIndex) -> int: ... | ||
| def get_maxsize(qid: SupportsIndex) -> int: ... | ||
| def get_queue_defaults(qid: SupportsIndex) -> tuple[int]: ... | ||
| def is_full(qid: SupportsIndex) -> bool: ... | ||
| def list_all() -> list[tuple[int, int]]: ... | ||
| def put(qid: SupportsIndex, obj: object, fmt: SupportsIndex) -> None: ... | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I understand this correctly (which I might not), the allowed values for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does using
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is mainly a documentation thing: "We can't accurately type this argument" instead of "this argument accepts all possible values" (like for example
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah I see, makes sense.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's keep things simple for now that in this case, and we can see about adding the overloads in a follow-up.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| def release(qid: SupportsIndex) -> None: ... | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There also
QueueEmptyandQueueFull:https://github.com/python/cpython/blob/722229e5dc1e499664966e50bb98065670033300/Modules/_interpqueuesmodule.c#L158-L159
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing these actually get exported, might be because of:
3.13.0b2