Skip to content
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

Missing context parameter in call_* methods of asyncio.events.AbstractEventLoop #93255

Closed
d-maurer opened this issue May 26, 2022 · 2 comments
Closed
Labels
3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@d-maurer
Copy link

asyncio.events.AbstractEventLoop defines its call_* methods via:

    def call_soon(self, callback, *args):
        return self.call_later(0, callback, *args)

    def call_later(self, delay, callback, *args):
        raise NotImplementedError

    def call_at(self, when, callback, *args):
        raise NotImplementedError

But futures.Future (e.g.) expects call_soon to have a context parameter:

    def __schedule_callbacks(self):
        ...
        for callback, ctx in callbacks:
            self._loop.call_soon(callback, self, context=ctx)

Seen in Python 3.9 through 3.11.

@d-maurer d-maurer added the type-bug An unexpected behavior, bug, or error label May 26, 2022
@AA-Turner AA-Turner added topic-asyncio 3.11 only security fixes 3.10 only security fixes 3.9 only security fixes labels May 26, 2022
@ezio-melotti ezio-melotti moved this to Todo in asyncio Jul 17, 2022
@kumaraditya303
Copy link
Contributor

PR welcome!

@kumaraditya303 kumaraditya303 added 3.12 bugs and security fixes and removed 3.9 only security fixes labels Aug 28, 2022
@gvanrossum
Copy link
Member

No, it was already fixed by GH-30427 and GH-30430.

Repository owner moved this from Todo to Done in asyncio Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes topic-asyncio type-bug An unexpected behavior, bug, or error
Projects
Status: Done
Development

No branches or pull requests

4 participants