Repository navigation
Derby #15: Convert 50 sites to Argument Clinic across 9 files #64351
Description
Activity
Since _imp isn't directly exposed it isn't a priority to do the conversion, but for maintenance and such it should still occur.
- addedextension-modulesC modules in the Modules dirC modules in the Modules dir
on Jan 6, 2014 I'm normalizing the names of these issues so they're easier to read and to search for.
- changed the title
[-]Use Argument Clinic with _imp[/-][+]Derby: Convert the _imp module to use Argument Clinic[/+]on 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.
(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 sitesTalk 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- 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 - addedtype-featureA feature request or enhancementA feature request or enhancement
on Jan 8, 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/1f3242fb0c9cNow it's:
[Modules/cmathmodule.c](https://github.com/python/cpython/blob/main/Modules/cmathmodule.c): 8 sites [Modules/cjkcodecs/multibytecodec.c](https://github.com/python/cpython/blob/main/Modules/cjkcodecs/multibytecodec.c): 8 sites [Modules/arraymodule.c](https://github.com/python/cpython/blob/main/Modules/arraymodule.c): 8 sites [Modules/pyexpat.c](https://github.com/python/cpython/blob/main/Modules/pyexpat.c): 7 sites [Modules/fcntlmodule.c](https://github.com/python/cpython/blob/main/Modules/fcntlmodule.c): 7 sites [Modules/pwdmodule.c](https://github.com/python/cpython/blob/main/Modules/pwdmodule.c): 2 sites [Modules/spwdmodule.c](https://github.com/python/cpython/blob/main/Modules/spwdmodule.c): 1 sites [Modules/grpmodule.c](https://github.com/python/cpython/blob/main/Modules/grpmodule.c): 1 sitesI'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
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/c48980af7df2New changeset 0c2792a8f9db by Brett Cannon in branch 'default':
Issue bpo-20152: Port pyexpat to Argument Clinic.
http://hg.python.org/cpython/rev/0c2792a8f9dbTo make it easier to track what is left to commit:
- fcntl [does not apply cleanly
- array
- cmath [Martin says this no longer applies cleanly]
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/f7ab0884467eOnly ones left are:
- fcntl
- cmath
Both no longer apply cleanly.
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/5e8b94397f81Here 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':
bpo-20152, 22821: Port the fcntl module to Argument Clinic.
https://hg.python.org/cpython/rev/6e6532d313a1Finally 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: