-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Derby #15: Convert 50 sites to Argument Clinic across 9 files #64351
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
Since _imp isn't directly exposed it isn't a priority to do the conversion, but for maintenance and such it should still occur. |
I'm normalizing the names of these issues so they're easier to read and to search for. |
I have attached my conversion of import.c. Larry, can you look it over to make sure I did it as expected? I tried to not have to write my own converter for O& as the docs seem to suggest object(converter='...') should work, but I got an error instead. |
(Brett: in order to avoid creating 129 differet issues on the tracker, I'm bundling files together into groups of 50 sites. You don't have to tackle the whole list if you don't want to.) 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 |
New changeset 1f3242fb0c9c by Brett Cannon in branch 'default': |
Now it's:
|
I'm going to start tackling some of these today and checking them in directly. If I don't finish I will update the bug with what I didn't get to. |
Patch for multibytecodec.c. Not sure how you calculated locations, Larry, but this file had 11 things to change, so some other work divisions might be off. |
After finding out that the initial site counts were off I went through and manually counted each file in this Derby group to get a more accurate idea of how much work each file would be.
|
Might pick this up later today (or never), but taking a break for now. Larry, I have patches for grp, spwd, _multibytecodec, and pwd I'd like you to give a once-over to make sure I didn't miss anything. The only one that I think has an obvious improvement is in pwd where there is custom logic to deal with a PyArg_ParseTuple() failure. Does Argument Clinic have a way to specify custom logic in that instance? With these patches the TODO for this derby group is:
cmath might not be worth doing, though, for 3.4 as it already has custom macros to create function definitions. |
Here is fcntl converted. I didn't do fcntl.ioctl as it has a crazy set of possible signatures which I simply didn't want to deal with. |
Here is pyexpat converted. Couldn't do ErrorString as the 'l' format isn't supported; issue bpo-20332. |
Here is pyexpat updated with ErrorString converted (and generally updated to manage changes now required by AC for class definitions). |
Should only have two modules left to convert:
I have already started arraymodule.c; it's just taking a while. |
It took a bit of finessing but I managed to convert cmath in a way that didn't make it worse compared to before AC. I now consider this part of the derby done and ready for Larry to review. |
multibytecodec_derby.diff looks fine, please apply. |
The cmath patch fails to apply; please update it. |
New changeset c2d71f9afa0b by Brett Cannon in branch 'default': |
To make it easier to track what is left to commit:
I should also mention all of these patches probably need to shift to |
New changeset 2617db7e43a3 by Brett Cannon in branch 'default': |
To make it easier to track what is left to commit:
|
New changeset b3aa30f474c4 by Brett Cannon in branch 'default': |
New changeset c48980af7df2 by Brett Cannon in branch 'default': |
New changeset 0c2792a8f9db by Brett Cannon in branch 'default': |
To make it easier to track what is left to commit:
|
New changeset f7ab0884467e by Brett Cannon in branch 'default': |
Only ones left are:
Both no longer apply cleanly. |
New changeset 5e8b94397f81 by Brett Cannon in branch 'default': |
Here is a new patch for fcntl. I would like a review since I had to get a bit tricky to handle the polymorphic arguments for fcntl and ioctl and I don't think the test suite is that thorough for this module. |
I found bugs or doubtful code in the fcntl module. They should be fixed before converting to Argument Clinic. |
So I disagree that the code needs to be tweaked before converting to Argument Clinic. If the Clinic conversion is not adding to the problem then the code churn is just going to make applying this patch that much harder. Thanks for the code review regardless, though! |
If first convert to Argument Clinic then fixing bugs will be much harder. |
About argument names. You have changed argument names and docstrings in any case (e.g. was "op", now "code"). Why not conform with standard documentation? This wouldn't add additional code churn if change it now. But will add if change it later. |
New changeset 6e6532d313a1 by Brett Cannon in branch 'default': |
Finally finished! I am never trusting Larry to count anything ever again. ;) |
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: