mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-07 05:54:02 +08:00
Resolve _asyncio issues (#14089)
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
# ====================================================================
|
||||
|
||||
_asyncio.all_tasks
|
||||
_asyncio.future_add_to_awaited_by
|
||||
_asyncio.future_discard_from_awaited_by
|
||||
_heapq.heapify_max
|
||||
_heapq.heappop_max
|
||||
_heapq.heappush_max
|
||||
|
||||
@@ -103,3 +103,7 @@ def _leave_task(loop: AbstractEventLoop, task: Task[Any]) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
def current_task(loop: AbstractEventLoop | None = None) -> Task[Any] | None: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def future_discard_from_awaited_by(future: Future[Any], waiter: Future[Any], /) -> None: ...
|
||||
def future_add_to_awaited_by(future: Future[Any], waiter: Future[Any], /) -> None: ...
|
||||
|
||||
@@ -8,6 +8,8 @@ from .events import AbstractEventLoop
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 14):
|
||||
from _asyncio import future_add_to_awaited_by, future_discard_from_awaited_by
|
||||
|
||||
__all__ = ("Future", "wrap_future", "isfuture", "future_discard_from_awaited_by", "future_add_to_awaited_by")
|
||||
else:
|
||||
__all__ = ("Future", "wrap_future", "isfuture")
|
||||
@@ -19,7 +21,3 @@ _T = TypeVar("_T")
|
||||
# That's why the import order is reversed.
|
||||
def isfuture(obj: object) -> TypeIs[Future[Any]]: ...
|
||||
def wrap_future(future: _ConcurrentFuture[_T] | Future[_T], *, loop: AbstractEventLoop | None = None) -> Future[_T]: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def future_discard_from_awaited_by(future: Future[Any], waiter: Future[Any], /) -> None: ...
|
||||
def future_add_to_awaited_by(future: Future[Any], waiter: Future[Any], /) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user