diff --git a/stubs/gevent/@tests/stubtest_allowlist.txt b/stubs/gevent/@tests/stubtest_allowlist.txt index ed67e0945e91..c04b281d9602 100644 --- a/stubs/gevent/@tests/stubtest_allowlist.txt +++ b/stubs/gevent/@tests/stubtest_allowlist.txt @@ -1,5 +1,4 @@ # TODO: missing from stub -gevent.os.__all__ gevent.socket.__all__ gevent.ssl.__all__ gevent.subprocess.__all__ diff --git a/stubs/gevent/gevent/os.pyi b/stubs/gevent/gevent/os.pyi index ac7d0cf0b976..62862274641d 100644 --- a/stubs/gevent/gevent/os.pyi +++ b/stubs/gevent/gevent/os.pyi @@ -6,6 +6,25 @@ from typing import Literal from gevent._types import _ChildWatcher, _Loop +__all__ = ["tp_read", "tp_write"] + +if sys.platform != "win32": + __all__ += [ + "close", + "fork", + "fork_and_watch", + "fork_gevent", + "forkpty", + "forkpty_and_watch", + "forkpty_gevent", + "make_nonblocking", + "nb_read", + "nb_write", + "posix_spawn", + "posix_spawnp", + "waitpid", + ] + def tp_read(fd: FileDescriptor, n: int) -> bytes: ... def tp_write(fd: FileDescriptor, buf: ReadableBuffer) -> int: ...