Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(517)

#28003: PEP 525 asynchronous generators implementation

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 1 month ago by yselivanov
Modified:
1 year, 1 month ago
Reviewers:
victor.stinner
CC:
haypo, lukasz.langa, devnull_psf.upfronthosting.co.za, Martin Panter, Yury Selivanov
Visibility:
Public.

Patch Set 1 #

Total comments: 60
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Include/ceval.h View 1 chunk +4 lines, -0 lines 0 comments Download
Include/code.h View 1 chunk +1 line, -0 lines 0 comments Download
Include/genobject.h View 1 chunk +24 lines, -0 lines 2 comments Download
Include/pylifecycle.h View 1 chunk +1 line, -0 lines 0 comments Download
Include/pystate.h View 1 chunk +3 lines, -0 lines 1 comment Download
Include/symtable.h View 1 chunk +1 line, -0 lines 0 comments Download
Lib/asyncio/base_events.py View 6 chunks +52 lines, -1 line 8 comments Download
Lib/asyncio/coroutines.py View 1 chunk +4 lines, -1 line 0 comments Download
Lib/asyncio/events.py View 1 chunk +7 lines, -0 lines 1 comment Download
Lib/dis.py View 1 chunk +1 line, -0 lines 0 comments Download
Lib/inspect.py View 1 chunk +7 lines, -0 lines 0 comments Download
Lib/test/test_coroutines.py View 1 chunk +0 lines, -6 lines 0 comments Download
Lib/test/test_dis.py View 1 chunk +1 line, -1 line 0 comments Download
Lib/test/test_inspect.py View 4 chunks +11 lines, -1 line 0 comments Download
Lib/types.py View 1 chunk +4 lines, -0 lines 1 comment Download
Modules/gcmodule.c View 1 chunk +1 line, -0 lines 0 comments Download
Objects/genobject.c View 17 chunks +937 lines, -38 lines 46 comments Download
Python/ceval.c View 7 chunks +85 lines, -31 lines 1 comment Download
Python/compile.c View 4 chunks +8 lines, -5 lines 0 comments Download
Python/pylifecycle.c View 1 chunk +1 line, -0 lines 0 comments Download
Python/pystate.c View 2 chunks +5 lines, -0 lines 0 comments Download
Python/symtable.c View 4 chunks +4 lines, -2 lines 0 comments Download
Python/sysmodule.c View 3 chunks +119 lines, -0 lines 0 comments Download

Messages

Total messages: 4
haypo
http://bugs.python.org/review/28003/diff/18396/Include/genobject.h File Include/genobject.h (right): http://bugs.python.org/review/28003/diff/18396/Include/genobject.h#newcode70 Include/genobject.h:70: int ag_hooks_inited; Can you please add a short comment ...
1 year, 1 month ago #1
haypo
http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c File Objects/genobject.c (right): http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1210 Objects/genobject.c:1210: AwaitableState aw_state; where does "aw" prefix come from? I ...
1 year, 1 month ago #2
haypo
Please write a write stupid unit test in test_sys for the new get/set function. http://bugs.python.org/review/28003/diff/18396/Python/ceval.c ...
1 year, 1 month ago #3
Yury Selivanov
1 year, 1 month ago #4
Fixed most of the stuff. Thanks Victor!

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c
File Objects/genobject.c (right):

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode105
Objects/genobject.c:105: if (PyAsyncGen_CheckExact(gen)) {
done

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode119
Objects/genobject.c:119: gen_chain_runtime_error(const char *msg)
added a TODO to maybe fix later

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode154
Objects/genobject.c:154: } else if (PyAsyncGen_CheckExact(gen)) {
fixed

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode245
Objects/genobject.c:245: const int strict_gen_flags = CO_FUTURE_GENERATOR_STOP |
fixed

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode293
Objects/genobject.c:293: ) {
fixed

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode465
Objects/genobject.c:465: ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb);
Fixed

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1210
Objects/genobject.c:1210: AwaitableState aw_state;
done

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1218
Objects/genobject.c:1218: AwaitableState ac_state;
fixed

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1224
Objects/genobject.c:1224: PyObject *val;
Fixed

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1238
Objects/genobject.c:1238: static _PyAsyncGenWrappedValue
*ag_value_fl[_PyAsyncGen_MAXFREELIST];
done

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1262
Objects/genobject.c:1262: return PyUnicode_FromFormat("<async_generator object
%S at %p>",
On 2016/09/09 05:55:24, haypo wrote:
> I suggest %R on ag_qualname to get quotes.

Trying to be consistent with generator.__repr__ here

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1268
Objects/genobject.c:1268: async_gen_init_finalizer(PyAsyncGenObject *o)
fixed/renamed

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1439
Objects/genobject.c:1439: PyObject *
Yes, they are used from eval and pylifecycle

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1507
Objects/genobject.c:1507: Py_DECREF(result);
good catch

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1669
Objects/genobject.c:1669: }
fixed

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1739
Objects/genobject.c:1739: _PyAsyncGenWrapValue(PyObject *val)
fixed

http://bugs.python.org/review/28003/diff/18396/Objects/genobject.c#newcode1747
Objects/genobject.c:1747: assert(_PyAsyncGenWrappedValue_CheckExact(o));
Let's keep it there for some time ;) we can remove it later
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7