8000 bpo-32591: _PyErr_WarnUnawaitedCoroutine() sets source by vstinner · Pull Request #19247 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-32591: _PyErr_WarnUnawaitedCoroutine() sets source #19247

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

Merged
merged 1 commit into from
Mar 31, 2020
Merged

bpo-32591: _PyErr_WarnUnawaitedCoroutine() sets source #19247

merged 1 commit into from
Mar 31, 2020

Conversation

vstinner
Copy link
Member
@vstinner vstinner commented Mar 31, 2020

The _PyErr_WarnUnawaitedCoroutine() fallback now also sets the
coroutine object as the source of the warning, as done by the Python
implementation warnings._warn_unawaited_coroutine().

Moreover, don't truncate the coroutine name: Python supports
arbitrary string length to format the message.

https://bugs.python.org/issue32591

The _PyErr_WarnUnawaitedCoroutine() fallback now also sets the
coroutine object as the source of the warning, as done by the Python
implementation warnings._warn_unawaited_coroutine().

Moreover, don't truncate the coroutine name: Python supports
arbitrary string length to format the message.
@vstinner vstinner merged commit 8d84adc into python:master Mar 31, 2020
@vstinner vstinner deleted the warn_unawaited_coro_c branch March 31, 2020 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0