Skip to content

Commit fb2ef88

Browse files
committed
fix gevent imports and update required version
1 parent d923624 commit fb2ef88

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

stubs/gevent/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version = "25.9.*"
22
upstream_repository = "https://github.com/gevent/gevent"
3-
requires = ["types-greenlet", "types-psutil"]
3+
requires = ["types-greenlet", "types-psutil>=7.2.0"]
44

55
[tool.stubtest]
66
# Run stubtest on all platforms, since there is some platform specific stuff

stubs/gevent/gevent/events.pyi

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import sys
21
from collections.abc import Callable, Mapping, Sequence
32
from types import ModuleType
43
from typing import Any, Protocol, TypeVar, type_check_only
54
from typing_extensions import TypeAlias
65

76
from gevent.hub import Hub
87
from greenlet import greenlet as greenlet_t
8+
from psutil._ntuples import pmem
99

1010
_T = TypeVar("_T")
1111
# FIXME: While it would be nice to import Interface from zope.interface here so the
@@ -17,17 +17,6 @@ Interface: TypeAlias = Any
1717

1818
def implementer(interface: Interface, /) -> Callable[[_T], _T]: ...
1919

20-
# this is copied from types-psutil, it would be nice if we could just import this
21-
# but it doesn't seem like we can...
22-
if sys.platform == "linux":
23-
from psutil._pslinux import pmem
24-
elif sys.platform == "darwin":
25-
from psutil._psosx import pmem
26-
elif sys.platform == "win32":
27-
from psutil._pswindows import pmem
28-
else:
29-
class pmem(Any): ...
30-
3120
subscribers: list[Callable[[Any], object]]
3221

3322
@type_check_only

0 commit comments

Comments
 (0)