You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Derby #15: Convert 50 sites to Argument Clinic across 9 files #64351
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,
where we're trying to convert as much of Python 3.4 to use
Argument Clinic as we can before Release Candidate 1 on January 19.
changed the title [-]Derby: Convert the _imp module to use Argument Clinic[/-][+]Derby #15: Convert 50 sites to Argument Clinic across 9 files[/+]on Jan 8, 2014
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.
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.
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.
Activity
brettcannon commentedon Jan 6, 2014
Since _imp isn't directly exposed it isn't a priority to do the conversion, but for maintenance and such it should still occur.
larryhastings commentedon Jan 7, 2014
I'm normalizing the names of these issues so they're easier to read and to search for.
[-]Use Argument Clinic with _imp[/-][+]Derby: Convert the _imp module to use Argument Clinic[/+]brettcannon commentedon Jan 7, 2014
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.
larryhastings commentedon Jan 8, 2014
(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,
where we're trying to convert as much of Python 3.4 to use
Argument Clinic as we can before Release Candidate 1 on January 19.
This issue asks you to change the following bundle of files:
Python/import.c: 8 sites
Modules/cmathmodule.c: 8 sites
Modules/cjkcodecs/multibytecodec.c: 8 sites
Modules/arraymodule.c: 8 sites
Modules/pyexpat.c: 7 sites
Modules/fcntlmodule.c: 7 sites
Modules/pwdmodule.c: 2 sites
Modules/spwdmodule.c: 1 sites
Modules/grpmodule.c: 1 sites
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
Clinic, read the "howto":
http://docs.python.org/dev/howto/clinic.html
[-]Derby: Convert the _imp module to use Argument Clinic[/-][+]Derby #15: Convert 50 sites to Argument Clinic across 9 files[/+]python-dev commentedon Jan 10, 2014
New changeset 1f3242fb0c9c by Brett Cannon in branch 'default':
Issue bpo-20152: import.c now uses Argument Clinic.
http://hg.python.org/cpython/rev/1f3242fb0c9c
brettcannon commentedon Jan 10, 2014
Now it's:
brettcannon commentedon Jan 17, 2014
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.
24 remaining items
python-dev commentedon Aug 22, 2014
New changeset c48980af7df2 by Brett Cannon in branch 'default':
Issue bpo-20152: Port the pwd module to Argument Clinic.
http://hg.python.org/cpython/rev/c48980af7df2
python-dev commentedon Aug 22, 2014
New changeset 0c2792a8f9db by Brett Cannon in branch 'default':
Issue bpo-20152: Port pyexpat to Argument Clinic.
http://hg.python.org/cpython/rev/0c2792a8f9db
brettcannon commentedon Aug 22, 2014
To make it easier to track what is left to commit:
python-dev commentedon Oct 10, 2014
New changeset f7ab0884467e by Brett Cannon in branch 'default':
Issue bpo-20152: Port the array module to Argument Clinic.
https://hg.python.org/cpython/rev/f7ab0884467e
brettcannon commentedon Oct 10, 2014
Only ones left are:
Both no longer apply cleanly.
python-dev commentedon Oct 14, 2014
New changeset 5e8b94397f81 by Brett Cannon in branch 'default':
Issue bpo-20152: Convert the cmath module to Argument Clinic.
https://hg.python.org/cpython/rev/5e8b94397f81
brettcannon commentedon Nov 7, 2014
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.
serhiy-storchaka commentedon Nov 7, 2014
I found bugs or doubtful code in the fcntl module. They should be fixed before converting to Argument Clinic.
brettcannon commentedon Nov 8, 2014
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!
serhiy-storchaka commentedon Nov 8, 2014
If first convert to Argument Clinic then fixing bugs will be much harder.
serhiy-storchaka commentedon Nov 8, 2014
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.
python-dev commentedon Nov 10, 2014
New changeset 6e6532d313a1 by Brett Cannon in branch 'default':
bpo-20152, 22821: Port the fcntl module to Argument Clinic.
https://hg.python.org/cpython/rev/6e6532d313a1
brettcannon commentedon Nov 10, 2014
Finally finished!
I am never trusting Larry to count anything ever again. ;)