Skip to content

Commit a770216

Browse files
authored
Make stubtest work better on macOS (#10263)
1 parent f8dfacb commit a770216

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

stdlib/fcntl.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ if sys.platform != "win32":
2020
F_SETOWN: int
2121
F_UNLCK: int
2222
F_WRLCK: int
23+
24+
F_GETLEASE: int
25+
F_SETLEASE: int
2326
if sys.platform == "darwin":
2427
F_FULLFSYNC: int
2528
F_NOCACHE: int
@@ -30,11 +33,9 @@ if sys.platform != "win32":
3033
F_SETSIG: int
3134
F_SHLCK: int
3235
F_SETLK64: int
33-
F_SETLEASE: int
3436
F_GETSIG: int
3537
F_NOTIFY: int
3638
F_EXLCK: int
37-
F_GETLEASE: int
3839
F_GETLK64: int
3940
if sys.version_info >= (3, 8):
4041
F_ADD_SEALS: int

tests/stubtest_allowlists/darwin-py311.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ socket.TCP_CONNECTION_INFO
77
(dbm.gnu)?
88
(locale.bind_textdomain_codeset)?
99
(locale.bindtextdomain)?
10-
(locale.dcgettext)
10+
(locale.dcgettext)?
1111
(locale.dgettext)?
1212
(locale.gettext)?
1313
(locale.textdomain)?

tests/stubtest_allowlists/darwin-py312.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ xxlimited.Xxo.x_exports
4343
(dbm.gnu)?
4444
(locale.bind_textdomain_codeset)?
4545
(locale.bindtextdomain)?
46-
(locale.dcgettext)
46+
(locale.dcgettext)?
4747
(locale.dgettext)?
4848
(locale.gettext)?
4949
(locale.textdomain)?

tests/stubtest_allowlists/darwin.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ os.SF_NODISKIO
77
os.SF_SYNC
88
(os|posix).sched_param # system dependent. Unclear if macos has it.
99
posix.EX_NOTFOUND
10-
readline.append_history_file # not defined in macos
1110
select.KQ_FILTER_NETDEV # system dependent
1211
select.kqueue.__init__ # default C signature is wrong
1312
select.POLLMSG # system dependent
@@ -20,6 +19,9 @@ select.POLLMSG # system dependent
2019
(os.pwritev)?
2120
(posix.preadv)?
2221
(posix.pwritev)?
22+
(readline.append_history_file)?
23+
(fcntl.F_GETLEASE)?
24+
(fcntl.F_SETLEASE)?
2325

2426
# Platform differences that cannot be captured by the type system
2527
(posix.O_[A-Z_]+)?

0 commit comments

Comments
 (0)