Issue 24510: Make _PyCoro_GetAwaitableIter a public API (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/68698

classification

Title: Make _PyCoro_GetAwaitableIter a public API
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.6

process

Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: yselivanov Nosy List: gvanrossum, mdcb808@gmail.com, ncoghlan, scoder, vstinner, yselivanov
Priority: normal Keywords:

Created on 2015-06-25 15:35 by yselivanov, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg245812 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-06-25 15:35
We should consider making _PyCoro_GetAwaitableIter(o) a public API. Its implementation isn't trivial because it's not around simply accessing 'tp_as_async->am_await'. You also need to check is 'o' is a generator with a CO_ITERABLE_COROUTINE or a CoroObject, etc.
msg245817 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-06-25 15:55
It looks like the code is currently moving fast. I suggest to wait until Python 3.6 to stabilize the Python C API for async/await.
msg245818 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-06-25 16:05
> It looks like the code is currently moving fast. [..] Yeah, that's my feeling too, I don't want to rush things too much. Unless Guido, Nick and you are in complete agreement that we need this, we should postpone till 3.6.
msg245837 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2015-06-26 07:40
+1 for deferring to 3.6 (version field adjusted accordingly) One nice aspect of marking private APIs by convention rather than having them enforced by the compiler is that the folks that *really* need them can ignore our recommendation and accept the fact they may need to adapt their code to account for backwards incompatible changes.
msg276617 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2016-09-15 20:47
Closing this one as no one has requested this for 2 years.
History
Date User Action Args
2022-04-11 14:58:18 admin set github: 68698
2016-09-15 20:47:55 yselivanov set status: open -> closedresolution: wont fixmessages: + stage: resolved
2016-05-24 18:43:43 mdcb808@gmail.com set nosy: + mdcb808@gmail.com
2015-06-26 07:40:39 ncoghlan set messages: + versions: - Python 3.5
2015-06-25 16:05:54 yselivanov set messages: +
2015-06-25 15:55:09 vstinner set messages: +
2015-06-25 15:35:58 yselivanov create