This repository was archived by the owner on Dec 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +77
-58
lines changed
tests/stubtest_allowlists Expand file tree Collapse file tree 3 files changed +77
-58
lines changed Original file line number Diff line number Diff line change @@ -6,80 +6,100 @@ from typing_extensions import Literal
6
6
if sys .platform != "win32" :
7
7
FASYNC : int
8
8
FD_CLOEXEC : int
9
- DN_ACCESS : int
10
- DN_ATTRIB : int
11
- DN_CREATE : int
12
- DN_DELETE : int
13
- DN_MODIFY : int
14
- DN_MULTISHOT : int
15
- DN_RENAME : int
16
9
F_DUPFD : int
17
10
F_DUPFD_CLOEXEC : int
18
- F_FULLFSYNC : int
19
- F_EXLCK : int
20
11
F_GETFD : int
21
12
F_GETFL : int
22
- F_GETLEASE : int
23
13
F_GETLK : int
24
- F_GETLK64 : int
25
14
F_GETOWN : int
26
- F_NOCACHE : int
27
- F_GETSIG : int
28
- F_NOTIFY : int
29
15
F_RDLCK : int
30
16
F_SETFD : int
31
17
F_SETFL : int
32
- F_SETLEASE : int
33
18
F_SETLK : int
34
- F_SETLK64 : int
35
19
F_SETLKW : int
36
- F_SETLKW64 : int
37
- if sys .version_info >= (3 , 9 ) and sys .platform == "linux" :
38
- F_OFD_GETLK : int
39
- F_OFD_SETLK : int
40
- F_OFD_SETLKW : int
41
20
F_SETOWN : int
42
- F_SETSIG : int
43
- F_SHLCK : int
44
21
F_UNLCK : int
45
22
F_WRLCK : int
46
- I_ATMARK : int
47
- I_CANPUT : int
48
- I_CKBAND : int
49
- I_FDINSERT : int
50
- I_FIND : int
51
- I_FLUSH : int
52
- I_FLUSHBAND : int
53
- I_GETBAND : int
54
- I_GETCLTIME : int
55
- I_GETSIG : int
56
- I_GRDOPT : int
57
- I_GWROPT : int
58
- I_LINK : int
59
- I_LIST : int
60
- I_LOOK : int
61
- I_NREAD : int
62
- I_PEEK : int
63
- I_PLINK : int
64
- I_POP : int
65
- I_PUNLINK : int
66
- I_PUSH : int
67
- I_RECVFD : int
68
- I_SENDFD : int
69
- I_SETCLTIME : int
70
- I_SETSIG : int
71
- I_SRDOPT : int
72
- I_STR : int
73
- I_SWROPT : int
74
- I_UNLINK : int
23
+ if sys .platform == "darwin" :
24
+ F_FULLFSYNC : int
25
+ F_NOCACHE : int
26
+ if sys .version_info >= (3 , 9 ):
27
+ F_GETPATH : int
28
+ if sys .platform == "linux" :
29
+ F_SETLKW64 : int
30
+ F_SETSIG : int
31
+ F_SHLCK : int
32
+ F_SETLK64 : int
33
+ F_SETLEASE : int
34
+ F_GETSIG : int
35
+ F_NOTIFY : int
36
+ F_EXLCK : int
37
+ F_GETLEASE : int
38
+ F_GETLK64 : int
39
+ if sys .version_info >= (3 , 8 ):
40
+ F_ADD_SEALS : int
41
+ F_GET_SEALS : int
42
+ F_SEAL_GROW : int
43
+ F_SEAL_SEAL : int
44
+ F_SEAL_SHRINK : int
45
+ F_SEAL_WRITE : int
46
+ if sys .version_info >= (3 , 9 ):
47
+ F_OFD_GETLK : int
48
+ F_OFD_SETLK : int
49
+ F_OFD_SETLKW : int
50
+ if sys .version_info >= (3 , 10 ):
51
+ F_GETPIPE_SZ : int
52
+ F_SETPIPE_SZ : int
53
+
54
+ DN_ACCESS : int
55
+ DN_ATTRIB : int
56
+ DN_CREATE : int
57
+ DN_DELETE : int
58
+ DN_MODIFY : int
59
+ DN_MULTISHOT : int
60
+ DN_RENAME : int
61
+
75
62
LOCK_EX : int
76
- LOCK_MAND : int
77
63
LOCK_NB : int
78
- LOCK_READ : int
79
- LOCK_RW : int
80
64
LOCK_SH : int
81
65
LOCK_UN : int
82
- LOCK_WRITE : int
66
+ if sys .platform == "linux" :
67
+ LOCK_MAND : int
68
+ LOCK_READ : int
69
+ LOCK_RW : int
70
+ LOCK_WRITE : int
71
+
72
+ # These are highly problematic, they might be present or not, depends on the specific OS.
73
+ if sys .platform == "linux" :
74
+ I_ATMARK : int
75
+ I_CANPUT : int
76
+ I_CKBAND : int
77
+ I_FDINSERT : int
78
+ I_FIND : int
79
+ I_FLUSH : int
80
+ I_FLUSHBAND : int
81
+ I_GETBAND : int
82
+ I_GETCLTIME : int
83
+ I_GETSIG : int
84
+ I_GRDOPT : int
85
+ I_GWROPT : int
86
+ I_LINK : int
87
+ I_LIST : int
88
+ I_LOOK : int
89
+ I_NREAD : int
90
+ I_PEEK : int
91
+ I_PLINK : int
92
+ I_POP : int
93
+ I_PUNLINK : int
94
+ I_PUSH : int
95
+ I_RECVFD : int
96
+ I_SENDFD : int
97
+ I_SETCLTIME : int
98
+ I_SETSIG : int
99
+ I_SRDOPT : int
100
+ I_STR : int
101
+ I_SWROPT : int
102
+ I_UNLINK : int
83
103
@overload
84
104
def fcntl (__fd : FileDescriptorLike , __cmd : int , __arg : int = ...) -> int : ...
85
105
@overload
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ ossaudiodev
33
33
spwd
34
34
35
35
# Platform differences that cannot be captured by the type system
36
- fcntl.[A-Z0-9_]+
37
36
os.SCHED_[A-Z_]+
38
37
posix.SCHED_[A-Z_]+
39
38
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ posix.error.characters_written
36
36
resource.error.characters_written
37
37
38
38
# Platform differences that cannot be captured by the type system
39
- fcntl.[A-Z0-9_]+
39
+ fcntl.I_ [A-Z0-9_]+
40
40
os.SCHED_[A-Z_]+
41
41
posix.SCHED_[A-Z_]+
42
42
You can’t perform that action at this time.
0 commit comments