-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Derby #16: Convert 50 sites to Argument Clinic across 9 files #64383
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
Comments
This issue is part of the Great Argument Clinic Conversion Derby, This issue asks you to change the following bundle of files: Talk to me (larry) if you only want to attack part of a bundle. For instructions on how to convert a function to work with Argument |
I'm going to specifically tackle the "bltinmodule" side of things using a test driven approach: adding a new test to test_inspect that checks all the builtin names have signatures (I'll explicitly exclude ones that are known not to be handled, like range and slice). |
Attached patch shows the new test case I'm using to ensure that all callable builtins have signatures, and once we get it that way, it stays that way. Preliminary goal is signatures for all the non-type objects, and once I get to that point, I'll propose it for review. |
More comprehensive patch uploaded - all the non-type callables implemented in bltinmodule.c have been converted or classified with a reason for not being converted yet (see the new test in test_inspect.py for details, as well as the AC 3.4 and AC 3.5 comments in the module itself). I also cleaned up the docstrings for the builtins I actually changed in the patch. There were a few that had never been properly updated for the Py3k transition. There are still a couple of test failures with this version - the doctest tests get confused by the fact ord and chr now have a doctest in their docstrings, and test_gdb is definitely not in a happy place (that has always been temperamental, though). I also just realised the Unicode character in the new ord and chr docstrings could pose a compatibility problem at the C compiler source encoding level, so we may have to reconsider that (even though I was rather happy to sneak that obscure Monty Python reference in there). |
Assigning to myself to make it clear that bltinmodule is the only part of this still under consideration for 3.4. The test_pydoc and test_gdb failures pointed to real issues with the previous patch:
This does mean we'll want to update the signature by hand once you merge the patch changing the indicators that argument clinic is looking for. |
Larry, if this version looks good to you, I'd like to commit it.
I'm thinking it's probably worth flagging this new test as a CPython implementation detail test, though. |
Larry, I'd like to include the most-builtin-functions signature support for 3.4, but since the AC Derby is over, it's your call as release manager. If it looks good to you, go ahead and commit it (I won't have time until later in the week), otherwise just drop the priority and punt it to 3.5. |
Interpreting the lack of response as "this can wait until 3.5". |
Updated the builtins patch for the 3.4.0 Argument Clinic changes. Also moved the issue back to 3.4, since Larry has indicated that AC conversions are in scope for 3.4.x maintenance releases, so long as no public API behaviour changes. |
All the Derby patches should only go into trunk at this point. |
Tweaked patch to apply cleanly to trunk, but realised it has been a while since I looked at the current state of argument clinic:
Also, Larry, there's a note in the the 3.4 "What's New" about additional signature info landing in Python 3.4 maintenance releases. That note should probably be adjusted at this point, since any new signature data will only be available in 3.5. |
New changeset 6219aa966a5f by Nick Coghlan in branch 'default': |
30 of the builtin functions now support signature introspection thanks to Argument Clinic :) |
(Well, they'll support it in 3.5...) |
Proposed patch converts _dbm and _gdbm modules to Argument Clinic. |
The patch updated to the tip. |
New changeset 49910ff21ba5 by Serhiy Storchaka in branch 'default': |
Here is a patch that converts 3 functions in the _json module to Argument Clinic. All other functions doesn't fit with Argument Clinic. |
Looks like |
Is this metaissue still relevant after nine years? Currently, conversions into AC are handled in smaller, more specific issues so it could be closed. |
It looks to me like all of these derby issues would be better closed. Even if some functions do remain unconverted, it's much more likely at this point that they will be converted because someone notices the unconverted function in the codebase, not because of a derby issue with non-descriptive (and almost certainly now obsolete) name that requires digging through all of the listed modules to see if there's any work remaining to be done on it. As the derby issues say, it was an effort to convert as much as possible before Python 3.4 release. Python 3.4 is long ago released, so the derby is over. |
Will leave this open for a bit to see if a core dev agrees before closing all of them. |
It's been open for long enough now. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: