Add mixins module to asyncio#6789
Conversation
|
I am checking what CI will say about adding module to |
|
This module does not have any public objects, but we can still add several protected ones. I don't know how they are supposed to be used though. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
| ast: 2.7- | ||
| asynchat: 2.7- | ||
| asyncio: 3.4- | ||
| asyncio.mixins: 3.10- |
There was a problem hiding this comment.
stubtest is still failing for <3.9 🤔
https://github.com/python/typeshed/runs/4686388253?check_suite_focus=true
There was a problem hiding this comment.
@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.
|
@srittau @Akuli can you please help me? I don't understand why tests fail: It happens on all python versions |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
AlexWaygood
left a comment
There was a problem hiding this comment.
Could you update the classes in asyncio.locks and asyncio.queues so that they inherit from _LoopBoundMixin, as they do at runtime?
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
stdlib/asyncio/mixins.pyi
Outdated
| _marker: object | ||
|
|
||
| class _LoopBoundMixin: | ||
| def __init__(self, *, loop: Any = ...) -> None: ... |
There was a problem hiding this comment.
Maybe we should just skip the loop argument, It can't really be used. Then we can also remove _marker above.
srittau
left a comment
There was a problem hiding this comment.
See my comment above, but I'm fine either way.
|
@AlexWaygood sure, in an hour 👍 |
This comment has been minimized.
This comment has been minimized.
|
I went for
And also, looks like the change proposed by @AlexWaygood will require some extra tweaks, so I am going to leave this for some next PRs (while thinking about the best way to implement it). |
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
No description provided.