GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-137630: Convert ``_interpqueues`` to use Argument Clinic by AA-Turner · Pull Request #137685 · python/cpython

Conversation

@AA-Turner

@AA-Turner AA-Turner commented Aug 12, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

  • Issue: Convert _interpreters to Argument Clinic #137630

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
AA-Turner added 16 commits August 12, 2025 18:24
@AA-Turner
Convert _interpqueues.create()
4ac7307
@AA-Turner
Convert _interpqueues.destroy()
b28e303
@AA-Turner
Convert _interpqueues.list_all()
616ca56
@AA-Turner
Convert _interpqueues.put()
4432216
@AA-Turner
Convert _interpqueues.get()
214ab30
@AA-Turner
Convert _interpqueues.bind()
cdafcd8
@AA-Turner
Convert _interpqueues.release()
ae9ee89
@AA-Turner
Convert _interpqueues.get_maxsize()
3b8bf48
@AA-Turner
Convert _interpqueues.get_queue_defaults()
822b206
@AA-Turner
Convert _interpqueues.is_full()
0a4d8f9
@AA-Turner
Convert _interpqueues.get_count()
ca68aa7
@AA-Turner
Convert _interpqueues._register_heap_types()
2fd1f9a
@AA-Turner
Improve qidarg_converter
3cd5b3c
@AA-Turner
Fix "implicit declaration of function ‘qidarg_converter’"
07e8d7a
@AA-Turner
Blurb
b426a9e
@AA-Turner
make regen-all
000e659
@AA-Turner
AA-Turner requested a review from serhiy-storchaka August 12, 2025 18:24
@AA-Turner
AA-Turner requested a review from ericsnowcurrently as a code owner August 12, 2025 18:24
@bedevere-app bedevere-app Bot added the awaiting core review label Aug 12, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Aug 12, 2025
Convert _interpreters to Argument Clinic #137630
Open
@AA-Turner AA-Turner added topic-subinterpreters topic-argument-clinic labels Aug 12, 2025
serhiy-storchaka
serhiy-storchaka reviewed Aug 12, 2025
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

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 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Misc/NEWS.d/next/Library/2025-08-12-19-10-25.gh-issue-137630.n6CkjJ.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_interpqueuesmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner AA-Turner mentioned this pull request Aug 12, 2025
GH-132775: Fix argument parsing for _interpqueues.put() #137686
Merged
@serhiy-storchaka

serhiy-storchaka commented Aug 12, 2025

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner AA-Turner mentioned this pull request Aug 12, 2025
gh-73487: Convert _decimal to use Argument Clinic (part 1) #137606
Merged
AA-Turner added 3 commits August 31, 2025 02:10
@AA-Turner
Merge branch 'main' into clinic/_interpqueues
c947341
# Conflicts:
#	Modules/_interpqueuesmodule.c
@AA-Turner
remove NEWS
78af9ff
@AA-Turner
Serhiy's review: improve docstrings
f14d8da
@AA-Turner AA-Turner added the skip news label Sep 1, 2025
@AA-Turner
AA-Turner requested a review from serhiy-storchaka September 1, 2025 15:50
serhiy-storchaka
serhiy-storchaka approved these changes Sep 1, 2025
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Modules/_interpqueuesmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Sep 1, 2025
@AA-Turner
Use subclass_of converter for queuetype
86941f1
ericsnowcurrently
ericsnowcurrently approved these changes Sep 17, 2025
View reviewed changes

@ericsnowcurrently ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

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.

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. :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Modules/_interpqueuesmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_interpqueuesmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_interpqueuesmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_interpqueuesmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_interpqueuesmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_interpqueuesmodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner
Merge branch 'main' into clinic/_interpqueues
32b7387
@AA-Turner
AA-Turner merged commit 4b78fe9 into python:main Sep 17, 2025
@AA-Turner
AA-Turner deleted the clinic/_interpqueues branch September 17, 2025 16:35
@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 17, 2025
@AA-Turner

AA-Turner commented Sep 17, 2025

Copy link
Copy Markdown
Member Author

Thanks both for the reviews!

A

ericsnowcurrently reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently ericsnowcurrently approved these changes
@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news topic-argument-clinic topic-subinterpreters

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@AA-Turner @serhiy-storchaka @ericsnowcurrently
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.