Mark Future._callbacks as a @property (#7829)

This commit is contained in:
Rick Voormolen
2022-05-11 11:13:29 +02:00
committed by GitHub
parent a27f15ef0e
commit 693c4f19b4
5 changed files with 1 additions and 8 deletions

View File

@@ -55,6 +55,7 @@ class Future(Awaitable[_T], Iterable[_T]):
def __del__(self) -> None: ...
if sys.version_info >= (3, 7):
def get_loop(self) -> AbstractEventLoop: ...
@property
def _callbacks(self: Self) -> list[tuple[Callable[[Self], Any], Context]]: ...
def add_done_callback(self: Self, __fn: Callable[[Self], Any], *, context: Context | None = ...) -> None: ...
else:

View File

@@ -34,9 +34,7 @@ ast.NameConstant.__new__
ast.Num.__new__
ast.Str.__new__
asyncio.Future.__init__ # Usually initialized from c object
asyncio.Future._callbacks # Usually initialized from c object
asyncio.futures.Future.__init__ # Usually initialized from c object
asyncio.futures.Future._callbacks # Usually initialized from c object
builtins.dict.get
builtins.float.__setformat__ # Internal method for CPython test suite
builtins.property.__set_name__ # Doesn't actually exist

View File

@@ -6,9 +6,7 @@ _dummy_threading
asyncio.AbstractEventLoop.run_in_executor # allowed to return a Future, changed in 3.8
asyncio.events.AbstractEventLoop.run_in_executor # allowed to return a Future, changed in 3.8
asyncio.Future.__init__ # Usually initialized from c object
asyncio.Future._callbacks # Usually initialized from c object
asyncio.futures.Future.__init__ # Usually initialized from c object
asyncio.futures.Future._callbacks # Usually initialized from c object
asyncio.locks._ContextManagerMixin.__enter__ # Always raises; deliberately omitted from the stub
asyncio.locks._ContextManagerMixin.__exit__ # Always raises; deliberately omitted from the stub
asyncio.transports.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself

View File

@@ -12,9 +12,7 @@ ast.NameConstant.__new__
ast.Num.__new__
ast.Str.__new__
asyncio.Future.__init__ # Usually initialized from c object
asyncio.Future._callbacks # Usually initialized from c object
asyncio.futures.Future.__init__ # Usually initialized from c object
asyncio.futures.Future._callbacks # Usually initialized from c object
asyncio.locks._ContextManagerMixin.__enter__ # Always raises; deliberately omitted from the stub
asyncio.locks._ContextManagerMixin.__exit__ # Always raises; deliberately omitted from the stub
asyncio.transports.WriteTransport.get_write_buffer_limits # Documented. Exists in subclasses, but not in WriteTransport itself

View File

@@ -16,9 +16,7 @@ ast.NameConstant.__new__
ast.Num.__new__
ast.Str.__new__
asyncio.Future.__init__ # Usually initialized from c object
asyncio.Future._callbacks # Usually initialized from c object
asyncio.futures.Future.__init__ # Usually initialized from c object
asyncio.futures.Future._callbacks # Usually initialized from c object
builtins.dict.get
builtins.float.__setformat__ # Internal method for CPython test suite
collections.AsyncGenerator.asend # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.