Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stdlib/VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ array: 2.7-
ast: 2.7-
asynchat: 2.7-
asyncio: 3.4-
asyncio.mixins: 3.10-
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sobolevn In theory, mypy should support this: python/mypy#11069, but in practice, asyncio.exceptions is also ignored in the stubtest allowlists. You need to do the same with asyncio.mixins for now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asyncore: 2.7-
atexit: 2.7-
audioop: 2.7-
Expand Down
8 changes: 8 additions & 0 deletions stdlib/asyncio/mixins.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import threading
from typing import Any

_global_lock: threading.Lock
_marker: object

class _LoopBoundMixin:
def __init__(self, *, loop: Any = ...) -> None: ...
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should just skip the loop argument, It can't really be used. Then we can also remove _marker above.