-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add mixins module to asyncio
#6789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
srittau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.