gh-156263: Add the duration and timestamp converters to Argument Clinic - #156291
Draft
serhiy-storchaka wants to merge 2 commits into
Draft
gh-156263: Add the duration and timestamp converters to Argument Clinic#156291serhiy-storchaka wants to merge 2 commits into
serhiy-storchaka wants to merge 2 commits into
Conversation
…t Clinic The duration converter converts a number of seconds or milliseconds to PyTime_t or struct timeval. The timestamp converter converts a number of seconds since the epoch to time_t or PyTime_t. They are used for the timeout parameters in the select, signal, faulthandler, _queue, _thread, _multiprocessing, socket and _sqlite3 modules and for the timestamp parameter of date.fromtimestamp(). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…verter # Conflicts: # Lib/test/test_clinic.py # Tools/clinic/libclinic/converters.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
durationconverter converts a number of seconds or milliseconds toPyTime_torstruct timeval. It supports different units, rounding modes and output types, optionally acceptsNone(which keeps the default value) and can reject negative values.The
timestampconverter converts a number of seconds since the epoch totime_torPyTime_t.They are used for the timeout parameters in the
select,signal,faulthandler,_queue,_thread,_multiprocessing,socketand_sqlite3modules and for the timestamp parameter ofdate.fromtimestamp(). See the NEWS entry for the resulting behavior changes.