bpo-31938: Convert selectmodule.c to Argument Clinic#4265
Conversation
Not in working condition, things need to be moved around to work with generation of AC code in a separate file.
This is required to be able to include the generated AC code from clinic/selectmodule.c.h, which must appear before these definitions but after all typedefs and type declarations.
The converter was copied from Modules/posixmodule.c, but changed to check whether fd == -1 rather than fd < 0 as an error condition from calling PyOjbect_AsFileDescriptor(). Note: AC output in Modules/clinic/selectmodule.c.h was manually modified in this commit to get the build working. This may be due to an AC bug.
Note: AC output in Modules/clinic/selectmodule.c.h was manually modified in this commit to get the build working. This may be due to an AC bug.
Also change the doc-string of epoll.poll: * use AC's per-argument docs to describe the arguments * revert an addition describing the return value Note: AC output in Modules/clinic/selectmodule.c.h was manually modified in this commit to get the build working. This may be due to an AC bug.
vstinner
left a comment
There was a problem hiding this comment.
Thank you for this nice PR. While I may have other comments later, and @serhiy-storchaka already added comments, I like how the new code looks like ;-)
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
This PR is just giant. I would suggest to split it into multiple smaller PRs. For example, why not starting by converting only select()?
Sorry, something went wrong.
I can understand why you suggest this. I'm discouraged by the amount of work required in addition to that already invested here. I'm further discouraged since I've done exactly what you suggest for the AC conversion of |
Sorry, something went wrong.
I like AC and want to convert everything to AC, but I have limited bandwidth to review such AC. Please don't hesitate to ping me frequently until I reviewed all of them :-) |
Sorry, something went wrong.
|
Making all changes with a single PR LGTM. This is unavoidable when convert to AC such module. Let me to recall where we stopped last time. I guess there were just minor problems which should be resolved. |
Sorry, something went wrong.
I've got a patch ready which addresses nearly all of those issues. If you're interested I'll get it done and push it to this branch. I suggest that you wait until that's done before reviewing again. |
Sorry, something went wrong.
I greatly appreciate your bandwidth, it's obvious you spend a lot of time and effort to address so many different issues! I realize that AC is lower priority than most things and accept that. I'll work on moving my AC patches one at a time, in hopes of getting things moving in smaller steps will require less ongoing commitment from other core devs. |
Sorry, something went wrong.
|
@vstinner, AFAICT all of your comments in the last batch are regarding code and comments which I mostly moved around rather than actually wrote or edited. I'd rather make such changes after the AC conversion if you don't mind. I'd gladly collect your comments here and prepare another PR with just those improvements, after this is done with. |
Sorry, something went wrong.
# Conflicts: # Modules/selectmodule.c
|
@serhiy-storchaka, I've fixed all of the outstanding issues brought up here that it was clear should be fixed. I think this is ready for another review! I've left the epoll I've also not addressed the comments from @vstinner's latest review, since they are all about things I haven't actually changed here. |
Sorry, something went wrong.
|
@serhiy-storchaka, I think this is ready for another review! I've addressed your latest two comments and fixed a couple of bugs related to |
Sorry, something went wrong.
# Conflicts: # Modules/selectmodule.c
This is a complete Argument Clinic conversion of
Modules/selectmodule.c.The initial commit on this branch is the mostly fixed application of the latest patch on bpo-20182. Later changes were each done in a separate commit to facilitate review.
Minor note: Some of the early commits on the branch don't compile successfully.
https://bugs.python.org/issue31938