◐ Shell
clean mode source ↗

gh-131666: mark `anext_awaitable.close` as a `METH_NOARGS` instead of `METH_VARARGS` by picnixz · Pull Request #131671 · python/cpython

Conversation

@picnixz

@picnixz picnixz commented

Mar 24, 2025

edited by bedevere-app Bot

Loading

kumaraditya303

@picnixz picnixz deleted the fix/await/anextawaitable-close-131666 branch

March 25, 2025 05:21

graingert

return self

anext_awaitable = anext(A(), "a").__await__()
self.assertRaises(TypeError, anext_awaitable.close, 1)

Choose a reason for hiding this comment

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

this results in an unawaited coroutine warning

Choose a reason for hiding this comment

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

diegorusso pushed a commit to diegorusso/cpython that referenced this pull request

Apr 1, 2025