gh-64376: Convert the time module to the Argument Clinic#14311
gh-64376: Convert the time module to the Argument Clinic#14311ZackerySpytz wants to merge 2 commits intopython:mainfrom
Conversation
Co-Authored-By: Nikolaus Rath <[email protected]>
|
As mentioned on the BPO issue, it doesn't seem practical to use the Argument Clinic instead of the The |
|
Needs #14795 instead. |
Since pythonGH-15776, the test no longer uses time_gmtime
|
There are now (in current master) dedicated built-in functions to use for testing, which aren't very likely to gain Argument Clinic signatures. I suggest using import _testcapi
meth = types.MethodType(_testcapi.meth_varargs, 32)
self.assertEqual(meth(), (_testcapi, (32,))) |
This PR shouldn't change |
|
It no longer changes |
| /*[clinic input] | ||
| time.gmtime | ||
|
|
||
| seconds: object = NULL |
There was a problem hiding this comment.
Maybe use a converter?
| seconds: object = NULL | |
| seconds as when: object(converter="object_to_time_t", type="time_t") = None |
Or introduce a named converter?
Note also that you can use None as a default value for better signature.
| time.strptime | ||
|
|
||
| string: object | ||
| format: object = NULL |
There was a problem hiding this comment.
| format: object = NULL | |
| format: object(c_default="NULL") = "%a %b %d %H:%M:%S %Y" |
| /*[clinic end generated code: output=00d2a25afc00983a input=474fd69ff9188bcb]*/ | ||
| { | ||
| PyObject *module, *func, *result; | ||
| PyObject *mod, *func, *result; |
| Process time for profiling as nanoseconds: | ||
|
|
||
| sum of the kernel and user-space CPU time. |
There was a problem hiding this comment.
It is a single sentence. Either write it in one line or make separate sentences.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
Ping, @ZackerySpytz? |
|
No response since 2020. In the three years since 2020, there has been a lot of changes to Modules/timemodule.c1. I suggest to close this PR; if someone wants to pick this up, it will probably be easier to start from scratch, rather than rebasing this PR. Footnotes
|
Co-Authored-By: Nikolaus Rath [email protected]
https://bugs.python.org/issue20177