Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-108277: Add wrapper for timerfd_create, timerfd_settime, and timerfd_gettime to os module #108382

Merged
merged 170 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from 140 commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
0f8aaf5
gh-108277: Add wrapper functions for timerfd_create, timerfd_settime,…
m-tmatma Aug 8, 2023
208fd58
📜🤖 Added by blurb_it.
blurb-it[bot] Aug 23, 2023
37f70cd
fix lint error
m-tmatma Aug 23, 2023
6f63cf7
fix typo in doc
m-tmatma Aug 28, 2023
0f47920
Update Modules/posixmodule.c
m-tmatma Aug 28, 2023
03f319d
re-run Tools/clinic/clinic.py
m-tmatma Aug 28, 2023
b8e39f2
define HAVE_TIMERFD_API only
m-tmatma Aug 28, 2023
44b3ac7
update What's New file
m-tmatma Aug 28, 2023
a549684
Update document
m-tmatma Aug 28, 2023
5e33c3e
fix document
m-tmatma Aug 28, 2023
7da832d
fix document
m-tmatma Aug 28, 2023
d0905d9
fix comment
m-tmatma Aug 28, 2023
0eed49a
fix document
m-tmatma Aug 28, 2023
fd718d9
fix lint error
m-tmatma Aug 28, 2023
4b89526
fix comment
m-tmatma Aug 28, 2023
75614a1
Fix Sphinx C expr parsing (no semicolons)
AA-Turner Aug 29, 2023
458ae17
Update Doc/library/os.rst
m-tmatma Aug 29, 2023
1f1d22e
Update Modules/posixmodule.c
m-tmatma Aug 29, 2023
dda4c31
Update Modules/posixmodule.c
m-tmatma Aug 29, 2023
909c50a
fix compile error
m-tmatma Aug 29, 2023
c53a84d
update hash
m-tmatma Aug 29, 2023
7e306f5
use self.assertAlmostEqual
m-tmatma Aug 29, 2023
af8a9f2
Merge remote-tracking branch 'upstream/main' into feature/os.timerfd_xxx
m-tmatma Aug 29, 2023
74cdc6c
Update Modules/posixmodule.c
m-tmatma Aug 29, 2023
fc585b8
Update Modules/posixmodule.c
m-tmatma Aug 29, 2023
3879a71
Update Modules/posixmodule.c
m-tmatma Aug 29, 2023
04aa70b
Update Modules/posixmodule.c
m-tmatma Aug 29, 2023
efe3d1d
re-run Tools/clinic/clinic.py
m-tmatma Aug 7, 2023
132ef60
add document for parameters
m-tmatma Aug 29, 2023
c6d9fb0
add param comment
m-tmatma Aug 30, 2023
f7af17c
use seealso
m-tmatma Aug 30, 2023
94f248d
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Aug 30, 2023
3366d58
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Aug 31, 2023
d57cfbe
Merge branch 'main' into feature/os.timerfd_xxx
AA-Turner Sep 1, 2023
4b13a5c
Documentation review
AA-Turner Sep 1, 2023
94839ac
Update Doc/whatsnew/3.13.rst
m-tmatma Sep 1, 2023
4c783e8
Fix error on runing Tools/clinic/clinic.py -f Modules/posixmodule.c
m-tmatma Sep 2, 2023
b65fd4c
apply the result of 'python3 Tools/clinic/clinic.py -f Modules/posixm…
m-tmatma Sep 2, 2023
bdbeef0
rename valut to initial_expiration
m-tmatma Sep 2, 2023
e1abd07
rename return value
m-tmatma Sep 2, 2023
50e17c9
reverse the order of set/get functions
m-tmatma Sep 2, 2023
d8043a2
merge sections for new functions and new consts
m-tmatma Sep 2, 2023
8024c9e
fix error check
m-tmatma Sep 2, 2023
6e251af
reorder parameters and tuple of return values
m-tmatma Sep 2, 2023
914c7d0
reorder function definition
m-tmatma Sep 2, 2023
cd6b32b
move seealso to the end of section
m-tmatma Sep 2, 2023
d411858
move code example
m-tmatma Sep 2, 2023
02dac34
reorder initialize to parameters
m-tmatma Sep 2, 2023
a819904
change parameter to kw only except for fd
m-tmatma Sep 3, 2023
f812cbe
fix document
m-tmatma Sep 3, 2023
6db493f
fix document
m-tmatma Sep 3, 2023
fcf3efc
update document
m-tmatma Sep 3, 2023
44bc810
check the value from read()
m-tmatma Sep 3, 2023
f742b8f
fix lint error
m-tmatma Sep 3, 2023
cbbc97b
refer to negative values
m-tmatma Sep 3, 2023
977f574
add type comment
m-tmatma Sep 3, 2023
f86afb2
reorder.
m-tmatma Sep 3, 2023
0491421
fix parameter
m-tmatma Sep 3, 2023
de4477d
add supported functions
m-tmatma Sep 3, 2023
3915eea
rename parameter
m-tmatma Sep 3, 2023
4ae90da
fix comment
m-tmatma Sep 3, 2023
e380aef
fix const comment
m-tmatma Sep 3, 2023
e7d967d
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 3, 2023
c7e8593
update comment on os.timerfd_settime_ns
m-tmatma Sep 3, 2023
1d4d3b5
Fix document
m-tmatma Sep 3, 2023
6565fea
fix lint error
m-tmatma Sep 3, 2023
f0623b9
add test params
m-tmatma Sep 4, 2023
64f1571
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 4, 2023
e8c8b60
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 5, 2023
74c12d1
Update Doc/library/os.rst
m-tmatma Sep 7, 2023
8051b9b
Update Doc/library/os.rst
m-tmatma Sep 7, 2023
e9d4753
fix typo
m-tmatma Sep 7, 2023
ed6d3b2
Update Modules/posixmodule.c
m-tmatma Sep 7, 2023
ef0449a
Update Doc/library/os.rst
m-tmatma Sep 7, 2023
1faf245
Update Doc/library/os.rst
m-tmatma Sep 7, 2023
22315c8
Update Doc/library/os.rst
m-tmatma Sep 7, 2023
cc63a06
Update Doc/library/os.rst
m-tmatma Sep 7, 2023
ec8f2ec
Update Modules/posixmodule.c
m-tmatma Sep 7, 2023
1319814
update by Tools/clinic/clinic.py
m-tmatma Sep 7, 2023
7410a7c
Update Doc/library/os.rst
m-tmatma Sep 7, 2023
aed85ab
Update Doc/library/os.rst
m-tmatma Sep 7, 2023
1138cf9
fix document
m-tmatma Sep 7, 2023
95025c5
divide to a new subsection
m-tmatma Sep 7, 2023
d0ed353
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 8, 2023
9309e4b
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 8, 2023
3548656
Add comment.
m-tmatma Sep 8, 2023
8a8b706
add select.epoll test case
m-tmatma Sep 9, 2023
e1d993f
make flags positional argument and its default value to 0
m-tmatma Sep 9, 2023
c2b8ddf
fix timeout
m-tmatma Sep 9, 2023
bd23f53
add tests for select.epoll() and os.timerfd_settime_ns
m-tmatma Sep 9, 2023
b97d694
make non-blocking for select, epoll tests
m-tmatma Sep 9, 2023
c3f1904
fix assert
m-tmatma Sep 9, 2023
3b8e3dc
cleanup epoll
m-tmatma Sep 9, 2023
2db35e3
rename variable of epoll
m-tmatma Sep 9, 2023
180830f
fix code samples
m-tmatma Sep 9, 2023
ac7ee82
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 9, 2023
9cec110
move example
m-tmatma Sep 9, 2023
86f5a8e
mention errno.EAGAIN
m-tmatma Sep 9, 2023
ce53a4f
change to useful sample
m-tmatma Sep 9, 2023
814cc29
fix comment
m-tmatma Sep 9, 2023
a48c3a6
update example
m-tmatma Sep 9, 2023
da453b8
fix indentation
m-tmatma Sep 9, 2023
3f9bd62
Add comment
m-tmatma Sep 9, 2023
69b9cfa
define a macro to convert seconds in double.
m-tmatma Sep 9, 2023
b2f507a
update comment
m-tmatma Sep 9, 2023
d5e782d
update comment
m-tmatma Sep 9, 2023
f83058a
update comment
m-tmatma Sep 9, 2023
49e6981
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 9, 2023
765e584
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 9, 2023
3d55e2e
add comment
m-tmatma Sep 9, 2023
0011278
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 9, 2023
6080d32
add comment
m-tmatma Sep 10, 2023
32ba03f
fix code sample
m-tmatma Sep 10, 2023
789b909
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 10, 2023
3a66967
remove log
m-tmatma Sep 10, 2023
817933e
reorder
m-tmatma Sep 10, 2023
c090ada
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 10, 2023
0e9f5b3
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 10, 2023
ae6b885
add reference
m-tmatma Sep 10, 2023
79b74b0
move decription
m-tmatma Sep 10, 2023
fa00db9
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 10, 2023
20a0674
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 13, 2023
908e3dc
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 13, 2023
171c71a
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 15, 2023
8fb3fdf
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 16, 2023
7c470fb
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 18, 2023
189843a
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 22, 2023
2741533
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 22, 2023
3d527da
Update Doc/library/os.rst
m-tmatma Sep 23, 2023
2fd8804
move and fix the comment of cleanup
m-tmatma Sep 23, 2023
5aba21f
make flags a keyword parameter
m-tmatma Sep 23, 2023
dadcf60
Add a subsection for timerfd
AA-Turner Sep 23, 2023
6a77a1b
Rephrase closing
AA-Turner Sep 23, 2023
9d78861
Merge select into the read list, rephrase read
AA-Turner Sep 23, 2023
24ae1d9
3.3 -> 3.13
AA-Turner Sep 23, 2023
552638f
Explain the trigger of system clock change.
m-tmatma Sep 24, 2023
8fde913
Explain error on non-blocking fd.
m-tmatma Sep 24, 2023
f417c7c
add description
m-tmatma Sep 24, 2023
4460475
fix sample
m-tmatma Sep 24, 2023
ae8c3da
update sample
m-tmatma Sep 24, 2023
4aeb95e
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Sep 29, 2023
f06e352
fix indent
m-tmatma Sep 29, 2023
b8e3b23
limit less than 80 chars in a line
m-tmatma Sep 30, 2023
ed34c2c
add comment
m-tmatma Sep 30, 2023
3fc0a5a
Update Modules/posixmodule.c
m-tmatma Oct 1, 2023
4783a13
Use const
m-tmatma Oct 1, 2023
7919b09
Confirm non-blocking fd
m-tmatma Oct 1, 2023
b2ad6c8
define an utility function
m-tmatma Oct 1, 2023
da47484
rename variable
m-tmatma Oct 1, 2023
3661045
check if fd is not inheritable
m-tmatma Oct 1, 2023
6d1e7c7
reorder socket creation
m-tmatma Oct 1, 2023
69897fc
fix comment
m-tmatma Oct 1, 2023
5c78372
create _PyTime_FromSecondsDouble and use _PyTime_AsTimespec
m-tmatma Oct 1, 2023
62782bc
use _PyTime_AsTimespec
m-tmatma Oct 1, 2023
4ff50a3
use _PyTime_FromTimespec and Py_BuildValue
m-tmatma Oct 2, 2023
dc15134
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Oct 2, 2023
92b7a32
use pytime_from_double to implement _PyTime_FromSecondsDouble
m-tmatma Oct 2, 2023
f4b9865
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Oct 2, 2023
e0f5d7c
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Oct 5, 2023
6f1d788
add error check
m-tmatma Oct 5, 2023
64331c4
fix error handling
m-tmatma Oct 5, 2023
637c746
rename variable
m-tmatma Oct 5, 2023
a7e501b
fix warnings
m-tmatma Oct 5, 2023
ed8a8c7
remove extra docstring
m-tmatma Oct 5, 2023
750110a
move samples to HOWTO
m-tmatma Oct 5, 2023
ccaf48d
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Oct 6, 2023
b334a73
move common code to a utility function
m-tmatma Oct 6, 2023
265ea56
add rounding parameter to _PyTime_FromSecondsDouble
m-tmatma Oct 6, 2023
945ef3c
Merge branch 'main' into feature/os.timerfd_xxx
m-tmatma Oct 7, 2023
6eefda5
replace HAVE_TIMERFD_API with HAVE_TIMERFD_CREATE
m-tmatma Oct 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
419 changes: 419 additions & 0 deletions Doc/library/os.rst

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ opcode
documented or exposed through ``dis``, and were not intended to be
used externally.

os
--

* Add a low level interface for Linux's timer notification file descriptors
via :func:`os.timerfd_create`,
:func:`os.timerfd_settime`, :func:`os.timerfd_settime_ns`,
:func:`os.timerfd_gettime`, and :func:`os.timerfd_gettime_ns`,
:const:`os.TFD_NONBLOCK`, :const:`os.TFD_CLOEXEC`,
:const:`os.TFD_TIMER_ABSTIME`, and :const:`os.TFD_TIMER_CANCEL_ON_SET`
(Contributed by Masaru Tsuchiyama in :gh:`108277`.)

pathlib
-------

Expand Down
1 change: 1 addition & 0 deletions Include/internal/pycore_global_objects_fini_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Include/internal/pycore_global_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(instructions)
STRUCT_FOR_ID(intern)
STRUCT_FOR_ID(intersection)
STRUCT_FOR_ID(interval)
STRUCT_FOR_ID(is_running)
STRUCT_FOR_ID(isatty)
STRUCT_FOR_ID(isinstance)
Expand Down
1 change: 1 addition & 0 deletions Include/internal/pycore_runtime_init_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Include/internal/pycore_unicodeobject_generated.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.