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
Derby: Convert the _tkinter module to use Argument Clinic #64367
Comments
In progress. Actually many functions are not very suitable for Argument Clinic. |
What functions, and what makes them unsuitable? |
call() just converts all args to Tcl list. Is Argument Clinic supports *args splitlist() and split() first call PyArg_ParseTuple with one argument, check getint(), getdouble(), getboolean() first manually unpack arguments tuple, and setvar()/globalsetvar(), getvar()/globalgetvar(), unsetvar()/globalunsetvar() |
(It would have made it easier on me if you'd used the C function names, instead of the names in the module.) I agree. In retrospect, it's not surprising that things in _tkinter aren't suitable, as it appears to be a shunt for calling things in Tcl. For what it's worth, Argument Clinic is only intended for functions that use PyArg_ParseTuple or PyArg_ParseTupleOrKeywords to parse their arguments. So something like call is and will forever be unsuitable. (And reading _tkinter.c this has reminded me why I don't like Tcl ;-) |
So do you think there are any entry points worth converting in _tkinter, or should we close this issue? |
You misunderstood me. I already have 1018-lines patch which converts about 24 |
Oh, okay. That sounds fine, and I'm not in a hurry. Please post the patch whenever you're ready, thanks! |
Here is a patch. |
Here is updated patch. |
Synchronized with tip. |
Updated to the tip. Converted methods getint, getdouble, getboolean, splitlist, split. |
New changeset b22ced894d51 by Serhiy Storchaka in branch 'default': |
wantobjects() was not converted due to a bug in Argument Clinic (bpo-24051). |
This broke Windows builds because of unnecessary "static" qualifiers on the forward declarations at lines 2685 and 3006 (as discussed on bpo-20323). Removing "static" from these lines fixes the build. |
As mentioned on bpo-20148, removing the "static" from the forward declarations breaks it on GCC. (And, of the two, I think GCC is the one being reasonable here.) Attached is a patch that should fix the build for tkinter. |
LGTM |
New changeset 7a76c462c7f6 by Larry Hastings in branch 'default': |
Steve, please close this issue when you've confirmed it's now building correctly on Windows. |
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: