Skip to content

Conversation

@AA-Turner
Copy link
Member

@AA-TurnerAA-Turner commented Aug 12, 2025

Note, we use a custom converter qidarg_converter here. I have changed the qidarg_converter() function to simplify the return -- we only ever use qidarg.id.

pydoc diff:

--- pydoc-interpqueues-HEAD.txt 2025-08-12 19:29:03.554066000 +0100+++ pydoc-interpqueues-AC.txt 2025-08-12 19:26:19.952112000 +0100@@ -130,70 +130,52 @@ | args FUNCTIONS - bind(...)- bind(qid)-+ bind(qid) Take a reference to the identified queue. - The queue is not destroyed until there are no references left.- create(...)- create(maxsize, unboundop, fallback) -> qid+ The queue is not destroyed until there are no references left.+ create(maxsize, unboundop=-1, fallback=-1) Create a new cross-interpreter queue and return its unique generated ID. - It is a new reference as though bind() had been called on the queue.+ It is a new reference as though bind() had been called on the queue. The caller is responsible for calling destroy() for the new queue before the runtime is finalized. - destroy(...)- destroy(qid)+ destroy(qid)+ Clear and destroy the queue.- Clear and destroy the queue. Afterward attempts to use the queue- will behave as though it never existed.-- get(...)- get(qid) -> (obj, unboundop)+ Afterward attempts to use the queue will behave as though it never existed.+ get(qid) Return a new object from the data at the front of the queue. - The unbound op is also returned.+ The unbound op is also returned. If there is nothing to receive then raise QueueEmpty. - get_count(...)- get_count(qid)-+ get_count(qid) Return the number of items in the queue. - get_maxsize(...)- get_maxsize(qid)-+ get_maxsize(qid) Return the maximum number of items in the queue. - get_queue_defaults(...)- get_queue_defaults(qid)-+ get_queue_defaults(qid) Return the queue's default values, set when it was created. - is_full(...)- is_full(qid)-+ is_full(qid) Return true if the queue has a maxsize and has reached it. list_all() - list_all() -> [(qid, unboundop, fallback)]- Return the list of IDs for all queues. - Each corresponding default unbound op and fallback is also included.- put(...)- put(qid, obj)+ Each corresponding default unbound op and fallback is also included.+ put(qid, obj, unboundop=-1, fallback=-1) Add the object's data to the queue. - release(...)- release(qid)-+ release(qid) Release a reference to the queue. + The queue is destroyed once there are no references left. FILE

A

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

There is a bug in the current code which should be fixed in 3.14 too. The rest LGTM. But I would like to get @ericsnowcurrently's approve.

@serhiy-storchaka
Copy link
Member

I also add that after removing the return pseudo-annotation, some docstrings look more self-contadicting.

something(qid) Return bla-bla X. Ah, forget it, also return Y and Z. 

It was in the old docstrings, but with -> (X, Y, Z) you at least could suspect that "return X" was not the whole truth.

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Technically LGTM, but what would @ericsnowcurrently say?

It is sad that this cannot be backported to 3.14, so there will be such large difference between 3.14 and 3.15.

Copy link
Member

@ericsnowcurrentlyericsnowcurrently left a comment

Choose a reason for hiding this comment

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

Considering everything stays the same functionally (per all the passing tests), I don't really have any meaningful objections, especially since this is an internal module where I do not expect anyone to ever look at the docstrings. In fact, we could probably change all the docstrings to comments.

FWIW, my review comments are mostly me fussing about argument clinic, which is probably way too late to be relevant. :)

@AA-TurnerAA-Turner merged commit 4b78fe9 into python:mainSep 17, 2025
43 checks passed
@AA-TurnerAA-Turner deleted the clinic/_interpqueues branch September 17, 2025 16:35
@AA-Turner
Copy link
MemberAuthor

Thanks both for the reviews!

A

Sign up for freeto 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

@AA-Turner@serhiy-storchaka@ericsnowcurrently