cpython/Python/importlib_external.h

2597 lines
136 KiB
C
Raw Normal View History

/* Auto-generated by Programs/_freeze_importlib.c */
const unsigned char _Py_M__importlib_external[] = {
99,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,
0,64,0,0,0,115,228,2,0,0,100,0,0,90,0,0,
100,96,0,90,1,0,100,4,0,100,5,0,132,0,0,90,
2,0,100,6,0,100,7,0,132,0,0,90,3,0,100,8,
0,100,9,0,132,0,0,90,4,0,100,10,0,100,11,0,
132,0,0,90,5,0,100,12,0,100,13,0,132,0,0,90,
6,0,100,14,0,100,15,0,132,0,0,90,7,0,100,16,
0,100,17,0,132,0,0,90,8,0,100,18,0,100,19,0,
132,0,0,90,9,0,100,20,0,100,21,0,132,0,0,90,
10,0,100,22,0,100,23,0,100,24,0,132,1,0,90,11,
0,101,12,0,101,11,0,106,13,0,131,1,0,90,14,0,
100,25,0,106,15,0,100,26,0,100,27,0,131,2,0,100,
28,0,23,90,16,0,101,17,0,106,18,0,101,16,0,100,
27,0,131,2,0,90,19,0,100,29,0,90,20,0,100,30,
0,90,21,0,100,31,0,103,1,0,90,22,0,100,32,0,
103,1,0,90,23,0,101,23,0,4,90,24,0,90,25,0,
100,33,0,100,34,0,100,33,0,100,35,0,100,36,0,132,
1,1,90,26,0,100,37,0,100,38,0,132,0,0,90,27,
0,100,39,0,100,40,0,132,0,0,90,28,0,100,41,0,
100,42,0,132,0,0,90,29,0,100,43,0,100,44,0,132,
0,0,90,30,0,100,45,0,100,46,0,100,47,0,100,48,
0,132,0,1,90,31,0,100,49,0,100,50,0,132,0,0,
90,32,0,100,51,0,100,52,0,132,0,0,90,33,0,100,
33,0,100,33,0,100,33,0,100,53,0,100,54,0,132,3,
0,90,34,0,100,33,0,100,33,0,100,33,0,100,55,0,
100,56,0,132,3,0,90,35,0,100,57,0,100,57,0,100,
58,0,100,59,0,132,2,0,90,36,0,100,60,0,100,61,
0,132,0,0,90,37,0,101,38,0,131,0,0,90,39,0,
100,33,0,100,62,0,100,33,0,100,63,0,101,39,0,100,
64,0,100,65,0,132,1,2,90,40,0,71,100,66,0,100,
67,0,132,0,0,100,67,0,131,2,0,90,41,0,71,100,
68,0,100,69,0,132,0,0,100,69,0,131,2,0,90,42,
0,71,100,70,0,100,71,0,132,0,0,100,71,0,101,42,
0,131,3,0,90,43,0,71,100,72,0,100,73,0,132,0,
0,100,73,0,131,2,0,90,44,0,71,100,74,0,100,75,
0,132,0,0,100,75,0,101,44,0,101,43,0,131,4,0,
90,45,0,71,100,76,0,100,77,0,132,0,0,100,77,0,
101,44,0,101,42,0,131,4,0,90,46,0,103,0,0,90,
47,0,71,100,78,0,100,79,0,132,0,0,100,79,0,101,
44,0,101,42,0,131,4,0,90,48,0,71,100,80,0,100,
81,0,132,0,0,100,81,0,131,2,0,90,49,0,71,100,
82,0,100,83,0,132,0,0,100,83,0,131,2,0,90,50,
0,71,100,84,0,100,85,0,132,0,0,100,85,0,131,2,
0,90,51,0,71,100,86,0,100,87,0,132,0,0,100,87,
0,131,2,0,90,52,0,100,33,0,100,88,0,100,89,0,
132,1,0,90,53,0,100,90,0,100,91,0,132,0,0,90,
54,0,100,92,0,100,93,0,132,0,0,90,55,0,100,94,
0,100,95,0,132,0,0,90,56,0,100,33,0,83,41,97,
97,94,1,0,0,67,111,114,101,32,105,109,112,108,101,109,
101,110,116,97,116,105,111,110,32,111,102,32,112,97,116,104,
45,98,97,115,101,100,32,105,109,112,111,114,116,46,10,10,
84,104,105,115,32,109,111,100,117,108,101,32,105,115,32,78,
79,84,32,109,101,97,110,116,32,116,111,32,98,101,32,100,
105,114,101,99,116,108,121,32,105,109,112,111,114,116,101,100,
33,32,73,116,32,104,97,115,32,98,101,101,110,32,100,101,
115,105,103,110,101,100,32,115,117,99,104,10,116,104,97,116,
32,105,116,32,99,97,110,32,98,101,32,98,111,111,116,115,
116,114,97,112,112,101,100,32,105,110,116,111,32,80,121,116,
104,111,110,32,97,115,32,116,104,101,32,105,109,112,108,101,
109,101,110,116,97,116,105,111,110,32,111,102,32,105,109,112,
111,114,116,46,32,65,115,10,115,117,99,104,32,105,116,32,
114,101,113,117,105,114,101,115,32,116,104,101,32,105,110,106,
101,99,116,105,111,110,32,111,102,32,115,112,101,99,105,102,
105,99,32,109,111,100,117,108,101,115,32,97,110,100,32,97,
116,116,114,105,98,117,116,101,115,32,105,110,32,111,114,100,
101,114,32,116,111,10,119,111,114,107,46,32,79,110,101,32,
115,104,111,117,108,100,32,117,115,101,32,105,109,112,111,114,
116,108,105,98,32,97,115,32,116,104,101,32,112,117,98,108,
105,99,45,102,97,99,105,110,103,32,118,101,114,115,105,111,
110,32,111,102,32,116,104,105,115,32,109,111,100,117,108,101,
46,10,10,218,3,119,105,110,218,6,99,121,103,119,105,110,
218,6,100,97,114,119,105,110,99,0,0,0,0,0,0,0,
0,1,0,0,0,2,0,0,0,67,0,0,0,115,49,0,
0,0,116,0,0,106,1,0,106,2,0,116,3,0,131,1,
0,114,33,0,100,1,0,100,2,0,132,0,0,125,0,0,
110,12,0,100,3,0,100,2,0,132,0,0,125,0,0,124,
0,0,83,41,4,78,99,0,0,0,0,0,0,0,0,0,
0,0,0,2,0,0,0,83,0,0,0,115,13,0,0,0,
100,1,0,116,0,0,106,1,0,107,6,0,83,41,2,122,
53,84,114,117,101,32,105,102,32,102,105,108,101,110,97,109,
101,115,32,109,117,115,116,32,98,101,32,99,104,101,99,107,
101,100,32,99,97,115,101,45,105,110,115,101,110,115,105,116,
105,118,101,108,121,46,115,12,0,0,0,80,89,84,72,79,
78,67,65,83,69,79,75,41,2,218,3,95,111,115,90,7,
101,110,118,105,114,111,110,169,0,114,4,0,0,0,114,4,
0,0,0,250,38,60,102,114,111,122,101,110,32,105,109,112,
111,114,116,108,105,98,46,95,98,111,111,116,115,116,114,97,
112,95,101,120,116,101,114,110,97,108,62,218,11,95,114,101,
108,97,120,95,99,97,115,101,30,0,0,0,115,2,0,0,
0,0,2,122,37,95,109,97,107,101,95,114,101,108,97,120,
95,99,97,115,101,46,60,108,111,99,97,108,115,62,46,95,
114,101,108,97,120,95,99,97,115,101,99,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,83,0,0,0,115,
4,0,0,0,100,1,0,83,41,2,122,53,84,114,117,101,
32,105,102,32,102,105,108,101,110,97,109,101,115,32,109,117,
115,116,32,98,101,32,99,104,101,99,107,101,100,32,99,97,
115,101,45,105,110,115,101,110,115,105,116,105,118,101,108,121,
46,70,114,4,0,0,0,114,4,0,0,0,114,4,0,0,
0,114,4,0,0,0,114,5,0,0,0,114,6,0,0,0,
34,0,0,0,115,2,0,0,0,0,2,41,4,218,3,115,
121,115,218,8,112,108,97,116,102,111,114,109,218,10,115,116,
97,114,116,115,119,105,116,104,218,27,95,67,65,83,69,95,
73,78,83,69,78,83,73,84,73,86,69,95,80,76,65,84,
70,79,82,77,83,41,1,114,6,0,0,0,114,4,0,0,
0,114,4,0,0,0,114,5,0,0,0,218,16,95,109,97,
107,101,95,114,101,108,97,120,95,99,97,115,101,28,0,0,
0,115,8,0,0,0,0,1,18,1,15,4,12,3,114,11,
0,0,0,99,1,0,0,0,0,0,0,0,1,0,0,0,
3,0,0,0,67,0,0,0,115,26,0,0,0,116,0,0,
124,0,0,131,1,0,100,1,0,64,106,1,0,100,2,0,
100,3,0,131,2,0,83,41,4,122,42,67,111,110,118,101,
114,116,32,97,32,51,50,45,98,105,116,32,105,110,116,101,
103,101,114,32,116,111,32,108,105,116,116,108,101,45,101,110,
100,105,97,110,46,108,3,0,0,0,255,127,255,127,3,0,
233,4,0,0,0,218,6,108,105,116,116,108,101,41,2,218,
3,105,110,116,218,8,116,111,95,98,121,116,101,115,41,1,
218,1,120,114,4,0,0,0,114,4,0,0,0,114,5,0,
0,0,218,7,95,119,95,108,111,110,103,40,0,0,0,115,
2,0,0,0,0,2,114,17,0,0,0,99,1,0,0,0,
0,0,0,0,1,0,0,0,3,0,0,0,67,0,0,0,
115,16,0,0,0,116,0,0,106,1,0,124,0,0,100,1,
0,131,2,0,83,41,2,122,47,67,111,110,118,101,114,116,
32,52,32,98,121,116,101,115,32,105,110,32,108,105,116,116,
108,101,45,101,110,100,105,97,110,32,116,111,32,97,110,32,
105,110,116,101,103,101,114,46,114,13,0,0,0,41,2,114,
14,0,0,0,218,10,102,114,111,109,95,98,121,116,101,115,
41,1,90,9,105,110,116,95,98,121,116,101,115,114,4,0,
0,0,114,4,0,0,0,114,5,0,0,0,218,7,95,114,
95,108,111,110,103,45,0,0,0,115,2,0,0,0,0,2,
114,19,0,0,0,99,0,0,0,0,0,0,0,0,1,0,
0,0,3,0,0,0,71,0,0,0,115,26,0,0,0,116,
0,0,106,1,0,100,1,0,100,2,0,132,0,0,124,0,
0,68,131,1,0,131,1,0,83,41,3,122,31,82,101,112,
108,97,99,101,109,101,110,116,32,102,111,114,32,111,115,46,
112,97,116,104,46,106,111,105,110,40,41,46,99,1,0,0,
0,0,0,0,0,2,0,0,0,4,0,0,0,83,0,0,
0,115,37,0,0,0,103,0,0,124,0,0,93,27,0,125,
1,0,124,1,0,114,6,0,124,1,0,106,0,0,116,1,
0,131,1,0,145,2,0,113,6,0,83,114,4,0,0,0,
41,2,218,6,114,115,116,114,105,112,218,15,112,97,116,104,
95,115,101,112,97,114,97,116,111,114,115,41,2,218,2,46,
48,218,4,112,97,114,116,114,4,0,0,0,114,4,0,0,
0,114,5,0,0,0,250,10,60,108,105,115,116,99,111,109,
112,62,52,0,0,0,115,2,0,0,0,9,1,122,30,95,
112,97,116,104,95,106,111,105,110,46,60,108,111,99,97,108,
115,62,46,60,108,105,115,116,99,111,109,112,62,41,2,218,
8,112,97,116,104,95,115,101,112,218,4,106,111,105,110,41,
1,218,10,112,97,116,104,95,112,97,114,116,115,114,4,0,
0,0,114,4,0,0,0,114,5,0,0,0,218,10,95,112,
97,116,104,95,106,111,105,110,50,0,0,0,115,4,0,0,
0,0,2,15,1,114,28,0,0,0,99,1,0,0,0,0,
0,0,0,5,0,0,0,5,0,0,0,67,0,0,0,115,
134,0,0,0,116,0,0,116,1,0,131,1,0,100,1,0,
107,2,0,114,52,0,124,0,0,106,2,0,116,3,0,131,
1,0,92,3,0,125,1,0,125,2,0,125,3,0,124,1,
0,124,3,0,102,2,0,83,120,69,0,116,4,0,124,0,
0,131,1,0,68,93,55,0,125,4,0,124,4,0,116,1,
0,107,6,0,114,65,0,124,0,0,106,5,0,124,4,0,
100,2,0,100,1,0,131,1,1,92,2,0,125,1,0,125,
3,0,124,1,0,124,3,0,102,2,0,83,113,65,0,87,
100,3,0,124,0,0,102,2,0,83,41,4,122,32,82,101,
112,108,97,99,101,109,101,110,116,32,102,111,114,32,111,115,
46,112,97,116,104,46,115,112,108,105,116,40,41,46,233,1,
0,0,0,90,8,109,97,120,115,112,108,105,116,218,0,41,
6,218,3,108,101,110,114,21,0,0,0,218,10,114,112,97,
114,116,105,116,105,111,110,114,25,0,0,0,218,8,114,101,
118,101,114,115,101,100,218,6,114,115,112,108,105,116,41,5,
218,4,112,97,116,104,90,5,102,114,111,110,116,218,1,95,
218,4,116,97,105,108,114,16,0,0,0,114,4,0,0,0,
114,4,0,0,0,114,5,0,0,0,218,11,95,112,97,116,
104,95,115,112,108,105,116,56,0,0,0,115,16,0,0,0,
0,2,18,1,24,1,10,1,19,1,12,1,27,1,14,1,
114,38,0,0,0,99,1,0,0,0,0,0,0,0,1,0,
0,0,2,0,0,0,67,0,0,0,115,13,0,0,0,116,
0,0,106,1,0,124,0,0,131,1,0,83,41,1,122,126,
83,116,97,116,32,116,104,101,32,112,97,116,104,46,10,10,
32,32,32,32,77,97,100,101,32,97,32,115,101,112,97,114,
97,116,101,32,102,117,110,99,116,105,111,110,32,116,111,32,
109,97,107,101,32,105,116,32,101,97,115,105,101,114,32,116,
111,32,111,118,101,114,114,105,100,101,32,105,110,32,101,120,
112,101,114,105,109,101,110,116,115,10,32,32,32,32,40,101,
46,103,46,32,99,97,99,104,101,32,115,116,97,116,32,114,
101,115,117,108,116,115,41,46,10,10,32,32,32,32,41,2,
114,3,0,0,0,90,4,115,116,97,116,41,1,114,35,0,
0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
0,218,10,95,112,97,116,104,95,115,116,97,116,68,0,0,
0,115,2,0,0,0,0,7,114,39,0,0,0,99,2,0,
0,0,0,0,0,0,3,0,0,0,11,0,0,0,67,0,
0,0,115,58,0,0,0,121,16,0,116,0,0,124,0,0,
131,1,0,125,2,0,87,110,22,0,4,116,1,0,107,10,
0,114,40,0,1,1,1,100,1,0,83,89,110,1,0,88,
124,2,0,106,2,0,100,2,0,64,124,1,0,107,2,0,
83,41,3,122,49,84,101,115,116,32,119,104,101,116,104,101,
114,32,116,104,101,32,112,97,116,104,32,105,115,32,116,104,
101,32,115,112,101,99,105,102,105,101,100,32,109,111,100,101,
32,116,121,112,101,46,70,105,0,240,0,0,41,3,114,39,
0,0,0,218,7,79,83,69,114,114,111,114,218,7,115,116,
95,109,111,100,101,41,3,114,35,0,0,0,218,4,109,111,
100,101,90,9,115,116,97,116,95,105,110,102,111,114,4,0,
0,0,114,4,0,0,0,114,5,0,0,0,218,18,95,112,
97,116,104,95,105,115,95,109,111,100,101,95,116,121,112,101,
78,0,0,0,115,10,0,0,0,0,2,3,1,16,1,13,
1,9,1,114,43,0,0,0,99,1,0,0,0,0,0,0,
0,1,0,0,0,3,0,0,0,67,0,0,0,115,13,0,
0,0,116,0,0,124,0,0,100,1,0,131,2,0,83,41,
2,122,31,82,101,112,108,97,99,101,109,101,110,116,32,102,
111,114,32,111,115,46,112,97,116,104,46,105,115,102,105,108,
101,46,105,0,128,0,0,41,1,114,43,0,0,0,41,1,
114,35,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
5,0,0,0,218,12,95,112,97,116,104,95,105,115,102,105,
108,101,87,0,0,0,115,2,0,0,0,0,2,114,44,0,
0,0,99,1,0,0,0,0,0,0,0,1,0,0,0,3,
0,0,0,67,0,0,0,115,31,0,0,0,124,0,0,115,
18,0,116,0,0,106,1,0,131,0,0,125,0,0,116,2,
0,124,0,0,100,1,0,131,2,0,83,41,2,122,30,82,
101,112,108,97,99,101,109,101,110,116,32,102,111,114,32,111,
115,46,112,97,116,104,46,105,115,100,105,114,46,105,0,64,
0,0,41,3,114,3,0,0,0,218,6,103,101,116,99,119,
100,114,43,0,0,0,41,1,114,35,0,0,0,114,4,0,
0,0,114,4,0,0,0,114,5,0,0,0,218,11,95,112,
97,116,104,95,105,115,100,105,114,92,0,0,0,115,6,0,
0,0,0,2,6,1,12,1,114,46,0,0,0,105,182,1,
0,0,99,3,0,0,0,0,0,0,0,6,0,0,0,17,
0,0,0,67,0,0,0,115,193,0,0,0,100,1,0,106,
0,0,124,0,0,116,1,0,124,0,0,131,1,0,131,2,
0,125,3,0,116,2,0,106,3,0,124,3,0,116,2,0,
106,4,0,116,2,0,106,5,0,66,116,2,0,106,6,0,
66,124,2,0,100,2,0,64,131,3,0,125,4,0,121,61,
0,116,7,0,106,8,0,124,4,0,100,3,0,131,2,0,
143,20,0,125,5,0,124,5,0,106,9,0,124,1,0,131,
1,0,1,87,100,4,0,81,82,88,116,2,0,106,10,0,
124,3,0,124,0,0,131,2,0,1,87,110,59,0,4,116,
11,0,107,10,0,114,188,0,1,1,1,121,17,0,116,2,
0,106,12,0,124,3,0,131,1,0,1,87,110,18,0,4,
116,11,0,107,10,0,114,180,0,1,1,1,89,110,1,0,
88,130,0,0,89,110,1,0,88,100,4,0,83,41,5,122,
162,66,101,115,116,45,101,102,102,111,114,116,32,102,117,110,
99,116,105,111,110,32,116,111,32,119,114,105,116,101,32,100,
97,116,97,32,116,111,32,97,32,112,97,116,104,32,97,116,
111,109,105,99,97,108,108,121,46,10,32,32,32,32,66,101,
32,112,114,101,112,97,114,101,100,32,116,111,32,104,97,110,
100,108,101,32,97,32,70,105,108,101,69,120,105,115,116,115,
69,114,114,111,114,32,105,102,32,99,111,110,99,117,114,114,
101,110,116,32,119,114,105,116,105,110,103,32,111,102,32,116,
104,101,10,32,32,32,32,116,101,109,112,111,114,97,114,121,
32,102,105,108,101,32,105,115,32,97,116,116,101,109,112,116,
101,100,46,122,5,123,125,46,123,125,105,182,1,0,0,90,
2,119,98,78,41,13,218,6,102,111,114,109,97,116,218,2,
105,100,114,3,0,0,0,90,4,111,112,101,110,90,6,79,
95,69,88,67,76,90,7,79,95,67,82,69,65,84,90,8,
79,95,87,82,79,78,76,89,218,3,95,105,111,218,6,70,
105,108,101,73,79,218,5,119,114,105,116,101,218,7,114,101,
112,108,97,99,101,114,40,0,0,0,90,6,117,110,108,105,
110,107,41,6,114,35,0,0,0,218,4,100,97,116,97,114,
42,0,0,0,90,8,112,97,116,104,95,116,109,112,90,2,
102,100,218,4,102,105,108,101,114,4,0,0,0,114,4,0,
0,0,114,5,0,0,0,218,13,95,119,114,105,116,101,95,
97,116,111,109,105,99,99,0,0,0,115,26,0,0,0,0,
5,24,1,9,1,33,1,3,3,21,1,20,1,20,1,13,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
1,3,1,17,1,13,1,5,1,114,55,0,0,0,105,22,
13,0,0,233,2,0,0,0,114,13,0,0,0,115,2,0,
0,0,13,10,90,11,95,95,112,121,99,97,99,104,101,95,
95,122,4,111,112,116,45,122,3,46,112,121,122,4,46,112,
121,99,78,218,12,111,112,116,105,109,105,122,97,116,105,111,
110,99,2,0,0,0,1,0,0,0,11,0,0,0,6,0,
0,0,67,0,0,0,115,87,1,0,0,124,1,0,100,1,
0,107,9,0,114,76,0,116,0,0,106,1,0,100,2,0,
116,2,0,131,2,0,1,124,2,0,100,1,0,107,9,0,
114,58,0,100,3,0,125,3,0,116,3,0,124,3,0,131,
1,0,130,1,0,124,1,0,114,70,0,100,4,0,110,3,
0,100,5,0,125,2,0,116,4,0,124,0,0,131,1,0,
92,2,0,125,4,0,125,5,0,124,5,0,106,5,0,100,
6,0,131,1,0,92,3,0,125,6,0,125,7,0,125,8,
0,116,6,0,106,7,0,106,8,0,125,9,0,124,9,0,
100,1,0,107,8,0,114,154,0,116,9,0,100,7,0,131,
1,0,130,1,0,100,4,0,106,10,0,124,6,0,114,172,
0,124,6,0,110,3,0,124,8,0,124,7,0,124,9,0,
103,3,0,131,1,0,125,10,0,124,2,0,100,1,0,107,
8,0,114,241,0,116,6,0,106,11,0,106,12,0,100,8,
0,107,2,0,114,229,0,100,4,0,125,2,0,110,12,0,
116,6,0,106,11,0,106,12,0,125,2,0,116,13,0,124,
2,0,131,1,0,125,2,0,124,2,0,100,4,0,107,3,
0,114,63,1,124,2,0,106,14,0,131,0,0,115,42,1,
116,15,0,100,9,0,106,16,0,124,2,0,131,1,0,131,
1,0,130,1,0,100,10,0,106,16,0,124,10,0,116,17,
0,124,2,0,131,3,0,125,10,0,116,18,0,124,4,0,
116,19,0,124,10,0,116,20,0,100,8,0,25,23,131,3,
0,83,41,11,97,254,2,0,0,71,105,118,101,110,32,116,
104,101,32,112,97,116,104,32,116,111,32,97,32,46,112,121,
32,102,105,108,101,44,32,114,101,116,117,114,110,32,116,104,
101,32,112,97,116,104,32,116,111,32,105,116,115,32,46,112,
121,99,32,102,105,108,101,46,10,10,32,32,32,32,84,104,
101,32,46,112,121,32,102,105,108,101,32,100,111,101,115,32,
110,111,116,32,110,101,101,100,32,116,111,32,101,120,105,115,
116,59,32,116,104,105,115,32,115,105,109,112,108,121,32,114,
101,116,117,114,110,115,32,116,104,101,32,112,97,116,104,32,
116,111,32,116,104,101,10,32,32,32,32,46,112,121,99,32,
102,105,108,101,32,99,97,108,99,117,108,97,116,101,100,32,
97,115,32,105,102,32,116,104,101,32,46,112,121,32,102,105,
108,101,32,119,101,114,101,32,105,109,112,111,114,116,101,100,
46,10,10,32,32,32,32,84,104,101,32,39,111,112,116,105,
109,105,122,97,116,105,111,110,39,32,112,97,114,97,109,101,
116,101,114,32,99,111,110,116,114,111,108,115,32,116,104,101,
32,112,114,101,115,117,109,101,100,32,111,112,116,105,109,105,
122,97,116,105,111,110,32,108,101,118,101,108,32,111,102,10,
32,32,32,32,116,104,101,32,98,121,116,101,99,111,100,101,
32,102,105,108,101,46,32,73,102,32,39,111,112,116,105,109,
105,122,97,116,105,111,110,39,32,105,115,32,110,111,116,32,
78,111,110,101,44,32,116,104,101,32,115,116,114,105,110,103,
32,114,101,112,114,101,115,101,110,116,97,116,105,111,110,10,
32,32,32,32,111,102,32,116,104,101,32,97,114,103,117,109,
101,110,116,32,105,115,32,116,97,107,101,110,32,97,110,100,
32,118,101,114,105,102,105,101,100,32,116,111,32,98,101,32,
97,108,112,104,97,110,117,109,101,114,105,99,32,40,101,108,
115,101,32,86,97,108,117,101,69,114,114,111,114,10,32,32,
32,32,105,115,32,114,97,105,115,101,100,41,46,10,10,32,
32,32,32,84,104,101,32,100,101,98,117,103,95,111,118,101,
114,114,105,100,101,32,112,97,114,97,109,101,116,101,114,32,
105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,73,
102,32,100,101,98,117,103,95,111,118,101,114,114,105,100,101,
32,105,115,32,110,111,116,32,78,111,110,101,44,10,32,32,
32,32,97,32,84,114,117,101,32,118,97,108,117,101,32,105,
115,32,116,104,101,32,115,97,109,101,32,97,115,32,115,101,
116,116,105,110,103,32,39,111,112,116,105,109,105,122,97,116,
105,111,110,39,32,116,111,32,116,104,101,32,101,109,112,116,
121,32,115,116,114,105,110,103,10,32,32,32,32,119,104,105,
108,101,32,97,32,70,97,108,115,101,32,118,97,108,117,101,
32,105,115,32,101,113,117,105,118,97,108,101,110,116,32,116,
111,32,115,101,116,116,105,110,103,32,39,111,112,116,105,109,
105,122,97,116,105,111,110,39,32,116,111,32,39,49,39,46,
10,10,32,32,32,32,73,102,32,115,121,115,46,105,109,112,
108,101,109,101,110,116,97,116,105,111,110,46,99,97,99,104,
101,95,116,97,103,32,105,115,32,78,111,110,101,32,116,104,
101,110,32,78,111,116,73,109,112,108,101,109,101,110,116,101,
100,69,114,114,111,114,32,105,115,32,114,97,105,115,101,100,
46,10,10,32,32,32,32,78,122,70,116,104,101,32,100,101,
98,117,103,95,111,118,101,114,114,105,100,101,32,112,97,114,
97,109,101,116,101,114,32,105,115,32,100,101,112,114,101,99,
97,116,101,100,59,32,117,115,101,32,39,111,112,116,105,109,
105,122,97,116,105,111,110,39,32,105,110,115,116,101,97,100,
122,50,100,101,98,117,103,95,111,118,101,114,114,105,100,101,
32,111,114,32,111,112,116,105,109,105,122,97,116,105,111,110,
32,109,117,115,116,32,98,101,32,115,101,116,32,116,111,32,
78,111,110,101,114,30,0,0,0,114,29,0,0,0,218,1,
46,122,36,115,121,115,46,105,109,112,108,101,109,101,110,116,
97,116,105,111,110,46,99,97,99,104,101,95,116,97,103,32,
105,115,32,78,111,110,101,233,0,0,0,0,122,24,123,33,
114,125,32,105,115,32,110,111,116,32,97,108,112,104,97,110,
117,109,101,114,105,99,122,7,123,125,46,123,125,123,125,41,
21,218,9,95,119,97,114,110,105,110,103,115,218,4,119,97,
114,110,218,18,68,101,112,114,101,99,97,116,105,111,110,87,
97,114,110,105,110,103,218,9,84,121,112,101,69,114,114,111,
114,114,38,0,0,0,114,32,0,0,0,114,7,0,0,0,
218,14,105,109,112,108,101,109,101,110,116,97,116,105,111,110,
218,9,99,97,99,104,101,95,116,97,103,218,19,78,111,116,
73,109,112,108,101,109,101,110,116,101,100,69,114,114,111,114,
114,26,0,0,0,218,5,102,108,97,103,115,218,8,111,112,
116,105,109,105,122,101,218,3,115,116,114,218,7,105,115,97,
108,110,117,109,218,10,86,97,108,117,101,69,114,114,111,114,
114,47,0,0,0,218,4,95,79,80,84,114,28,0,0,0,
218,8,95,80,89,67,65,67,72,69,218,17,66,89,84,69,
67,79,68,69,95,83,85,70,70,73,88,69,83,41,11,114,
35,0,0,0,90,14,100,101,98,117,103,95,111,118,101,114,
114,105,100,101,114,57,0,0,0,218,7,109,101,115,115,97,
103,101,218,4,104,101,97,100,114,37,0,0,0,90,4,98,
97,115,101,218,3,115,101,112,218,4,114,101,115,116,90,3,
116,97,103,90,15,97,108,109,111,115,116,95,102,105,108,101,
110,97,109,101,114,4,0,0,0,114,4,0,0,0,114,5,
0,0,0,218,17,99,97,99,104,101,95,102,114,111,109,95,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
115,111,117,114,99,101,243,0,0,0,115,46,0,0,0,0,
18,12,1,9,1,7,1,12,1,6,1,12,1,18,1,18,
1,24,1,12,1,12,1,12,1,36,1,12,1,18,1,9,
2,12,1,12,1,12,1,12,1,21,1,21,1,114,79,0,
0,0,99,1,0,0,0,0,0,0,0,8,0,0,0,5,
0,0,0,67,0,0,0,115,62,1,0,0,116,0,0,106,
1,0,106,2,0,100,1,0,107,8,0,114,30,0,116,3,
0,100,2,0,131,1,0,130,1,0,116,4,0,124,0,0,
131,1,0,92,2,0,125,1,0,125,2,0,116,4,0,124,
1,0,131,1,0,92,2,0,125,1,0,125,3,0,124,3,
0,116,5,0,107,3,0,114,102,0,116,6,0,100,3,0,
106,7,0,116,5,0,124,0,0,131,2,0,131,1,0,130,
1,0,124,2,0,106,8,0,100,4,0,131,1,0,125,4,
0,124,4,0,100,11,0,107,7,0,114,153,0,116,6,0,
100,7,0,106,7,0,124,2,0,131,1,0,131,1,0,130,
1,0,110,125,0,124,4,0,100,6,0,107,2,0,114,22,
1,124,2,0,106,9,0,100,4,0,100,5,0,131,2,0,
100,12,0,25,125,5,0,124,5,0,106,10,0,116,11,0,
131,1,0,115,223,0,116,6,0,100,8,0,106,7,0,116,
11,0,131,1,0,131,1,0,130,1,0,124,5,0,116,12,
0,116,11,0,131,1,0,100,1,0,133,2,0,25,125,6,
0,124,6,0,106,13,0,131,0,0,115,22,1,116,6,0,
100,9,0,106,7,0,124,5,0,131,1,0,131,1,0,130,
1,0,124,2,0,106,14,0,100,4,0,131,1,0,100,10,
0,25,125,7,0,116,15,0,124,1,0,124,7,0,116,16,
0,100,10,0,25,23,131,2,0,83,41,13,97,110,1,0,
0,71,105,118,101,110,32,116,104,101,32,112,97,116,104,32,
116,111,32,97,32,46,112,121,99,46,32,102,105,108,101,44,
32,114,101,116,117,114,110,32,116,104,101,32,112,97,116,104,
32,116,111,32,105,116,115,32,46,112,121,32,102,105,108,101,
46,10,10,32,32,32,32,84,104,101,32,46,112,121,99,32,
102,105,108,101,32,100,111,101,115,32,110,111,116,32,110,101,
101,100,32,116,111,32,101,120,105,115,116,59,32,116,104,105,
115,32,115,105,109,112,108,121,32,114,101,116,117,114,110,115,
32,116,104,101,32,112,97,116,104,32,116,111,10,32,32,32,
32,116,104,101,32,46,112,121,32,102,105,108,101,32,99,97,
108,99,117,108,97,116,101,100,32,116,111,32,99,111,114,114,
101,115,112,111,110,100,32,116,111,32,116,104,101,32,46,112,
121,99,32,102,105,108,101,46,32,32,73,102,32,112,97,116,
104,32,100,111,101,115,10,32,32,32,32,110,111,116,32,99,
111,110,102,111,114,109,32,116,111,32,80,69,80,32,51,49,
52,55,47,52,56,56,32,102,111,114,109,97,116,44,32,86,
97,108,117,101,69,114,114,111,114,32,119,105,108,108,32,98,
101,32,114,97,105,115,101,100,46,32,73,102,10,32,32,32,
32,115,121,115,46,105,109,112,108,101,109,101,110,116,97,116,
105,111,110,46,99,97,99,104,101,95,116,97,103,32,105,115,
32,78,111,110,101,32,116,104,101,110,32,78,111,116,73,109,
112,108,101,109,101,110,116,101,100,69,114,114,111,114,32,105,
115,32,114,97,105,115,101,100,46,10,10,32,32,32,32,78,
122,36,115,121,115,46,105,109,112,108,101,109,101,110,116,97,
116,105,111,110,46,99,97,99,104,101,95,116,97,103,32,105,
115,32,78,111,110,101,122,37,123,125,32,110,111,116,32,98,
111,116,116,111,109,45,108,101,118,101,108,32,100,105,114,101,
99,116,111,114,121,32,105,110,32,123,33,114,125,114,58,0,
0,0,114,56,0,0,0,233,3,0,0,0,122,33,101,120,
112,101,99,116,101,100,32,111,110,108,121,32,50,32,111,114,
32,51,32,100,111,116,115,32,105,110,32,123,33,114,125,122,
57,111,112,116,105,109,105,122,97,116,105,111,110,32,112,111,
114,116,105,111,110,32,111,102,32,102,105,108,101,110,97,109,
101,32,100,111,101,115,32,110,111,116,32,115,116,97,114,116,
32,119,105,116,104,32,123,33,114,125,122,52,111,112,116,105,
109,105,122,97,116,105,111,110,32,108,101,118,101,108,32,123,
33,114,125,32,105,115,32,110,111,116,32,97,110,32,97,108,
112,104,97,110,117,109,101,114,105,99,32,118,97,108,117,101,
114,59,0,0,0,62,2,0,0,0,114,56,0,0,0,114,
80,0,0,0,233,254,255,255,255,41,17,114,7,0,0,0,
114,64,0,0,0,114,65,0,0,0,114,66,0,0,0,114,
38,0,0,0,114,73,0,0,0,114,71,0,0,0,114,47,
0,0,0,218,5,99,111,117,110,116,114,34,0,0,0,114,
9,0,0,0,114,72,0,0,0,114,31,0,0,0,114,70,
0,0,0,218,9,112,97,114,116,105,116,105,111,110,114,28,
0,0,0,218,15,83,79,85,82,67,69,95,83,85,70,70,
73,88,69,83,41,8,114,35,0,0,0,114,76,0,0,0,
90,16,112,121,99,97,99,104,101,95,102,105,108,101,110,97,
109,101,90,7,112,121,99,97,99,104,101,90,9,100,111,116,
95,99,111,117,110,116,114,57,0,0,0,90,9,111,112,116,
95,108,101,118,101,108,90,13,98,97,115,101,95,102,105,108,
101,110,97,109,101,114,4,0,0,0,114,4,0,0,0,114,
5,0,0,0,218,17,115,111,117,114,99,101,95,102,114,111,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
109,95,99,97,99,104,101,31,1,0,0,115,44,0,0,0,
0,9,18,1,12,1,18,1,18,1,12,1,9,1,15,1,
15,1,12,1,9,1,15,1,12,1,22,1,15,1,9,1,
12,1,22,1,12,1,9,1,12,1,19,1,114,85,0,0,
0,99,1,0,0,0,0,0,0,0,5,0,0,0,12,0,
0,0,67,0,0,0,115,164,0,0,0,116,0,0,124,0,
0,131,1,0,100,1,0,107,2,0,114,22,0,100,2,0,
83,124,0,0,106,1,0,100,3,0,131,1,0,92,3,0,
125,1,0,125,2,0,125,3,0,124,1,0,12,115,81,0,
124,3,0,106,2,0,131,0,0,100,7,0,100,8,0,133,
2,0,25,100,6,0,107,3,0,114,85,0,124,0,0,83,
121,16,0,116,3,0,124,0,0,131,1,0,125,4,0,87,
110,40,0,4,116,4,0,116,5,0,102,2,0,107,10,0,
114,143,0,1,1,1,124,0,0,100,2,0,100,9,0,133,
2,0,25,125,4,0,89,110,1,0,88,116,6,0,124,4,
0,131,1,0,114,160,0,124,4,0,83,124,0,0,83,41,
10,122,188,67,111,110,118,101,114,116,32,97,32,98,121,116,
101,99,111,100,101,32,102,105,108,101,32,112,97,116,104,32,
116,111,32,97,32,115,111,117,114,99,101,32,112,97,116,104,
32,40,105,102,32,112,111,115,115,105,98,108,101,41,46,10,
10,32,32,32,32,84,104,105,115,32,102,117,110,99,116,105,
111,110,32,101,120,105,115,116,115,32,112,117,114,101,108,121,
32,102,111,114,32,98,97,99,107,119,97,114,100,115,45,99,
111,109,112,97,116,105,98,105,108,105,116,121,32,102,111,114,
10,32,32,32,32,80,121,73,109,112,111,114,116,95,69,120,
101,99,67,111,100,101,77,111,100,117,108,101,87,105,116,104,
70,105,108,101,110,97,109,101,115,40,41,32,105,110,32,116,
104,101,32,67,32,65,80,73,46,10,10,32,32,32,32,114,
59,0,0,0,78,114,58,0,0,0,114,80,0,0,0,114,
29,0,0,0,90,2,112,121,233,253,255,255,255,233,255,255,
255,255,114,87,0,0,0,41,7,114,31,0,0,0,114,32,
0,0,0,218,5,108,111,119,101,114,114,85,0,0,0,114,
66,0,0,0,114,71,0,0,0,114,44,0,0,0,41,5,
218,13,98,121,116,101,99,111,100,101,95,112,97,116,104,114,
78,0,0,0,114,36,0,0,0,90,9,101,120,116,101,110,
115,105,111,110,218,11,115,111,117,114,99,101,95,112,97,116,
104,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
218,15,95,103,101,116,95,115,111,117,114,99,101,102,105,108,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
101,64,1,0,0,115,20,0,0,0,0,7,18,1,4,1,
24,1,35,1,4,1,3,1,16,1,19,1,21,1,114,91,
0,0,0,99,1,0,0,0,0,0,0,0,1,0,0,0,
11,0,0,0,67,0,0,0,115,92,0,0,0,124,0,0,
106,0,0,116,1,0,116,2,0,131,1,0,131,1,0,114,
59,0,121,14,0,116,3,0,124,0,0,131,1,0,83,87,
113,88,0,4,116,4,0,107,10,0,114,55,0,1,1,1,
89,113,88,0,88,110,29,0,124,0,0,106,0,0,116,1,
0,116,5,0,131,1,0,131,1,0,114,84,0,124,0,0,
83,100,0,0,83,100,0,0,83,41,1,78,41,6,218,8,
101,110,100,115,119,105,116,104,218,5,116,117,112,108,101,114,
84,0,0,0,114,79,0,0,0,114,66,0,0,0,114,74,
0,0,0,41,1,218,8,102,105,108,101,110,97,109,101,114,
4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,11,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
95,103,101,116,95,99,97,99,104,101,100,83,1,0,0,115,
16,0,0,0,0,1,21,1,3,1,14,1,13,1,8,1,
21,1,4,2,114,95,0,0,0,99,1,0,0,0,0,0,
0,0,2,0,0,0,11,0,0,0,67,0,0,0,115,60,
0,0,0,121,19,0,116,0,0,124,0,0,131,1,0,106,
1,0,125,1,0,87,110,24,0,4,116,2,0,107,10,0,
114,45,0,1,1,1,100,1,0,125,1,0,89,110,1,0,
88,124,1,0,100,2,0,79,125,1,0,124,1,0,83,41,
3,122,51,67,97,108,99,117,108,97,116,101,32,116,104,101,
32,109,111,100,101,32,112,101,114,109,105,115,115,105,111,110,
115,32,102,111,114,32,97,32,98,121,116,101,99,111,100,101,
32,102,105,108,101,46,105,182,1,0,0,233,128,0,0,0,
41,3,114,39,0,0,0,114,41,0,0,0,114,40,0,0,
0,41,2,114,35,0,0,0,114,42,0,0,0,114,4,0,
0,0,114,4,0,0,0,114,5,0,0,0,218,10,95,99,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
97,108,99,95,109,111,100,101,95,1,0,0,115,12,0,0,
0,0,2,3,1,19,1,13,1,11,3,10,1,114,97,0,
0,0,218,9,118,101,114,98,111,115,105,116,121,114,29,0,
0,0,99,1,0,0,0,1,0,0,0,3,0,0,0,4,
0,0,0,71,0,0,0,115,75,0,0,0,116,0,0,106,
1,0,106,2,0,124,1,0,107,5,0,114,71,0,124,0,
0,106,3,0,100,6,0,131,1,0,115,43,0,100,3,0,
124,0,0,23,125,0,0,116,4,0,124,0,0,106,5,0,
124,2,0,140,0,0,100,4,0,116,0,0,106,6,0,131,
1,1,1,100,5,0,83,41,7,122,61,80,114,105,110,116,
32,116,104,101,32,109,101,115,115,97,103,101,32,116,111,32,
115,116,100,101,114,114,32,105,102,32,45,118,47,80,89,84,
72,79,78,86,69,82,66,79,83,69,32,105,115,32,116,117,
114,110,101,100,32,111,110,46,250,1,35,250,7,105,109,112,
111,114,116,32,122,2,35,32,114,54,0,0,0,78,41,2,
114,99,0,0,0,114,100,0,0,0,41,7,114,7,0,0,
0,114,67,0,0,0,218,7,118,101,114,98,111,115,101,114,
9,0,0,0,218,5,112,114,105,110,116,114,47,0,0,0,
218,6,115,116,100,101,114,114,41,3,114,75,0,0,0,114,
98,0,0,0,218,4,97,114,103,115,114,4,0,0,0,114,
4,0,0,0,114,5,0,0,0,218,16,95,118,101,114,98,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
111,115,101,95,109,101,115,115,97,103,101,107,1,0,0,115,
8,0,0,0,0,2,18,1,15,1,10,1,114,105,0,0,
0,99,1,0,0,0,0,0,0,0,3,0,0,0,11,0,
0,0,3,0,0,0,115,84,0,0,0,100,1,0,135,0,
0,102,1,0,100,2,0,100,3,0,134,1,0,125,1,0,
121,13,0,116,0,0,106,1,0,125,2,0,87,110,30,0,
4,116,2,0,107,10,0,114,66,0,1,1,1,100,4,0,
100,5,0,132,0,0,125,2,0,89,110,1,0,88,124,2,
0,124,1,0,136,0,0,131,2,0,1,124,1,0,83,41,
6,122,252,68,101,99,111,114,97,116,111,114,32,116,111,32,
118,101,114,105,102,121,32,116,104,97,116,32,116,104,101,32,
109,111,100,117,108,101,32,98,101,105,110,103,32,114,101,113,
117,101,115,116,101,100,32,109,97,116,99,104,101,115,32,116,
104,101,32,111,110,101,32,116,104,101,10,32,32,32,32,108,
111,97,100,101,114,32,99,97,110,32,104,97,110,100,108,101,
46,10,10,32,32,32,32,84,104,101,32,102,105,114,115,116,
32,97,114,103,117,109,101,110,116,32,40,115,101,108,102,41,
32,109,117,115,116,32,100,101,102,105,110,101,32,95,110,97,
109,101,32,119,104,105,99,104,32,116,104,101,32,115,101,99,
111,110,100,32,97,114,103,117,109,101,110,116,32,105,115,10,
32,32,32,32,99,111,109,112,97,114,101,100,32,97,103,97,
105,110,115,116,46,32,73,102,32,116,104,101,32,99,111,109,
112,97,114,105,115,111,110,32,102,97,105,108,115,32,116,104,
101,110,32,73,109,112,111,114,116,69,114,114,111,114,32,105,
115,32,114,97,105,115,101,100,46,10,10,32,32,32,32,78,
99,2,0,0,0,0,0,0,0,4,0,0,0,5,0,0,
0,31,0,0,0,115,89,0,0,0,124,1,0,100,0,0,
107,8,0,114,24,0,124,0,0,106,0,0,125,1,0,110,
46,0,124,0,0,106,0,0,124,1,0,107,3,0,114,70,
0,116,1,0,100,1,0,124,0,0,106,0,0,124,1,0,
102,2,0,22,100,2,0,124,1,0,131,1,1,130,1,0,
136,0,0,124,0,0,124,1,0,124,2,0,124,3,0,142,
2,0,83,41,3,78,122,30,108,111,97,100,101,114,32,102,
111,114,32,37,115,32,99,97,110,110,111,116,32,104,97,110,
100,108,101,32,37,115,218,4,110,97,109,101,41,2,114,106,
0,0,0,218,11,73,109,112,111,114,116,69,114,114,111,114,
41,4,218,4,115,101,108,102,114,106,0,0,0,114,104,0,
0,0,90,6,107,119,97,114,103,115,41,1,218,6,109,101,
116,104,111,100,114,4,0,0,0,114,5,0,0,0,218,19,
95,99,104,101,99,107,95,110,97,109,101,95,119,114,97,112,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
112,101,114,123,1,0,0,115,12,0,0,0,0,1,12,1,
12,1,15,1,6,1,25,1,122,40,95,99,104,101,99,107,
95,110,97,109,101,46,60,108,111,99,97,108,115,62,46,95,
99,104,101,99,107,95,110,97,109,101,95,119,114,97,112,112,
101,114,99,2,0,0,0,0,0,0,0,3,0,0,0,7,
0,0,0,83,0,0,0,115,92,0,0,0,120,66,0,100,
1,0,100,2,0,100,3,0,100,4,0,103,4,0,68,93,
46,0,125,2,0,116,0,0,124,1,0,124,2,0,131,2,
0,114,19,0,116,1,0,124,0,0,124,2,0,116,2,0,
124,1,0,124,2,0,131,2,0,131,3,0,1,113,19,0,
87,124,0,0,106,3,0,106,4,0,124,1,0,106,3,0,
131,1,0,1,100,0,0,83,41,5,78,218,10,95,95,109,
111,100,117,108,101,95,95,218,8,95,95,110,97,109,101,95,
95,218,12,95,95,113,117,97,108,110,97,109,101,95,95,218,
7,95,95,100,111,99,95,95,41,5,218,7,104,97,115,97,
116,116,114,218,7,115,101,116,97,116,116,114,218,7,103,101,
116,97,116,116,114,218,8,95,95,100,105,99,116,95,95,218,
6,117,112,100,97,116,101,41,3,90,3,110,101,119,90,3,
111,108,100,114,52,0,0,0,114,4,0,0,0,114,4,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,114,5,0,0,0,218,5,95,119,114,97,112,134,1,
0,0,115,8,0,0,0,0,1,25,1,15,1,29,1,122,
26,95,99,104,101,99,107,95,110,97,109,101,46,60,108,111,
99,97,108,115,62,46,95,119,114,97,112,41,3,218,10,95,
98,111,111,116,115,116,114,97,112,114,120,0,0,0,218,9,
78,97,109,101,69,114,114,111,114,41,3,114,109,0,0,0,
114,110,0,0,0,114,120,0,0,0,114,4,0,0,0,41,
1,114,109,0,0,0,114,5,0,0,0,218,11,95,99,104,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
101,99,107,95,110,97,109,101,115,1,0,0,115,14,0,0,
0,0,8,21,7,3,1,13,1,13,2,17,5,13,1,114,
123,0,0,0,99,2,0,0,0,0,0,0,0,5,0,0,
0,4,0,0,0,67,0,0,0,115,84,0,0,0,124,0,
0,106,0,0,124,1,0,131,1,0,92,2,0,125,2,0,
125,3,0,124,2,0,100,1,0,107,8,0,114,80,0,116,
1,0,124,3,0,131,1,0,114,80,0,100,2,0,125,4,
0,116,2,0,106,3,0,124,4,0,106,4,0,124,3,0,
100,3,0,25,131,1,0,116,5,0,131,2,0,1,124,2,
0,83,41,4,122,155,84,114,121,32,116,111,32,102,105,110,
100,32,97,32,108,111,97,100,101,114,32,102,111,114,32,116,
104,101,32,115,112,101,99,105,102,105,101,100,32,109,111,100,
117,108,101,32,98,121,32,100,101,108,101,103,97,116,105,110,
103,32,116,111,10,32,32,32,32,115,101,108,102,46,102,105,
110,100,95,108,111,97,100,101,114,40,41,46,10,10,32,32,
32,32,84,104,105,115,32,109,101,116,104,111,100,32,105,115,
32,100,101,112,114,101,99,97,116,101,100,32,105,110,32,102,
97,118,111,114,32,111,102,32,102,105,110,100,101,114,46,102,
105,110,100,95,115,112,101,99,40,41,46,10,10,32,32,32,
32,78,122,44,78,111,116,32,105,109,112,111,114,116,105,110,
103,32,100,105,114,101,99,116,111,114,121,32,123,125,58,32,
109,105,115,115,105,110,103,32,95,95,105,110,105,116,95,95,
114,59,0,0,0,41,6,218,11,102,105,110,100,95,108,111,
97,100,101,114,114,31,0,0,0,114,60,0,0,0,114,61,
0,0,0,114,47,0,0,0,218,13,73,109,112,111,114,116,
87,97,114,110,105,110,103,41,5,114,108,0,0,0,218,8,
102,117,108,108,110,97,109,101,218,6,108,111,97,100,101,114,
218,8,112,111,114,116,105,111,110,115,218,3,109,115,103,114,
4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,17,
95,102,105,110,100,95,109,111,100,117,108,101,95,115,104,105,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
109,143,1,0,0,115,10,0,0,0,0,10,21,1,24,1,
6,1,29,1,114,130,0,0,0,99,4,0,0,0,0,0,
0,0,11,0,0,0,19,0,0,0,67,0,0,0,115,228,
1,0,0,105,0,0,125,4,0,124,2,0,100,1,0,107,
9,0,114,31,0,124,2,0,124,4,0,100,2,0,60,110,
6,0,100,3,0,125,2,0,124,3,0,100,1,0,107,9,
0,114,59,0,124,3,0,124,4,0,100,4,0,60,124,0,
0,100,1,0,100,5,0,133,2,0,25,125,5,0,124,0,
0,100,5,0,100,6,0,133,2,0,25,125,6,0,124,0,
0,100,6,0,100,7,0,133,2,0,25,125,7,0,124,5,
0,116,0,0,107,3,0,114,165,0,100,8,0,106,1,0,
124,2,0,124,5,0,131,2,0,125,8,0,116,2,0,124,
8,0,131,1,0,1,116,3,0,124,8,0,124,4,0,141,
1,0,130,1,0,110,113,0,116,4,0,124,6,0,131,1,
0,100,5,0,107,3,0,114,223,0,100,9,0,106,1,0,
124,2,0,131,1,0,125,8,0,116,2,0,124,8,0,131,
1,0,1,116,5,0,124,8,0,131,1,0,130,1,0,110,
55,0,116,4,0,124,7,0,131,1,0,100,5,0,107,3,
0,114,22,1,100,10,0,106,1,0,124,2,0,131,1,0,
125,8,0,116,2,0,124,8,0,131,1,0,1,116,5,0,
124,8,0,131,1,0,130,1,0,124,1,0,100,1,0,107,
9,0,114,214,1,121,20,0,116,6,0,124,1,0,100,11,
0,25,131,1,0,125,9,0,87,110,18,0,4,116,7,0,
107,10,0,114,74,1,1,1,1,89,110,59,0,88,116,8,
0,124,6,0,131,1,0,124,9,0,107,3,0,114,133,1,
100,12,0,106,1,0,124,2,0,131,1,0,125,8,0,116,
2,0,124,8,0,131,1,0,1,116,3,0,124,8,0,124,
4,0,141,1,0,130,1,0,121,18,0,124,1,0,100,13,
0,25,100,14,0,64,125,10,0,87,110,18,0,4,116,7,
0,107,10,0,114,171,1,1,1,1,89,110,43,0,88,116,
8,0,124,7,0,131,1,0,124,10,0,107,3,0,114,214,
1,116,3,0,100,12,0,106,1,0,124,2,0,131,1,0,
124,4,0,141,1,0,130,1,0,124,0,0,100,7,0,100,
1,0,133,2,0,25,83,41,15,97,122,1,0,0,86,97,
108,105,100,97,116,101,32,116,104,101,32,104,101,97,100,101,
114,32,111,102,32,116,104,101,32,112,97,115,115,101,100,45,
105,110,32,98,121,116,101,99,111,100,101,32,97,103,97,105,
110,115,116,32,115,111,117,114,99,101,95,115,116,97,116,115,
32,40,105,102,10,32,32,32,32,103,105,118,101,110,41,32,
97,110,100,32,114,101,116,117,114,110,105,110,103,32,116,104,
101,32,98,121,116,101,99,111,100,101,32,116,104,97,116,32,
99,97,110,32,98,101,32,99,111,109,112,105,108,101,100,32,
98,121,32,99,111,109,112,105,108,101,40,41,46,10,10,32,
32,32,32,65,108,108,32,111,116,104,101,114,32,97,114,103,
117,109,101,110,116,115,32,97,114,101,32,117,115,101,100,32,
116,111,32,101,110,104,97,110,99,101,32,101,114,114,111,114,
32,114,101,112,111,114,116,105,110,103,46,10,10,32,32,32,
32,73,109,112,111,114,116,69,114,114,111,114,32,105,115,32,
114,97,105,115,101,100,32,119,104,101,110,32,116,104,101,32,
109,97,103,105,99,32,110,117,109,98,101,114,32,105,115,32,
105,110,99,111,114,114,101,99,116,32,111,114,32,116,104,101,
32,98,121,116,101,99,111,100,101,32,105,115,10,32,32,32,
32,102,111,117,110,100,32,116,111,32,98,101,32,115,116,97,
108,101,46,32,69,79,70,69,114,114,111,114,32,105,115,32,
114,97,105,115,101,100,32,119,104,101,110,32,116,104,101,32,
100,97,116,97,32,105,115,32,102,111,117,110,100,32,116,111,
32,98,101,10,32,32,32,32,116,114,117,110,99,97,116,101,
100,46,10,10,32,32,32,32,78,114,106,0,0,0,122,10,
60,98,121,116,101,99,111,100,101,62,114,35,0,0,0,114,
12,0,0,0,233,8,0,0,0,233,12,0,0,0,122,30,
98,97,100,32,109,97,103,105,99,32,110,117,109,98,101,114,
32,105,110,32,123,33,114,125,58,32,123,33,114,125,122,43,
114,101,97,99,104,101,100,32,69,79,70,32,119,104,105,108,
101,32,114,101,97,100,105,110,103,32,116,105,109,101,115,116,
97,109,112,32,105,110,32,123,33,114,125,122,48,114,101,97,
99,104,101,100,32,69,79,70,32,119,104,105,108,101,32,114,
101,97,100,105,110,103,32,115,105,122,101,32,111,102,32,115,
111,117,114,99,101,32,105,110,32,123,33,114,125,218,5,109,
116,105,109,101,122,26,98,121,116,101,99,111,100,101,32,105,
115,32,115,116,97,108,101,32,102,111,114,32,123,33,114,125,
218,4,115,105,122,101,108,3,0,0,0,255,127,255,127,3,
0,41,9,218,12,77,65,71,73,67,95,78,85,77,66,69,
82,114,47,0,0,0,114,105,0,0,0,114,107,0,0,0,
114,31,0,0,0,218,8,69,79,70,69,114,114,111,114,114,
14,0,0,0,218,8,75,101,121,69,114,114,111,114,114,19,
0,0,0,41,11,114,53,0,0,0,218,12,115,111,117,114,
99,101,95,115,116,97,116,115,114,106,0,0,0,114,35,0,
0,0,90,11,101,120,99,95,100,101,116,97,105,108,115,90,
5,109,97,103,105,99,90,13,114,97,119,95,116,105,109,101,
115,116,97,109,112,90,8,114,97,119,95,115,105,122,101,114,
75,0,0,0,218,12,115,111,117,114,99,101,95,109,116,105,
109,101,218,11,115,111,117,114,99,101,95,115,105,122,101,114,
4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,25,
95,118,97,108,105,100,97,116,101,95,98,121,116,101,99,111,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
100,101,95,104,101,97,100,101,114,160,1,0,0,115,76,0,
0,0,0,11,6,1,12,1,13,3,6,1,12,1,10,1,
16,1,16,1,16,1,12,1,18,1,10,1,18,1,18,1,
15,1,10,1,15,1,18,1,15,1,10,1,12,1,12,1,
3,1,20,1,13,1,5,2,18,1,15,1,10,1,15,1,
3,1,18,1,13,1,5,2,18,1,15,1,9,1,114,141,
0,0,0,99,4,0,0,0,0,0,0,0,5,0,0,0,
6,0,0,0,67,0,0,0,115,112,0,0,0,116,0,0,
106,1,0,124,0,0,131,1,0,125,4,0,116,2,0,124,
4,0,116,3,0,131,2,0,114,75,0,116,4,0,100,1,
0,124,2,0,131,2,0,1,124,3,0,100,2,0,107,9,
0,114,71,0,116,5,0,106,6,0,124,4,0,124,3,0,
131,2,0,1,124,4,0,83,116,7,0,100,3,0,106,8,
0,124,2,0,131,1,0,100,4,0,124,1,0,100,5,0,
124,2,0,131,1,2,130,1,0,100,2,0,83,41,6,122,
60,67,111,109,112,105,108,101,32,98,121,116,101,99,111,100,
101,32,97,115,32,114,101,116,117,114,110,101,100,32,98,121,
32,95,118,97,108,105,100,97,116,101,95,98,121,116,101,99,
111,100,101,95,104,101,97,100,101,114,40,41,46,122,21,99,
111,100,101,32,111,98,106,101,99,116,32,102,114,111,109,32,
123,33,114,125,78,122,23,78,111,110,45,99,111,100,101,32,
111,98,106,101,99,116,32,105,110,32,123,33,114,125,114,106,
0,0,0,114,35,0,0,0,41,9,218,7,109,97,114,115,
104,97,108,90,5,108,111,97,100,115,218,10,105,115,105,110,
115,116,97,110,99,101,218,10,95,99,111,100,101,95,116,121,
112,101,114,105,0,0,0,218,4,95,105,109,112,90,16,95,
102,105,120,95,99,111,95,102,105,108,101,110,97,109,101,114,
107,0,0,0,114,47,0,0,0,41,5,114,53,0,0,0,
114,106,0,0,0,114,89,0,0,0,114,90,0,0,0,218,
4,99,111,100,101,114,4,0,0,0,114,4,0,0,0,114,
5,0,0,0,218,17,95,99,111,109,112,105,108,101,95,98,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
121,116,101,99,111,100,101,215,1,0,0,115,16,0,0,0,
0,2,15,1,15,1,13,1,12,1,16,1,4,2,18,1,
114,147,0,0,0,114,59,0,0,0,99,3,0,0,0,0,
0,0,0,4,0,0,0,3,0,0,0,67,0,0,0,115,
76,0,0,0,116,0,0,116,1,0,131,1,0,125,3,0,
124,3,0,106,2,0,116,3,0,124,1,0,131,1,0,131,
1,0,1,124,3,0,106,2,0,116,3,0,124,2,0,131,
1,0,131,1,0,1,124,3,0,106,2,0,116,4,0,106,
5,0,124,0,0,131,1,0,131,1,0,1,124,3,0,83,
41,1,122,80,67,111,109,112,105,108,101,32,97,32,99,111,
100,101,32,111,98,106,101,99,116,32,105,110,116,111,32,98,
121,116,101,99,111,100,101,32,102,111,114,32,119,114,105,116,
105,110,103,32,111,117,116,32,116,111,32,97,32,98,121,116,
101,45,99,111,109,112,105,108,101,100,10,32,32,32,32,102,
105,108,101,46,41,6,218,9,98,121,116,101,97,114,114,97,
121,114,135,0,0,0,218,6,101,120,116,101,110,100,114,17,
0,0,0,114,142,0,0,0,90,5,100,117,109,112,115,41,
4,114,146,0,0,0,114,133,0,0,0,114,140,0,0,0,
114,53,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
5,0,0,0,218,17,95,99,111,100,101,95,116,111,95,98,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
121,116,101,99,111,100,101,227,1,0,0,115,10,0,0,0,
0,3,12,1,19,1,19,1,22,1,114,150,0,0,0,99,
1,0,0,0,0,0,0,0,5,0,0,0,4,0,0,0,
67,0,0,0,115,89,0,0,0,100,1,0,100,2,0,108,
0,0,125,1,0,116,1,0,106,2,0,124,0,0,131,1,
0,106,3,0,125,2,0,124,1,0,106,4,0,124,2,0,
131,1,0,125,3,0,116,1,0,106,5,0,100,2,0,100,
3,0,131,2,0,125,4,0,124,4,0,106,6,0,124,0,
0,106,6,0,124,3,0,100,1,0,25,131,1,0,131,1,
0,83,41,4,122,121,68,101,99,111,100,101,32,98,121,116,
101,115,32,114,101,112,114,101,115,101,110,116,105,110,103,32,
115,111,117,114,99,101,32,99,111,100,101,32,97,110,100,32,
114,101,116,117,114,110,32,116,104,101,32,115,116,114,105,110,
103,46,10,10,32,32,32,32,85,110,105,118,101,114,115,97,
108,32,110,101,119,108,105,110,101,32,115,117,112,112,111,114,
116,32,105,115,32,117,115,101,100,32,105,110,32,116,104,101,
32,100,101,99,111,100,105,110,103,46,10,32,32,32,32,114,
59,0,0,0,78,84,41,7,218,8,116,111,107,101,110,105,
122,101,114,49,0,0,0,90,7,66,121,116,101,115,73,79,
90,8,114,101,97,100,108,105,110,101,90,15,100,101,116,101,
99,116,95,101,110,99,111,100,105,110,103,90,25,73,110,99,
114,101,109,101,110,116,97,108,78,101,119,108,105,110,101,68,
101,99,111,100,101,114,218,6,100,101,99,111,100,101,41,5,
218,12,115,111,117,114,99,101,95,98,121,116,101,115,114,151,
0,0,0,90,21,115,111,117,114,99,101,95,98,121,116,101,
115,95,114,101,97,100,108,105,110,101,218,8,101,110,99,111,
100,105,110,103,90,15,110,101,119,108,105,110,101,95,100,101,
99,111,100,101,114,114,4,0,0,0,114,4,0,0,0,114,
5,0,0,0,218,13,100,101,99,111,100,101,95,115,111,117,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,99,101,237,1,0,0,115,10,0,0,0,0,5,12,1,
18,1,15,1,18,1,114,155,0,0,0,114,127,0,0,0,
218,26,115,117,98,109,111,100,117,108,101,95,115,101,97,114,
99,104,95,108,111,99,97,116,105,111,110,115,99,2,0,0,
0,2,0,0,0,9,0,0,0,19,0,0,0,67,0,0,
0,115,89,1,0,0,124,1,0,100,1,0,107,8,0,114,
73,0,100,2,0,125,1,0,116,0,0,124,2,0,100,3,
0,131,2,0,114,73,0,121,19,0,124,2,0,106,1,0,
124,0,0,131,1,0,125,1,0,87,110,18,0,4,116,2,
0,107,10,0,114,72,0,1,1,1,89,110,1,0,88,116,
3,0,106,4,0,124,0,0,124,2,0,100,4,0,124,1,
0,131,2,1,125,4,0,100,5,0,124,4,0,95,5,0,
124,2,0,100,1,0,107,8,0,114,194,0,120,73,0,116,
6,0,131,0,0,68,93,58,0,92,2,0,125,5,0,125,
6,0,124,1,0,106,7,0,116,8,0,124,6,0,131,1,
0,131,1,0,114,128,0,124,5,0,124,0,0,124,1,0,
131,2,0,125,2,0,124,2,0,124,4,0,95,9,0,80,
113,128,0,87,100,1,0,83,124,3,0,116,10,0,107,8,
0,114,23,1,116,0,0,124,2,0,100,6,0,131,2,0,
114,32,1,121,19,0,124,2,0,106,11,0,124,0,0,131,
1,0,125,7,0,87,110,18,0,4,116,2,0,107,10,0,
114,4,1,1,1,1,89,113,32,1,88,124,7,0,114,32,
1,103,0,0,124,4,0,95,12,0,110,9,0,124,3,0,
124,4,0,95,12,0,124,4,0,106,12,0,103,0,0,107,
2,0,114,85,1,124,1,0,114,85,1,116,13,0,124,1,
0,131,1,0,100,7,0,25,125,8,0,124,4,0,106,12,
0,106,14,0,124,8,0,131,1,0,1,124,4,0,83,41,
8,97,61,1,0,0,82,101,116,117,114,110,32,97,32,109,
111,100,117,108,101,32,115,112,101,99,32,98,97,115,101,100,
32,111,110,32,97,32,102,105,108,101,32,108,111,99,97,116,
105,111,110,46,10,10,32,32,32,32,84,111,32,105,110,100,
105,99,97,116,101,32,116,104,97,116,32,116,104,101,32,109,
111,100,117,108,101,32,105,115,32,97,32,112,97,99,107,97,
103,101,44,32,115,101,116,10,32,32,32,32,115,117,98,109,
111,100,117,108,101,95,115,101,97,114,99,104,95,108,111,99,
97,116,105,111,110,115,32,116,111,32,97,32,108,105,115,116,
32,111,102,32,100,105,114,101,99,116,111,114,121,32,112,97,
116,104,115,46,32,32,65,110,10,32,32,32,32,101,109,112,
116,121,32,108,105,115,116,32,105,115,32,115,117,102,102,105,
99,105,101,110,116,44,32,116,104,111,117,103,104,32,105,116,
115,32,110,111,116,32,111,116,104,101,114,119,105,115,101,32,
117,115,101,102,117,108,32,116,111,32,116,104,101,10,32,32,
32,32,105,109,112,111,114,116,32,115,121,115,116,101,109,46,
10,10,32,32,32,32,84,104,101,32,108,111,97,100,101,114,
32,109,117,115,116,32,116,97,107,101,32,97,32,115,112,101,
99,32,97,115,32,105,116,115,32,111,110,108,121,32,95,95,
105,110,105,116,95,95,40,41,32,97,114,103,46,10,10,32,
32,32,32,78,122,9,60,117,110,107,110,111,119,110,62,218,
12,103,101,116,95,102,105,108,101,110,97,109,101,218,6,111,
114,105,103,105,110,84,218,10,105,115,95,112,97,99,107,97,
103,101,114,59,0,0,0,41,15,114,115,0,0,0,114,157,
0,0,0,114,107,0,0,0,114,121,0,0,0,218,10,77,
111,100,117,108,101,83,112,101,99,90,13,95,115,101,116,95,
102,105,108,101,97,116,116,114,218,27,95,103,101,116,95,115,
117,112,112,111,114,116,101,100,95,102,105,108,101,95,108,111,
97,100,101,114,115,114,92,0,0,0,114,93,0,0,0,114,
127,0,0,0,218,9,95,80,79,80,85,76,65,84,69,114,
159,0,0,0,114,156,0,0,0,114,38,0,0,0,218,6,
97,112,112,101,110,100,41,9,114,106,0,0,0,90,8,108,
111,99,97,116,105,111,110,114,127,0,0,0,114,156,0,0,
0,218,4,115,112,101,99,218,12,108,111,97,100,101,114,95,
99,108,97,115,115,218,8,115,117,102,102,105,120,101,115,114,
159,0,0,0,90,7,100,105,114,110,97,109,101,114,4,0,
0,0,114,4,0,0,0,114,5,0,0,0,218,23,115,112,
101,99,95,102,114,111,109,95,102,105,108,101,95,108,111,99,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
97,116,105,111,110,254,1,0,0,115,60,0,0,0,0,12,
12,4,6,1,15,2,3,1,19,1,13,1,5,8,24,1,
9,3,12,1,22,1,21,1,15,1,9,1,5,2,4,3,
12,2,15,1,3,1,19,1,13,1,5,2,6,1,12,2,
9,1,15,1,6,1,16,1,16,2,114,167,0,0,0,99,
0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,
64,0,0,0,115,121,0,0,0,101,0,0,90,1,0,100,
0,0,90,2,0,100,1,0,90,3,0,100,2,0,90,4,
0,100,3,0,90,5,0,100,4,0,90,6,0,101,7,0,
100,5,0,100,6,0,132,0,0,131,1,0,90,8,0,101,
7,0,100,7,0,100,8,0,132,0,0,131,1,0,90,9,
0,101,7,0,100,9,0,100,9,0,100,10,0,100,11,0,
132,2,0,131,1,0,90,10,0,101,7,0,100,9,0,100,
12,0,100,13,0,132,1,0,131,1,0,90,11,0,100,9,
0,83,41,14,218,21,87,105,110,100,111,119,115,82,101,103,
105,115,116,114,121,70,105,110,100,101,114,122,62,77,101,116,
97,32,112,97,116,104,32,102,105,110,100,101,114,32,102,111,
114,32,109,111,100,117,108,101,115,32,100,101,99,108,97,114,
101,100,32,105,110,32,116,104,101,32,87,105,110,100,111,119,
115,32,114,101,103,105,115,116,114,121,46,122,59,83,111,102,
116,119,97,114,101,92,80,121,116,104,111,110,92,80,121,116,
104,111,110,67,111,114,101,92,123,115,121,115,95,118,101,114,
115,105,111,110,125,92,77,111,100,117,108,101,115,92,123,102,
117,108,108,110,97,109,101,125,122,65,83,111,102,116,119,97,
114,101,92,80,121,116,104,111,110,92,80,121,116,104,111,110,
67,111,114,101,92,123,115,121,115,95,118,101,114,115,105,111,
110,125,92,77,111,100,117,108,101,115,92,123,102,117,108,108,
110,97,109,101,125,92,68,101,98,117,103,70,99,2,0,0,
0,0,0,0,0,2,0,0,0,11,0,0,0,67,0,0,
0,115,67,0,0,0,121,23,0,116,0,0,106,1,0,116,
0,0,106,2,0,124,1,0,131,2,0,83,87,110,37,0,
4,116,3,0,107,10,0,114,62,0,1,1,1,116,0,0,
106,1,0,116,0,0,106,4,0,124,1,0,131,2,0,83,
89,110,1,0,88,100,0,0,83,41,1,78,41,5,218,7,
95,119,105,110,114,101,103,90,7,79,112,101,110,75,101,121,
90,17,72,75,69,89,95,67,85,82,82,69,78,84,95,85,
83,69,82,114,40,0,0,0,90,18,72,75,69,89,95,76,
79,67,65,76,95,77,65,67,72,73,78,69,41,2,218,3,
99,108,115,218,3,107,101,121,114,4,0,0,0,114,4,0,
0,0,114,5,0,0,0,218,14,95,111,112,101,110,95,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
101,103,105,115,116,114,121,76,2,0,0,115,8,0,0,0,
0,2,3,1,23,1,13,1,122,36,87,105,110,100,111,119,
115,82,101,103,105,115,116,114,121,70,105,110,100,101,114,46,
95,111,112,101,110,95,114,101,103,105,115,116,114,121,99,2,
0,0,0,0,0,0,0,6,0,0,0,16,0,0,0,67,
0,0,0,115,143,0,0,0,124,0,0,106,0,0,114,21,
0,124,0,0,106,1,0,125,2,0,110,9,0,124,0,0,
106,2,0,125,2,0,124,2,0,106,3,0,100,1,0,124,
1,0,100,2,0,116,4,0,106,5,0,100,0,0,100,3,
0,133,2,0,25,131,0,2,125,3,0,121,47,0,124,0,
0,106,6,0,124,3,0,131,1,0,143,25,0,125,4,0,
116,7,0,106,8,0,124,4,0,100,4,0,131,2,0,125,
5,0,87,100,0,0,81,82,88,87,110,22,0,4,116,9,
0,107,10,0,114,138,0,1,1,1,100,0,0,83,89,110,
1,0,88,124,5,0,83,41,5,78,114,126,0,0,0,90,
11,115,121,115,95,118,101,114,115,105,111,110,114,80,0,0,
0,114,30,0,0,0,41,10,218,11,68,69,66,85,71,95,
66,85,73,76,68,218,18,82,69,71,73,83,84,82,89,95,
75,69,89,95,68,69,66,85,71,218,12,82,69,71,73,83,
84,82,89,95,75,69,89,114,47,0,0,0,114,7,0,0,
0,218,7,118,101,114,115,105,111,110,114,172,0,0,0,114,
169,0,0,0,90,10,81,117,101,114,121,86,97,108,117,101,
114,40,0,0,0,41,6,114,170,0,0,0,114,126,0,0,
0,90,12,114,101,103,105,115,116,114,121,95,107,101,121,114,
171,0,0,0,90,4,104,107,101,121,218,8,102,105,108,101,
112,97,116,104,114,4,0,0,0,114,4,0,0,0,114,5,
0,0,0,218,16,95,115,101,97,114,99,104,95,114,101,103,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
105,115,116,114,121,83,2,0,0,115,22,0,0,0,0,2,
9,1,12,2,9,1,15,1,22,1,3,1,18,1,29,1,
13,1,9,1,122,38,87,105,110,100,111,119,115,82,101,103,
105,115,116,114,121,70,105,110,100,101,114,46,95,115,101,97,
114,99,104,95,114,101,103,105,115,116,114,121,78,99,4,0,
0,0,0,0,0,0,8,0,0,0,14,0,0,0,67,0,
0,0,115,158,0,0,0,124,0,0,106,0,0,124,1,0,
131,1,0,125,4,0,124,4,0,100,0,0,107,8,0,114,
31,0,100,0,0,83,121,14,0,116,1,0,124,4,0,131,
1,0,1,87,110,22,0,4,116,2,0,107,10,0,114,69,
0,1,1,1,100,0,0,83,89,110,1,0,88,120,81,0,
116,3,0,131,0,0,68,93,70,0,92,2,0,125,5,0,
125,6,0,124,4,0,106,4,0,116,5,0,124,6,0,131,
1,0,131,1,0,114,80,0,116,6,0,106,7,0,124,1,
0,124,5,0,124,1,0,124,4,0,131,2,0,100,1,0,
124,4,0,131,2,1,125,7,0,124,7,0,83,113,80,0,
87,100,0,0,83,41,2,78,114,158,0,0,0,41,8,114,
178,0,0,0,114,39,0,0,0,114,40,0,0,0,114,161,
0,0,0,114,92,0,0,0,114,93,0,0,0,114,121,0,
0,0,218,16,115,112,101,99,95,102,114,111,109,95,108,111,
97,100,101,114,41,8,114,170,0,0,0,114,126,0,0,0,
114,35,0,0,0,218,6,116,97,114,103,101,116,114,177,0,
0,0,114,127,0,0,0,114,166,0,0,0,114,164,0,0,
0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
218,9,102,105,110,100,95,115,112,101,99,98,2,0,0,115,
26,0,0,0,0,2,15,1,12,1,4,1,3,1,14,1,
13,1,9,1,22,1,21,1,9,1,15,1,9,1,122,31,
87,105,110,100,111,119,115,82,101,103,105,115,116,114,121,70,
105,110,100,101,114,46,102,105,110,100,95,115,112,101,99,99,
3,0,0,0,0,0,0,0,4,0,0,0,3,0,0,0,
67,0,0,0,115,45,0,0,0,124,0,0,106,0,0,124,
1,0,124,2,0,131,2,0,125,3,0,124,3,0,100,1,
0,107,9,0,114,37,0,124,3,0,106,1,0,83,100,1,
0,83,100,1,0,83,41,2,122,108,70,105,110,100,32,109,
111,100,117,108,101,32,110,97,109,101,100,32,105,110,32,116,
104,101,32,114,101,103,105,115,116,114,121,46,10,10,32,32,
32,32,32,32,32,32,84,104,105,115,32,109,101,116,104,111,
100,32,105,115,32,100,101,112,114,101,99,97,116,101,100,46,
32,32,85,115,101,32,101,120,101,99,95,109,111,100,117,108,
101,40,41,32,105,110,115,116,101,97,100,46,10,10,32,32,
32,32,32,32,32,32,78,41,2,114,181,0,0,0,114,127,
0,0,0,41,4,114,170,0,0,0,114,126,0,0,0,114,
35,0,0,0,114,164,0,0,0,114,4,0,0,0,114,4,
0,0,0,114,5,0,0,0,218,11,102,105,110,100,95,109,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
111,100,117,108,101,114,2,0,0,115,8,0,0,0,0,7,
18,1,12,1,7,2,122,33,87,105,110,100,111,119,115,82,
101,103,105,115,116,114,121,70,105,110,100,101,114,46,102,105,
110,100,95,109,111,100,117,108,101,41,12,114,112,0,0,0,
114,111,0,0,0,114,113,0,0,0,114,114,0,0,0,114,
175,0,0,0,114,174,0,0,0,114,173,0,0,0,218,11,
99,108,97,115,115,109,101,116,104,111,100,114,172,0,0,0,
114,178,0,0,0,114,181,0,0,0,114,182,0,0,0,114,
4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,0,114,168,0,0,0,64,2,0,0,115,20,0,0,
0,12,2,6,3,6,3,6,2,6,2,18,7,18,15,3,
1,21,15,3,1,114,168,0,0,0,99,0,0,0,0,0,
0,0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,
70,0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,
100,1,0,90,3,0,100,2,0,100,3,0,132,0,0,90,
4,0,100,4,0,100,5,0,132,0,0,90,5,0,100,6,
0,100,7,0,132,0,0,90,6,0,100,8,0,100,9,0,
132,0,0,90,7,0,100,10,0,83,41,11,218,13,95,76,
111,97,100,101,114,66,97,115,105,99,115,122,83,66,97,115,
101,32,99,108,97,115,115,32,111,102,32,99,111,109,109,111,
110,32,99,111,100,101,32,110,101,101,100,101,100,32,98,121,
32,98,111,116,104,32,83,111,117,114,99,101,76,111,97,100,
101,114,32,97,110,100,10,32,32,32,32,83,111,117,114,99,
101,108,101,115,115,70,105,108,101,76,111,97,100,101,114,46,
99,2,0,0,0,0,0,0,0,5,0,0,0,3,0,0,
0,67,0,0,0,115,88,0,0,0,116,0,0,124,0,0,
106,1,0,124,1,0,131,1,0,131,1,0,100,1,0,25,
125,2,0,124,2,0,106,2,0,100,2,0,100,1,0,131,
2,0,100,3,0,25,125,3,0,124,1,0,106,3,0,100,
2,0,131,1,0,100,4,0,25,125,4,0,124,3,0,100,
5,0,107,2,0,111,87,0,124,4,0,100,5,0,107,3,
0,83,41,6,122,141,67,111,110,99,114,101,116,101,32,105,
109,112,108,101,109,101,110,116,97,116,105,111,110,32,111,102,
32,73,110,115,112,101,99,116,76,111,97,100,101,114,46,105,
115,95,112,97,99,107,97,103,101,32,98,121,32,99,104,101,
99,107,105,110,103,32,105,102,10,32,32,32,32,32,32,32,
32,116,104,101,32,112,97,116,104,32,114,101,116,117,114,110,
101,100,32,98,121,32,103,101,116,95,102,105,108,101,110,97,
109,101,32,104,97,115,32,97,32,102,105,108,101,110,97,109,
101,32,111,102,32,39,95,95,105,110,105,116,95,95,46,112,
121,39,46,114,29,0,0,0,114,58,0,0,0,114,59,0,
0,0,114,56,0,0,0,218,8,95,95,105,110,105,116,95,
95,41,4,114,38,0,0,0,114,157,0,0,0,114,34,0,
0,0,114,32,0,0,0,41,5,114,108,0,0,0,114,126,
0,0,0,114,94,0,0,0,90,13,102,105,108,101,110,97,
109,101,95,98,97,115,101,90,9,116,97,105,108,95,110,97,
109,101,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,114,159,0,0,0,133,2,0,0,115,8,0,0,0,0,
3,25,1,22,1,19,1,122,24,95,76,111,97,100,101,114,
66,97,115,105,99,115,46,105,115,95,112,97,99,107,97,103,
101,99,2,0,0,0,0,0,0,0,2,0,0,0,1,0,
0,0,67,0,0,0,115,4,0,0,0,100,1,0,83,41,
2,122,42,85,115,101,32,100,101,102,97,117,108,116,32,115,
101,109,97,110,116,105,99,115,32,102,111,114,32,109,111,100,
117,108,101,32,99,114,101,97,116,105,111,110,46,78,114,4,
0,0,0,41,2,114,108,0,0,0,114,164,0,0,0,114,
4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,13,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
99,114,101,97,116,101,95,109,111,100,117,108,101,141,2,0,
0,115,0,0,0,0,122,27,95,76,111,97,100,101,114,66,
97,115,105,99,115,46,99,114,101,97,116,101,95,109,111,100,
117,108,101,99,2,0,0,0,0,0,0,0,3,0,0,0,
4,0,0,0,67,0,0,0,115,80,0,0,0,124,0,0,
106,0,0,124,1,0,106,1,0,131,1,0,125,2,0,124,
2,0,100,1,0,107,8,0,114,54,0,116,2,0,100,2,
0,106,3,0,124,1,0,106,1,0,131,1,0,131,1,0,
130,1,0,116,4,0,106,5,0,116,6,0,124,2,0,124,
1,0,106,7,0,131,3,0,1,100,1,0,83,41,3,122,
19,69,120,101,99,117,116,101,32,116,104,101,32,109,111,100,
117,108,101,46,78,122,52,99,97,110,110,111,116,32,108,111,
97,100,32,109,111,100,117,108,101,32,123,33,114,125,32,119,
104,101,110,32,103,101,116,95,99,111,100,101,40,41,32,114,
101,116,117,114,110,115,32,78,111,110,101,41,8,218,8,103,
101,116,95,99,111,100,101,114,112,0,0,0,114,107,0,0,
0,114,47,0,0,0,114,121,0,0,0,218,25,95,99,97,
108,108,95,119,105,116,104,95,102,114,97,109,101,115,95,114,
101,109,111,118,101,100,218,4,101,120,101,99,114,118,0,0,
0,41,3,114,108,0,0,0,218,6,109,111,100,117,108,101,
114,146,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
5,0,0,0,218,11,101,120,101,99,95,109,111,100,117,108,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
101,144,2,0,0,115,10,0,0,0,0,2,18,1,12,1,
9,1,15,1,122,25,95,76,111,97,100,101,114,66,97,115,
105,99,115,46,101,120,101,99,95,109,111,100,117,108,101,99,
2,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,
67,0,0,0,115,16,0,0,0,116,0,0,106,1,0,124,
0,0,124,1,0,131,2,0,83,41,1,78,41,2,114,121,
0,0,0,218,17,95,108,111,97,100,95,109,111,100,117,108,
101,95,115,104,105,109,41,2,114,108,0,0,0,114,126,0,
0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,218,11,108,111,97,100,95,109,111,100,117,108,101,152,2,
0,0,115,2,0,0,0,0,1,122,25,95,76,111,97,100,
101,114,66,97,115,105,99,115,46,108,111,97,100,95,109,111,
100,117,108,101,78,41,8,114,112,0,0,0,114,111,0,0,
0,114,113,0,0,0,114,114,0,0,0,114,159,0,0,0,
114,186,0,0,0,114,191,0,0,0,114,193,0,0,0,114,
4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,0,114,184,0,0,0,128,2,0,0,115,10,0,0,
0,12,3,6,2,12,8,12,3,12,8,114,184,0,0,0,
99,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,
0,64,0,0,0,115,106,0,0,0,101,0,0,90,1,0,
100,0,0,90,2,0,100,1,0,100,2,0,132,0,0,90,
3,0,100,3,0,100,4,0,132,0,0,90,4,0,100,5,
0,100,6,0,132,0,0,90,5,0,100,7,0,100,8,0,
132,0,0,90,6,0,100,9,0,100,10,0,132,0,0,90,
7,0,100,11,0,100,18,0,100,13,0,100,14,0,132,0,
1,90,8,0,100,15,0,100,16,0,132,0,0,90,9,0,
100,17,0,83,41,19,218,12,83,111,117,114,99,101,76,111,
97,100,101,114,99,2,0,0,0,0,0,0,0,2,0,0,
0,1,0,0,0,67,0,0,0,115,10,0,0,0,116,0,
0,130,1,0,100,1,0,83,41,2,122,178,79,112,116,105,
111,110,97,108,32,109,101,116,104,111,100,32,116,104,97,116,
32,114,101,116,117,114,110,115,32,116,104,101,32,109,111,100,
105,102,105,99,97,116,105,111,110,32,116,105,109,101,32,40,
97,110,32,105,110,116,41,32,102,111,114,32,116,104,101,10,
32,32,32,32,32,32,32,32,115,112,101,99,105,102,105,101,
100,32,112,97,116,104,44,32,119,104,101,114,101,32,112,97,
116,104,32,105,115,32,97,32,115,116,114,46,10,10,32,32,
32,32,32,32,32,32,82,97,105,115,101,115,32,73,79,69,
114,114,111,114,32,119,104,101,110,32,116,104,101,32,112,97,
116,104,32,99,97,110,110,111,116,32,98,101,32,104,97,110,
100,108,101,100,46,10,32,32,32,32,32,32,32,32,78,41,
1,218,7,73,79,69,114,114,111,114,41,2,114,108,0,0,
0,114,35,0,0,0,114,4,0,0,0,114,4,0,0,0,
114,5,0,0,0,218,10,112,97,116,104,95,109,116,105,109,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
101,158,2,0,0,115,2,0,0,0,0,6,122,23,83,111,
117,114,99,101,76,111,97,100,101,114,46,112,97,116,104,95,
109,116,105,109,101,99,2,0,0,0,0,0,0,0,2,0,
0,0,3,0,0,0,67,0,0,0,115,19,0,0,0,100,
1,0,124,0,0,106,0,0,124,1,0,131,1,0,105,1,
0,83,41,2,97,170,1,0,0,79,112,116,105,111,110,97,
108,32,109,101,116,104,111,100,32,114,101,116,117,114,110,105,
110,103,32,97,32,109,101,116,97,100,97,116,97,32,100,105,
99,116,32,102,111,114,32,116,104,101,32,115,112,101,99,105,
102,105,101,100,32,112,97,116,104,10,32,32,32,32,32,32,
32,32,116,111,32,98,121,32,116,104,101,32,112,97,116,104,
32,40,115,116,114,41,46,10,32,32,32,32,32,32,32,32,
80,111,115,115,105,98,108,101,32,107,101,121,115,58,10,32,
32,32,32,32,32,32,32,45,32,39,109,116,105,109,101,39,
32,40,109,97,110,100,97,116,111,114,121,41,32,105,115,32,
116,104,101,32,110,117,109,101,114,105,99,32,116,105,109,101,
115,116,97,109,112,32,111,102,32,108,97,115,116,32,115,111,
117,114,99,101,10,32,32,32,32,32,32,32,32,32,32,99,
111,100,101,32,109,111,100,105,102,105,99,97,116,105,111,110,
59,10,32,32,32,32,32,32,32,32,45,32,39,115,105,122,
101,39,32,40,111,112,116,105,111,110,97,108,41,32,105,115,
32,116,104,101,32,115,105,122,101,32,105,110,32,98,121,116,
101,115,32,111,102,32,116,104,101,32,115,111,117,114,99,101,
32,99,111,100,101,46,10,10,32,32,32,32,32,32,32,32,
73,109,112,108,101,109,101,110,116,105,110,103,32,116,104,105,
115,32,109,101,116,104,111,100,32,97,108,108,111,119,115,32,
116,104,101,32,108,111,97,100,101,114,32,116,111,32,114,101,
97,100,32,98,121,116,101,99,111,100,101,32,102,105,108,101,
115,46,10,32,32,32,32,32,32,32,32,82,97,105,115,101,
115,32,73,79,69,114,114,111,114,32,119,104,101,110,32,116,
104,101,32,112,97,116,104,32,99,97,110,110,111,116,32,98,
101,32,104,97,110,100,108,101,100,46,10,32,32,32,32,32,
32,32,32,114,133,0,0,0,41,1,114,196,0,0,0,41,
2,114,108,0,0,0,114,35,0,0,0,114,4,0,0,0,
114,4,0,0,0,114,5,0,0,0,218,10,112,97,116,104,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
95,115,116,97,116,115,166,2,0,0,115,2,0,0,0,0,
11,122,23,83,111,117,114,99,101,76,111,97,100,101,114,46,
112,97,116,104,95,115,116,97,116,115,99,4,0,0,0,0,
0,0,0,4,0,0,0,3,0,0,0,67,0,0,0,115,
16,0,0,0,124,0,0,106,0,0,124,2,0,124,3,0,
131,2,0,83,41,1,122,228,79,112,116,105,111,110,97,108,
32,109,101,116,104,111,100,32,119,104,105,99,104,32,119,114,
105,116,101,115,32,100,97,116,97,32,40,98,121,116,101,115,
41,32,116,111,32,97,32,102,105,108,101,32,112,97,116,104,
32,40,97,32,115,116,114,41,46,10,10,32,32,32,32,32,
32,32,32,73,109,112,108,101,109,101,110,116,105,110,103,32,
116,104,105,115,32,109,101,116,104,111,100,32,97,108,108,111,
119,115,32,102,111,114,32,116,104,101,32,119,114,105,116,105,
110,103,32,111,102,32,98,121,116,101,99,111,100,101,32,102,
105,108,101,115,46,10,10,32,32,32,32,32,32,32,32,84,
104,101,32,115,111,117,114,99,101,32,112,97,116,104,32,105,
115,32,110,101,101,100,101,100,32,105,110,32,111,114,100,101,
114,32,116,111,32,99,111,114,114,101,99,116,108,121,32,116,
114,97,110,115,102,101,114,32,112,101,114,109,105,115,115,105,
111,110,115,10,32,32,32,32,32,32,32,32,41,1,218,8,
115,101,116,95,100,97,116,97,41,4,114,108,0,0,0,114,
90,0,0,0,90,10,99,97,99,104,101,95,112,97,116,104,
114,53,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
5,0,0,0,218,15,95,99,97,99,104,101,95,98,121,116,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
101,99,111,100,101,179,2,0,0,115,2,0,0,0,0,8,
122,28,83,111,117,114,99,101,76,111,97,100,101,114,46,95,
99,97,99,104,101,95,98,121,116,101,99,111,100,101,99,3,
0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,67,
0,0,0,115,4,0,0,0,100,1,0,83,41,2,122,150,
79,112,116,105,111,110,97,108,32,109,101,116,104,111,100,32,
119,104,105,99,104,32,119,114,105,116,101,115,32,100,97,116,
97,32,40,98,121,116,101,115,41,32,116,111,32,97,32,102,
105,108,101,32,112,97,116,104,32,40,97,32,115,116,114,41,
46,10,10,32,32,32,32,32,32,32,32,73,109,112,108,101,
109,101,110,116,105,110,103,32,116,104,105,115,32,109,101,116,
104,111,100,32,97,108,108,111,119,115,32,102,111,114,32,116,
104,101,32,119,114,105,116,105,110,103,32,111,102,32,98,121,
116,101,99,111,100,101,32,102,105,108,101,115,46,10,32,32,
32,32,32,32,32,32,78,114,4,0,0,0,41,3,114,108,
0,0,0,114,35,0,0,0,114,53,0,0,0,114,4,0,
0,0,114,4,0,0,0,114,5,0,0,0,114,198,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,189,2,0,0,115,0,0,0,0,122,21,83,111,117,114,
99,101,76,111,97,100,101,114,46,115,101,116,95,100,97,116,
97,99,2,0,0,0,0,0,0,0,5,0,0,0,16,0,
0,0,67,0,0,0,115,105,0,0,0,124,0,0,106,0,
0,124,1,0,131,1,0,125,2,0,121,19,0,124,0,0,
106,1,0,124,2,0,131,1,0,125,3,0,87,110,58,0,
4,116,2,0,107,10,0,114,94,0,1,125,4,0,1,122,
26,0,116,3,0,100,1,0,100,2,0,124,1,0,131,1,
1,124,4,0,130,2,0,87,89,100,3,0,100,3,0,125,
4,0,126,4,0,88,110,1,0,88,116,4,0,124,3,0,
131,1,0,83,41,4,122,52,67,111,110,99,114,101,116,101,
32,105,109,112,108,101,109,101,110,116,97,116,105,111,110,32,
111,102,32,73,110,115,112,101,99,116,76,111,97,100,101,114,
46,103,101,116,95,115,111,117,114,99,101,46,122,39,115,111,
117,114,99,101,32,110,111,116,32,97,118,97,105,108,97,98,
108,101,32,116,104,114,111,117,103,104,32,103,101,116,95,100,
97,116,97,40,41,114,106,0,0,0,78,41,5,114,157,0,
0,0,218,8,103,101,116,95,100,97,116,97,114,40,0,0,
0,114,107,0,0,0,114,155,0,0,0,41,5,114,108,0,
0,0,114,126,0,0,0,114,35,0,0,0,114,153,0,0,
0,218,3,101,120,99,114,4,0,0,0,114,4,0,0,0,
114,5,0,0,0,218,10,103,101,116,95,115,111,117,114,99,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
101,196,2,0,0,115,14,0,0,0,0,2,15,1,3,1,
19,1,18,1,9,1,31,1,122,23,83,111,117,114,99,101,
76,111,97,100,101,114,46,103,101,116,95,115,111,117,114,99,
101,218,9,95,111,112,116,105,109,105,122,101,114,29,0,0,
0,99,3,0,0,0,1,0,0,0,4,0,0,0,9,0,
0,0,67,0,0,0,115,34,0,0,0,116,0,0,106,1,
0,116,2,0,124,1,0,124,2,0,100,1,0,100,2,0,
100,3,0,100,4,0,124,3,0,131,4,2,83,41,5,122,
130,82,101,116,117,114,110,32,116,104,101,32,99,111,100,101,
32,111,98,106,101,99,116,32,99,111,109,112,105,108,101,100,
32,102,114,111,109,32,115,111,117,114,99,101,46,10,10,32,
32,32,32,32,32,32,32,84,104,101,32,39,100,97,116,97,
39,32,97,114,103,117,109,101,110,116,32,99,97,110,32,98,
101,32,97,110,121,32,111,98,106,101,99,116,32,116,121,112,
101,32,116,104,97,116,32,99,111,109,112,105,108,101,40,41,
32,115,117,112,112,111,114,116,115,46,10,32,32,32,32,32,
32,32,32,114,189,0,0,0,218,12,100,111,110,116,95,105,
110,104,101,114,105,116,84,114,68,0,0,0,41,3,114,121,
0,0,0,114,188,0,0,0,218,7,99,111,109,112,105,108,
101,41,4,114,108,0,0,0,114,53,0,0,0,114,35,0,
0,0,114,203,0,0,0,114,4,0,0,0,114,4,0,0,
0,114,5,0,0,0,218,14,115,111,117,114,99,101,95,116,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
111,95,99,111,100,101,206,2,0,0,115,4,0,0,0,0,
5,21,1,122,27,83,111,117,114,99,101,76,111,97,100,101,
114,46,115,111,117,114,99,101,95,116,111,95,99,111,100,101,
99,2,0,0,0,0,0,0,0,10,0,0,0,43,0,0,
0,67,0,0,0,115,174,1,0,0,124,0,0,106,0,0,
124,1,0,131,1,0,125,2,0,100,1,0,125,3,0,121,
16,0,116,1,0,124,2,0,131,1,0,125,4,0,87,110,
24,0,4,116,2,0,107,10,0,114,63,0,1,1,1,100,
1,0,125,4,0,89,110,202,0,88,121,19,0,124,0,0,
106,3,0,124,2,0,131,1,0,125,5,0,87,110,18,0,
4,116,4,0,107,10,0,114,103,0,1,1,1,89,110,162,
0,88,116,5,0,124,5,0,100,2,0,25,131,1,0,125,
3,0,121,19,0,124,0,0,106,6,0,124,4,0,131,1,
0,125,6,0,87,110,18,0,4,116,7,0,107,10,0,114,
159,0,1,1,1,89,110,106,0,88,121,34,0,116,8,0,
124,6,0,100,3,0,124,5,0,100,4,0,124,1,0,100,
5,0,124,4,0,131,1,3,125,7,0,87,110,24,0,4,
116,9,0,116,10,0,102,2,0,107,10,0,114,220,0,1,
1,1,89,110,45,0,88,116,11,0,100,6,0,124,4,0,
124,2,0,131,3,0,1,116,12,0,124,7,0,100,4,0,
124,1,0,100,7,0,124,4,0,100,8,0,124,2,0,131,
1,3,83,124,0,0,106,6,0,124,2,0,131,1,0,125,
8,0,124,0,0,106,13,0,124,8,0,124,2,0,131,2,
0,125,9,0,116,11,0,100,9,0,124,2,0,131,2,0,
1,116,14,0,106,15,0,12,114,170,1,124,4,0,100,1,
0,107,9,0,114,170,1,124,3,0,100,1,0,107,9,0,
114,170,1,116,16,0,124,9,0,124,3,0,116,17,0,124,
8,0,131,1,0,131,3,0,125,6,0,121,36,0,124,0,
0,106,18,0,124,2,0,124,4,0,124,6,0,131,3,0,
1,116,11,0,100,10,0,124,4,0,131,2,0,1,87,110,
18,0,4,116,2,0,107,10,0,114,169,1,1,1,1,89,
110,1,0,88,124,9,0,83,41,11,122,190,67,111,110,99,
114,101,116,101,32,105,109,112,108,101,109,101,110,116,97,116,
105,111,110,32,111,102,32,73,110,115,112,101,99,116,76,111,
97,100,101,114,46,103,101,116,95,99,111,100,101,46,10,10,
32,32,32,32,32,32,32,32,82,101,97,100,105,110,103,32,
111,102,32,98,121,116,101,99,111,100,101,32,114,101,113,117,
105,114,101,115,32,112,97,116,104,95,115,116,97,116,115,32,
116,111,32,98,101,32,105,109,112,108,101,109,101,110,116,101,
100,46,32,84,111,32,119,114,105,116,101,10,32,32,32,32,
32,32,32,32,98,121,116,101,99,111,100,101,44,32,115,101,
116,95,100,97,116,97,32,109,117,115,116,32,97,108,115,111,
32,98,101,32,105,109,112,108,101,109,101,110,116,101,100,46,
10,10,32,32,32,32,32,32,32,32,78,114,133,0,0,0,
114,138,0,0,0,114,106,0,0,0,114,35,0,0,0,122,
13,123,125,32,109,97,116,99,104,101,115,32,123,125,114,89,
0,0,0,114,90,0,0,0,122,19,99,111,100,101,32,111,
98,106,101,99,116,32,102,114,111,109,32,123,125,122,10,119,
114,111,116,101,32,123,33,114,125,41,19,114,157,0,0,0,
114,79,0,0,0,114,66,0,0,0,114,197,0,0,0,114,
195,0,0,0,114,14,0,0,0,114,200,0,0,0,114,40,
0,0,0,114,141,0,0,0,114,107,0,0,0,114,136,0,
0,0,114,105,0,0,0,114,147,0,0,0,114,206,0,0,
0,114,7,0,0,0,218,19,100,111,110,116,95,119,114,105,
116,101,95,98,121,116,101,99,111,100,101,114,150,0,0,0,
114,31,0,0,0,114,199,0,0,0,41,10,114,108,0,0,
0,114,126,0,0,0,114,90,0,0,0,114,139,0,0,0,
114,89,0,0,0,218,2,115,116,114,53,0,0,0,218,10,
98,121,116,101,115,95,100,97,116,97,114,153,0,0,0,90,
11,99,111,100,101,95,111,98,106,101,99,116,114,4,0,0,
0,114,4,0,0,0,114,5,0,0,0,114,187,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
214,2,0,0,115,78,0,0,0,0,7,15,1,6,1,3,
1,16,1,13,1,11,2,3,1,19,1,13,1,5,2,16,
1,3,1,19,1,13,1,5,2,3,1,9,1,12,1,13,
1,19,1,5,2,9,1,7,1,15,1,6,1,7,1,15,
1,18,1,13,1,22,1,12,1,9,1,15,1,3,1,19,
1,17,1,13,1,5,1,122,21,83,111,117,114,99,101,76,
111,97,100,101,114,46,103,101,116,95,99,111,100,101,78,114,
87,0,0,0,41,10,114,112,0,0,0,114,111,0,0,0,
114,113,0,0,0,114,196,0,0,0,114,197,0,0,0,114,
199,0,0,0,114,198,0,0,0,114,202,0,0,0,114,206,
0,0,0,114,187,0,0,0,114,4,0,0,0,114,4,0,
0,0,114,4,0,0,0,114,5,0,0,0,114,194,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,156,2,0,0,115,14,0,0,0,12,2,12,8,12,13,
12,10,12,7,12,10,18,8,114,194,0,0,0,99,0,0,
0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,
0,0,115,112,0,0,0,101,0,0,90,1,0,100,0,0,
90,2,0,100,1,0,90,3,0,100,2,0,100,3,0,132,
0,0,90,4,0,100,4,0,100,5,0,132,0,0,90,5,
0,100,6,0,100,7,0,132,0,0,90,6,0,101,7,0,
135,0,0,102,1,0,100,8,0,100,9,0,134,0,0,131,
1,0,90,8,0,101,7,0,100,10,0,100,11,0,132,0,
0,131,1,0,90,9,0,100,12,0,100,13,0,132,0,0,
90,10,0,135,0,0,83,41,14,218,10,70,105,108,101,76,
111,97,100,101,114,122,103,66,97,115,101,32,102,105,108,101,
32,108,111,97,100,101,114,32,99,108,97,115,115,32,119,104,
105,99,104,32,105,109,112,108,101,109,101,110,116,115,32,116,
104,101,32,108,111,97,100,101,114,32,112,114,111,116,111,99,
111,108,32,109,101,116,104,111,100,115,32,116,104,97,116,10,
32,32,32,32,114,101,113,117,105,114,101,32,102,105,108,101,
32,115,121,115,116,101,109,32,117,115,97,103,101,46,99,3,
0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,67,
0,0,0,115,22,0,0,0,124,1,0,124,0,0,95,0,
0,124,2,0,124,0,0,95,1,0,100,1,0,83,41,2,
122,75,67,97,99,104,101,32,116,104,101,32,109,111,100,117,
108,101,32,110,97,109,101,32,97,110,100,32,116,104,101,32,
112,97,116,104,32,116,111,32,116,104,101,32,102,105,108,101,
32,102,111,117,110,100,32,98,121,32,116,104,101,10,32,32,
32,32,32,32,32,32,102,105,110,100,101,114,46,78,41,2,
114,106,0,0,0,114,35,0,0,0,41,3,114,108,0,0,
0,114,126,0,0,0,114,35,0,0,0,114,4,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,4,0,0,0,114,5,0,0,0,114,185,0,0,0,15,
3,0,0,115,4,0,0,0,0,3,9,1,122,19,70,105,
108,101,76,111,97,100,101,114,46,95,95,105,110,105,116,95,
95,99,2,0,0,0,0,0,0,0,2,0,0,0,2,0,
0,0,67,0,0,0,115,34,0,0,0,124,0,0,106,0,
0,124,1,0,106,0,0,107,2,0,111,33,0,124,0,0,
106,1,0,124,1,0,106,1,0,107,2,0,83,41,1,78,
41,2,218,9,95,95,99,108,97,115,115,95,95,114,118,0,
0,0,41,2,114,108,0,0,0,218,5,111,116,104,101,114,
114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
6,95,95,101,113,95,95,21,3,0,0,115,4,0,0,0,
0,1,18,1,122,17,70,105,108,101,76,111,97,100,101,114,
46,95,95,101,113,95,95,99,1,0,0,0,0,0,0,0,
1,0,0,0,3,0,0,0,67,0,0,0,115,26,0,0,
0,116,0,0,124,0,0,106,1,0,131,1,0,116,0,0,
124,0,0,106,2,0,131,1,0,65,83,41,1,78,41,3,
218,4,104,97,115,104,114,106,0,0,0,114,35,0,0,0,
41,1,114,108,0,0,0,114,4,0,0,0,114,4,0,0,
0,114,5,0,0,0,218,8,95,95,104,97,115,104,95,95,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
25,3,0,0,115,2,0,0,0,0,1,122,19,70,105,108,
101,76,111,97,100,101,114,46,95,95,104,97,115,104,95,95,
99,2,0,0,0,0,0,0,0,2,0,0,0,3,0,0,
0,3,0,0,0,115,22,0,0,0,116,0,0,116,1,0,
124,0,0,131,2,0,106,2,0,124,1,0,131,1,0,83,
41,1,122,100,76,111,97,100,32,97,32,109,111,100,117,108,
101,32,102,114,111,109,32,97,32,102,105,108,101,46,10,10,
32,32,32,32,32,32,32,32,84,104,105,115,32,109,101,116,
104,111,100,32,105,115,32,100,101,112,114,101,99,97,116,101,
100,46,32,32,85,115,101,32,101,120,101,99,95,109,111,100,
117,108,101,40,41,32,105,110,115,116,101,97,100,46,10,10,
32,32,32,32,32,32,32,32,41,3,218,5,115,117,112,101,
114,114,210,0,0,0,114,193,0,0,0,41,2,114,108,0,
0,0,114,126,0,0,0,41,1,114,211,0,0,0,114,4,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,0,114,5,0,0,0,114,193,0,0,0,28,3,0,
0,115,2,0,0,0,0,10,122,22,70,105,108,101,76,111,
97,100,101,114,46,108,111,97,100,95,109,111,100,117,108,101,
99,2,0,0,0,0,0,0,0,2,0,0,0,1,0,0,
0,67,0,0,0,115,7,0,0,0,124,0,0,106,0,0,
83,41,1,122,58,82,101,116,117,114,110,32,116,104,101,32,
112,97,116,104,32,116,111,32,116,104,101,32,115,111,117,114,
99,101,32,102,105,108,101,32,97,115,32,102,111,117,110,100,
32,98,121,32,116,104,101,32,102,105,110,100,101,114,46,41,
1,114,35,0,0,0,41,2,114,108,0,0,0,114,126,0,
0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,114,157,0,0,0,40,3,0,0,115,2,0,0,0,0,
3,122,23,70,105,108,101,76,111,97,100,101,114,46,103,101,
116,95,102,105,108,101,110,97,109,101,99,2,0,0,0,0,
0,0,0,3,0,0,0,9,0,0,0,67,0,0,0,115,
42,0,0,0,116,0,0,106,1,0,124,1,0,100,1,0,
131,2,0,143,17,0,125,2,0,124,2,0,106,2,0,131,
0,0,83,87,100,2,0,81,82,88,100,2,0,83,41,3,
122,39,82,101,116,117,114,110,32,116,104,101,32,100,97,116,
97,32,102,114,111,109,32,112,97,116,104,32,97,115,32,114,
97,119,32,98,121,116,101,115,46,218,1,114,78,41,3,114,
49,0,0,0,114,50,0,0,0,90,4,114,101,97,100,41,
3,114,108,0,0,0,114,35,0,0,0,114,54,0,0,0,
114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
200,0,0,0,45,3,0,0,115,4,0,0,0,0,2,21,
1,122,19,70,105,108,101,76,111,97,100,101,114,46,103,101,
116,95,100,97,116,97,41,11,114,112,0,0,0,114,111,0,
0,0,114,113,0,0,0,114,114,0,0,0,114,185,0,0,
0,114,213,0,0,0,114,215,0,0,0,114,123,0,0,0,
114,193,0,0,0,114,157,0,0,0,114,200,0,0,0,114,
4,0,0,0,114,4,0,0,0,41,1,114,211,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,5,0,0,0,114,210,0,0,0,10,3,0,0,115,14,
0,0,0,12,3,6,2,12,6,12,4,12,3,24,12,18,
5,114,210,0,0,0,99,0,0,0,0,0,0,0,0,0,
0,0,0,4,0,0,0,64,0,0,0,115,64,0,0,0,
101,0,0,90,1,0,100,0,0,90,2,0,100,1,0,90,
3,0,100,2,0,100,3,0,132,0,0,90,4,0,100,4,
0,100,5,0,132,0,0,90,5,0,100,6,0,100,7,0,
100,8,0,100,9,0,132,0,1,90,6,0,100,10,0,83,
41,11,218,16,83,111,117,114,99,101,70,105,108,101,76,111,
97,100,101,114,122,62,67,111,110,99,114,101,116,101,32,105,
109,112,108,101,109,101,110,116,97,116,105,111,110,32,111,102,
32,83,111,117,114,99,101,76,111,97,100,101,114,32,117,115,
105,110,103,32,116,104,101,32,102,105,108,101,32,115,121,115,
116,101,109,46,99,2,0,0,0,0,0,0,0,3,0,0,
0,4,0,0,0,67,0,0,0,115,34,0,0,0,116,0,
0,124,1,0,131,1,0,125,2,0,100,1,0,124,2,0,
106,1,0,100,2,0,124,2,0,106,2,0,105,2,0,83,
41,3,122,33,82,101,116,117,114,110,32,116,104,101,32,109,
101,116,97,100,97,116,97,32,102,111,114,32,116,104,101,32,
112,97,116,104,46,114,133,0,0,0,114,134,0,0,0,41,
3,114,39,0,0,0,218,8,115,116,95,109,116,105,109,101,
90,7,115,116,95,115,105,122,101,41,3,114,108,0,0,0,
114,35,0,0,0,114,208,0,0,0,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
4,0,0,0,114,5,0,0,0,114,197,0,0,0,55,3,
0,0,115,4,0,0,0,0,2,12,1,122,27,83,111,117,
114,99,101,70,105,108,101,76,111,97,100,101,114,46,112,97,
116,104,95,115,116,97,116,115,99,4,0,0,0,0,0,0,
0,5,0,0,0,5,0,0,0,67,0,0,0,115,34,0,
0,0,116,0,0,124,1,0,131,1,0,125,4,0,124,0,
0,106,1,0,124,2,0,124,3,0,100,1,0,124,4,0,
131,2,1,83,41,2,78,218,5,95,109,111,100,101,41,2,
114,97,0,0,0,114,198,0,0,0,41,5,114,108,0,0,
0,114,90,0,0,0,114,89,0,0,0,114,53,0,0,0,
114,42,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
5,0,0,0,114,199,0,0,0,60,3,0,0,115,4,0,
0,0,0,2,12,1,122,32,83,111,117,114,99,101,70,105,
108,101,76,111,97,100,101,114,46,95,99,97,99,104,101,95,
98,121,116,101,99,111,100,101,114,220,0,0,0,105,182,1,
0,0,99,3,0,0,0,1,0,0,0,9,0,0,0,17,
0,0,0,67,0,0,0,115,53,1,0,0,116,0,0,124,
1,0,131,1,0,92,2,0,125,4,0,125,5,0,103,0,
0,125,6,0,120,54,0,124,4,0,114,80,0,116,1,0,
124,4,0,131,1,0,12,114,80,0,116,0,0,124,4,0,
131,1,0,92,2,0,125,4,0,125,7,0,124,6,0,106,
2,0,124,7,0,131,1,0,1,113,27,0,87,120,132,0,
116,3,0,124,6,0,131,1,0,68,93,118,0,125,7,0,
116,4,0,124,4,0,124,7,0,131,2,0,125,4,0,121,
17,0,116,5,0,106,6,0,124,4,0,131,1,0,1,87,
113,94,0,4,116,7,0,107,10,0,114,155,0,1,1,1,
119,94,0,89,113,94,0,4,116,8,0,107,10,0,114,211,
0,1,125,8,0,1,122,25,0,116,9,0,100,1,0,124,
4,0,124,8,0,131,3,0,1,100,2,0,83,87,89,100,
2,0,100,2,0,125,8,0,126,8,0,88,113,94,0,88,
113,94,0,87,121,33,0,116,10,0,124,1,0,124,2,0,
124,3,0,131,3,0,1,116,9,0,100,3,0,124,1,0,
131,2,0,1,87,110,53,0,4,116,8,0,107,10,0,114,
48,1,1,125,8,0,1,122,21,0,116,9,0,100,1,0,
124,1,0,124,8,0,131,3,0,1,87,89,100,2,0,100,
2,0,125,8,0,126,8,0,88,110,1,0,88,100,2,0,
83,41,4,122,27,87,114,105,116,101,32,98,121,116,101,115,
32,100,97,116,97,32,116,111,32,97,32,102,105,108,101,46,
122,27,99,111,117,108,100,32,110,111,116,32,99,114,101,97,
116,101,32,123,33,114,125,58,32,123,33,114,125,78,122,12,
99,114,101,97,116,101,100,32,123,33,114,125,41,11,114,38,
0,0,0,114,46,0,0,0,114,163,0,0,0,114,33,0,
0,0,114,28,0,0,0,114,3,0,0,0,90,5,109,107,
100,105,114,218,15,70,105,108,101,69,120,105,115,116,115,69,
114,114,111,114,114,40,0,0,0,114,105,0,0,0,114,55,
0,0,0,41,9,114,108,0,0,0,114,35,0,0,0,114,
53,0,0,0,114,220,0,0,0,218,6,112,97,114,101,110,
116,114,94,0,0,0,114,27,0,0,0,114,23,0,0,0,
114,201,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
5,0,0,0,114,198,0,0,0,65,3,0,0,115,38,0,
0,0,0,2,18,1,6,2,22,1,18,1,17,2,19,1,
15,1,3,1,17,1,13,2,7,1,18,3,16,1,27,1,
3,1,16,1,17,1,18,2,122,25,83,111,117,114,99,101,
70,105,108,101,76,111,97,100,101,114,46,115,101,116,95,100,
97,116,97,78,41,7,114,112,0,0,0,114,111,0,0,0,
114,113,0,0,0,114,114,0,0,0,114,197,0,0,0,114,
199,0,0,0,114,198,0,0,0,114,4,0,0,0,114,4,
0,0,0,114,4,0,0,0,114,5,0,0,0,114,218,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,51,3,0,0,115,8,0,0,0,12,2,6,2,12,
5,12,5,114,218,0,0,0,99,0,0,0,0,0,0,0,
0,0,0,0,0,2,0,0,0,64,0,0,0,115,46,0,
0,0,101,0,0,90,1,0,100,0,0,90,2,0,100,1,
0,90,3,0,100,2,0,100,3,0,132,0,0,90,4,0,
100,4,0,100,5,0,132,0,0,90,5,0,100,6,0,83,
41,7,218,20,83,111,117,114,99,101,108,101,115,115,70,105,
108,101,76,111,97,100,101,114,122,45,76,111,97,100,101,114,
32,119,104,105,99,104,32,104,97,110,100,108,101,115,32,115,
111,117,114,99,101,108,101,115,115,32,102,105,108,101,32,105,
109,112,111,114,116,115,46,99,2,0,0,0,0,0,0,0,
5,0,0,0,6,0,0,0,67,0,0,0,115,76,0,0,
0,124,0,0,106,0,0,124,1,0,131,1,0,125,2,0,
124,0,0,106,1,0,124,2,0,131,1,0,125,3,0,116,
2,0,124,3,0,100,1,0,124,1,0,100,2,0,124,2,
0,131,1,2,125,4,0,116,3,0,124,4,0,100,1,0,
124,1,0,100,3,0,124,2,0,131,1,2,83,41,4,78,
114,106,0,0,0,114,35,0,0,0,114,89,0,0,0,41,
4,114,157,0,0,0,114,200,0,0,0,114,141,0,0,0,
114,147,0,0,0,41,5,114,108,0,0,0,114,126,0,0,
0,114,35,0,0,0,114,53,0,0,0,114,209,0,0,0,
114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
187,0,0,0,98,3,0,0,115,8,0,0,0,0,1,15,
1,15,1,24,1,122,29,83,111,117,114,99,101,108,101,115,
115,70,105,108,101,76,111,97,100,101,114,46,103,101,116,95,
99,111,100,101,99,2,0,0,0,0,0,0,0,2,0,0,
0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,
0,83,41,2,122,39,82,101,116,117,114,110,32,78,111,110,
101,32,97,115,32,116,104,101,114,101,32,105,115,32,110,111,
32,115,111,117,114,99,101,32,99,111,100,101,46,78,114,4,
0,0,0,41,2,114,108,0,0,0,114,126,0,0,0,114,
4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,202,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,0,104,3,0,0,115,2,0,0,0,0,2,122,31,
83,111,117,114,99,101,108,101,115,115,70,105,108,101,76,111,
97,100,101,114,46,103,101,116,95,115,111,117,114,99,101,78,
41,6,114,112,0,0,0,114,111,0,0,0,114,113,0,0,
0,114,114,0,0,0,114,187,0,0,0,114,202,0,0,0,
114,4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
5,0,0,0,114,223,0,0,0,94,3,0,0,115,6,0,
0,0,12,2,6,2,12,6,114,223,0,0,0,99,0,0,
0,0,0,0,0,0,0,0,0,0,3,0,0,0,64,0,
0,0,115,136,0,0,0,101,0,0,90,1,0,100,0,0,
90,2,0,100,1,0,90,3,0,100,2,0,100,3,0,132,
0,0,90,4,0,100,4,0,100,5,0,132,0,0,90,5,
0,100,6,0,100,7,0,132,0,0,90,6,0,100,8,0,
100,9,0,132,0,0,90,7,0,100,10,0,100,11,0,132,
0,0,90,8,0,100,12,0,100,13,0,132,0,0,90,9,
0,100,14,0,100,15,0,132,0,0,90,10,0,100,16,0,
100,17,0,132,0,0,90,11,0,101,12,0,100,18,0,100,
19,0,132,0,0,131,1,0,90,13,0,100,20,0,83,41,
21,218,19,69,120,116,101,110,115,105,111,110,70,105,108,101,
76,111,97,100,101,114,122,93,76,111,97,100,101,114,32,102,
111,114,32,101,120,116,101,110,115,105,111,110,32,109,111,100,
117,108,101,115,46,10,10,32,32,32,32,84,104,101,32,99,
111,110,115,116,114,117,99,116,111,114,32,105,115,32,100,101,
115,105,103,110,101,100,32,116,111,32,119,111,114,107,32,119,
105,116,104,32,70,105,108,101,70,105,110,100,101,114,46,10,
10,32,32,32,32,99,3,0,0,0,0,0,0,0,3,0,
0,0,2,0,0,0,67,0,0,0,115,22,0,0,0,124,
1,0,124,0,0,95,0,0,124,2,0,124,0,0,95,1,
0,100,0,0,83,41,1,78,41,2,114,106,0,0,0,114,
35,0,0,0,41,3,114,108,0,0,0,114,106,0,0,0,
114,35,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
5,0,0,0,114,185,0,0,0,121,3,0,0,115,4,0,
0,0,0,1,9,1,122,28,69,120,116,101,110,115,105,111,
110,70,105,108,101,76,111,97,100,101,114,46,95,95,105,110,
105,116,95,95,99,2,0,0,0,0,0,0,0,2,0,0,
0,2,0,0,0,67,0,0,0,115,34,0,0,0,124,0,
0,106,0,0,124,1,0,106,0,0,107,2,0,111,33,0,
124,0,0,106,1,0,124,1,0,106,1,0,107,2,0,83,
41,1,78,41,2,114,211,0,0,0,114,118,0,0,0,41,
2,114,108,0,0,0,114,212,0,0,0,114,4,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,4,0,0,0,114,5,0,0,0,114,213,0,0,0,125,
3,0,0,115,4,0,0,0,0,1,18,1,122,26,69,120,
116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,
114,46,95,95,101,113,95,95,99,1,0,0,0,0,0,0,
0,1,0,0,0,3,0,0,0,67,0,0,0,115,26,0,
0,0,116,0,0,124,0,0,106,1,0,131,1,0,116,0,
0,124,0,0,106,2,0,131,1,0,65,83,41,1,78,41,
3,114,214,0,0,0,114,106,0,0,0,114,35,0,0,0,
41,1,114,108,0,0,0,114,4,0,0,0,114,4,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,114,5,0,0,0,114,215,0,0,0,129,3,0,0,115,
2,0,0,0,0,1,122,28,69,120,116,101,110,115,105,111,
110,70,105,108,101,76,111,97,100,101,114,46,95,95,104,97,
115,104,95,95,99,2,0,0,0,0,0,0,0,3,0,0,
0,4,0,0,0,67,0,0,0,115,47,0,0,0,116,0,
0,106,1,0,116,2,0,106,3,0,124,1,0,131,2,0,
125,2,0,116,4,0,100,1,0,124,1,0,106,5,0,124,
0,0,106,6,0,131,3,0,1,124,2,0,83,41,2,122,
38,67,114,101,97,116,101,32,97,110,32,117,110,105,116,105,
97,108,105,122,101,100,32,101,120,116,101,110,115,105,111,110,
32,109,111,100,117,108,101,122,38,101,120,116,101,110,115,105,
111,110,32,109,111,100,117,108,101,32,123,33,114,125,32,108,
111,97,100,101,100,32,102,114,111,109,32,123,33,114,125,41,
7,114,121,0,0,0,114,188,0,0,0,114,145,0,0,0,
90,14,99,114,101,97,116,101,95,100,121,110,97,109,105,99,
114,105,0,0,0,114,106,0,0,0,114,35,0,0,0,41,
3,114,108,0,0,0,114,164,0,0,0,114,190,0,0,0,
114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
186,0,0,0,132,3,0,0,115,10,0,0,0,0,2,6,
1,15,1,6,1,16,1,122,33,69,120,116,101,110,115,105,
111,110,70,105,108,101,76,111,97,100,101,114,46,99,114,101,
97,116,101,95,109,111,100,117,108,101,99,2,0,0,0,0,
0,0,0,2,0,0,0,4,0,0,0,67,0,0,0,115,
45,0,0,0,116,0,0,106,1,0,116,2,0,106,3,0,
124,1,0,131,2,0,1,116,4,0,100,1,0,124,0,0,
106,5,0,124,0,0,106,6,0,131,3,0,1,100,2,0,
83,41,3,122,30,73,110,105,116,105,97,108,105,122,101,32,
97,110,32,101,120,116,101,110,115,105,111,110,32,109,111,100,
117,108,101,122,40,101,120,116,101,110,115,105,111,110,32,109,
111,100,117,108,101,32,123,33,114,125,32,101,120,101,99,117,
116,101,100,32,102,114,111,109,32,123,33,114,125,78,41,7,
114,121,0,0,0,114,188,0,0,0,114,145,0,0,0,90,
12,101,120,101,99,95,100,121,110,97,109,105,99,114,105,0,
0,0,114,106,0,0,0,114,35,0,0,0,41,2,114,108,
0,0,0,114,190,0,0,0,114,4,0,0,0,114,4,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,114,5,0,0,0,114,191,0,0,0,140,3,0,0,
115,6,0,0,0,0,2,19,1,6,1,122,31,69,120,116,
101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,114,
46,101,120,101,99,95,109,111,100,117,108,101,99,2,0,0,
0,0,0,0,0,2,0,0,0,4,0,0,0,3,0,0,
0,115,48,0,0,0,116,0,0,124,0,0,106,1,0,131,
1,0,100,1,0,25,137,0,0,116,2,0,135,0,0,102,
1,0,100,2,0,100,3,0,134,0,0,116,3,0,68,131,
1,0,131,1,0,83,41,4,122,49,82,101,116,117,114,110,
32,84,114,117,101,32,105,102,32,116,104,101,32,101,120,116,
101,110,115,105,111,110,32,109,111,100,117,108,101,32,105,115,
32,97,32,112,97,99,107,97,103,101,46,114,29,0,0,0,
99,1,0,0,0,0,0,0,0,2,0,0,0,4,0,0,
0,51,0,0,0,115,31,0,0,0,124,0,0,93,21,0,
125,1,0,136,0,0,100,0,0,124,1,0,23,107,2,0,
86,1,113,3,0,100,1,0,83,41,2,114,185,0,0,0,
78,114,4,0,0,0,41,2,114,22,0,0,0,218,6,115,
117,102,102,105,120,41,1,218,9,102,105,108,101,95,110,97,
109,101,114,4,0,0,0,114,5,0,0,0,250,9,60,103,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
101,110,101,120,112,114,62,149,3,0,0,115,2,0,0,0,
6,1,122,49,69,120,116,101,110,115,105,111,110,70,105,108,
101,76,111,97,100,101,114,46,105,115,95,112,97,99,107,97,
103,101,46,60,108,111,99,97,108,115,62,46,60,103,101,110,
101,120,112,114,62,41,4,114,38,0,0,0,114,35,0,0,
0,218,3,97,110,121,218,18,69,88,84,69,78,83,73,79,
78,95,83,85,70,70,73,88,69,83,41,2,114,108,0,0,
0,114,126,0,0,0,114,4,0,0,0,41,1,114,226,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,114,5,0,0,0,114,159,0,0,0,146,3,0,0,
115,6,0,0,0,0,2,19,1,18,1,122,30,69,120,116,
101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,114,
46,105,115,95,112,97,99,107,97,103,101,99,2,0,0,0,
0,0,0,0,2,0,0,0,1,0,0,0,67,0,0,0,
115,4,0,0,0,100,1,0,83,41,2,122,63,82,101,116,
117,114,110,32,78,111,110,101,32,97,115,32,97,110,32,101,
120,116,101,110,115,105,111,110,32,109,111,100,117,108,101,32,
99,97,110,110,111,116,32,99,114,101,97,116,101,32,97,32,
99,111,100,101,32,111,98,106,101,99,116,46,78,114,4,0,
0,0,41,2,114,108,0,0,0,114,126,0,0,0,114,4,
0,0,0,114,4,0,0,0,114,5,0,0,0,114,187,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,152,3,0,0,115,2,0,0,0,0,2,122,28,69,
120,116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,
101,114,46,103,101,116,95,99,111,100,101,99,2,0,0,0,
0,0,0,0,2,0,0,0,1,0,0,0,67,0,0,0,
115,4,0,0,0,100,1,0,83,41,2,122,53,82,101,116,
117,114,110,32,78,111,110,101,32,97,115,32,101,120,116,101,
110,115,105,111,110,32,109,111,100,117,108,101,115,32,104,97,
118,101,32,110,111,32,115,111,117,114,99,101,32,99,111,100,
101,46,78,114,4,0,0,0,41,2,114,108,0,0,0,114,
126,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,0,114,202,0,0,0,156,3,0,0,115,2,0,0,
0,0,2,122,30,69,120,116,101,110,115,105,111,110,70,105,
108,101,76,111,97,100,101,114,46,103,101,116,95,115,111,117,
114,99,101,99,2,0,0,0,0,0,0,0,2,0,0,0,
1,0,0,0,67,0,0,0,115,7,0,0,0,124,0,0,
106,0,0,83,41,1,122,58,82,101,116,117,114,110,32,116,
104,101,32,112,97,116,104,32,116,111,32,116,104,101,32,115,
111,117,114,99,101,32,102,105,108,101,32,97,115,32,102,111,
117,110,100,32,98,121,32,116,104,101,32,102,105,110,100,101,
114,46,41,1,114,35,0,0,0,41,2,114,108,0,0,0,
114,126,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
5,0,0,0,114,157,0,0,0,160,3,0,0,115,2,0,
0,0,0,3,122,32,69,120,116,101,110,115,105,111,110,70,
105,108,101,76,111,97,100,101,114,46,103,101,116,95,102,105,
108,101,110,97,109,101,78,41,14,114,112,0,0,0,114,111,
0,0,0,114,113,0,0,0,114,114,0,0,0,114,185,0,
0,0,114,213,0,0,0,114,215,0,0,0,114,186,0,0,
0,114,191,0,0,0,114,159,0,0,0,114,187,0,0,0,
114,202,0,0,0,114,123,0,0,0,114,157,0,0,0,114,
4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,0,114,224,0,0,0,113,3,0,0,115,20,0,0,
0,12,6,6,2,12,4,12,4,12,3,12,8,12,6,12,
6,12,4,12,4,114,224,0,0,0,99,0,0,0,0,0,
0,0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,
130,0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,
100,1,0,90,3,0,100,2,0,100,3,0,132,0,0,90,
4,0,100,4,0,100,5,0,132,0,0,90,5,0,100,6,
0,100,7,0,132,0,0,90,6,0,100,8,0,100,9,0,
132,0,0,90,7,0,100,10,0,100,11,0,132,0,0,90,
8,0,100,12,0,100,13,0,132,0,0,90,9,0,100,14,
0,100,15,0,132,0,0,90,10,0,100,16,0,100,17,0,
132,0,0,90,11,0,100,18,0,100,19,0,132,0,0,90,
12,0,100,20,0,83,41,21,218,14,95,78,97,109,101,115,
112,97,99,101,80,97,116,104,97,38,1,0,0,82,101,112,
114,101,115,101,110,116,115,32,97,32,110,97,109,101,115,112,
97,99,101,32,112,97,99,107,97,103,101,39,115,32,112,97,
116,104,46,32,32,73,116,32,117,115,101,115,32,116,104,101,
32,109,111,100,117,108,101,32,110,97,109,101,10,32,32,32,
32,116,111,32,102,105,110,100,32,105,116,115,32,112,97,114,
101,110,116,32,109,111,100,117,108,101,44,32,97,110,100,32,
102,114,111,109,32,116,104,101,114,101,32,105,116,32,108,111,
111,107,115,32,117,112,32,116,104,101,32,112,97,114,101,110,
116,39,115,10,32,32,32,32,95,95,112,97,116,104,95,95,
46,32,32,87,104,101,110,32,116,104,105,115,32,99,104,97,
110,103,101,115,44,32,116,104,101,32,109,111,100,117,108,101,
39,115,32,111,119,110,32,112,97,116,104,32,105,115,32,114,
101,99,111,109,112,117,116,101,100,44,10,32,32,32,32,117,
115,105,110,103,32,112,97,116,104,95,102,105,110,100,101,114,
46,32,32,70,111,114,32,116,111,112,45,108,101,118,101,108,
32,109,111,100,117,108,101,115,44,32,116,104,101,32,112,97,
114,101,110,116,32,109,111,100,117,108,101,39,115,32,112,97,
116,104,10,32,32,32,32,105,115,32,115,121,115,46,112,97,
116,104,46,99,4,0,0,0,0,0,0,0,4,0,0,0,
2,0,0,0,67,0,0,0,115,52,0,0,0,124,1,0,
124,0,0,95,0,0,124,2,0,124,0,0,95,1,0,116,
2,0,124,0,0,106,3,0,131,0,0,131,1,0,124,0,
0,95,4,0,124,3,0,124,0,0,95,5,0,100,0,0,
83,41,1,78,41,6,218,5,95,110,97,109,101,218,5,95,
112,97,116,104,114,93,0,0,0,218,16,95,103,101,116,95,
112,97,114,101,110,116,95,112,97,116,104,218,17,95,108,97,
115,116,95,112,97,114,101,110,116,95,112,97,116,104,218,12,
95,112,97,116,104,95,102,105,110,100,101,114,41,4,114,108,
0,0,0,114,106,0,0,0,114,35,0,0,0,218,11,112,
97,116,104,95,102,105,110,100,101,114,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
4,0,0,0,114,5,0,0,0,114,185,0,0,0,173,3,
0,0,115,8,0,0,0,0,1,9,1,9,1,21,1,122,
23,95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,
95,95,105,110,105,116,95,95,99,1,0,0,0,0,0,0,
0,4,0,0,0,3,0,0,0,67,0,0,0,115,53,0,
0,0,124,0,0,106,0,0,106,1,0,100,1,0,131,1,
0,92,3,0,125,1,0,125,2,0,125,3,0,124,2,0,
100,2,0,107,2,0,114,43,0,100,6,0,83,124,1,0,
100,5,0,102,2,0,83,41,7,122,62,82,101,116,117,114,
110,115,32,97,32,116,117,112,108,101,32,111,102,32,40,112,
97,114,101,110,116,45,109,111,100,117,108,101,45,110,97,109,
101,44,32,112,97,114,101,110,116,45,112,97,116,104,45,97,
116,116,114,45,110,97,109,101,41,114,58,0,0,0,114,30,
0,0,0,114,7,0,0,0,114,35,0,0,0,90,8,95,
95,112,97,116,104,95,95,41,2,122,3,115,121,115,122,4,
112,97,116,104,41,2,114,231,0,0,0,114,32,0,0,0,
41,4,114,108,0,0,0,114,222,0,0,0,218,3,100,111,
116,90,2,109,101,114,4,0,0,0,114,4,0,0,0,114,
5,0,0,0,218,23,95,102,105,110,100,95,112,97,114,101,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
110,116,95,112,97,116,104,95,110,97,109,101,115,179,3,0,
0,115,8,0,0,0,0,2,27,1,12,2,4,3,122,38,
95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,
102,105,110,100,95,112,97,114,101,110,116,95,112,97,116,104,
95,110,97,109,101,115,99,1,0,0,0,0,0,0,0,3,
0,0,0,3,0,0,0,67,0,0,0,115,38,0,0,0,
124,0,0,106,0,0,131,0,0,92,2,0,125,1,0,125,
2,0,116,1,0,116,2,0,106,3,0,124,1,0,25,124,
2,0,131,2,0,83,41,1,78,41,4,114,238,0,0,0,
114,117,0,0,0,114,7,0,0,0,218,7,109,111,100,117,
108,101,115,41,3,114,108,0,0,0,90,18,112,97,114,101,
110,116,95,109,111,100,117,108,101,95,110,97,109,101,90,14,
112,97,116,104,95,97,116,116,114,95,110,97,109,101,114,4,
0,0,0,114,4,0,0,0,114,5,0,0,0,114,233,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,189,3,0,0,115,4,0,0,0,0,1,18,1,122,
31,95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,
95,103,101,116,95,112,97,114,101,110,116,95,112,97,116,104,
99,1,0,0,0,0,0,0,0,3,0,0,0,3,0,0,
0,67,0,0,0,115,118,0,0,0,116,0,0,124,0,0,
106,1,0,131,0,0,131,1,0,125,1,0,124,1,0,124,
0,0,106,2,0,107,3,0,114,111,0,124,0,0,106,3,
0,124,0,0,106,4,0,124,1,0,131,2,0,125,2,0,
124,2,0,100,0,0,107,9,0,114,102,0,124,2,0,106,
5,0,100,0,0,107,8,0,114,102,0,124,2,0,106,6,
0,114,102,0,124,2,0,106,6,0,124,0,0,95,7,0,
124,1,0,124,0,0,95,2,0,124,0,0,106,7,0,83,
41,1,78,41,8,114,93,0,0,0,114,233,0,0,0,114,
234,0,0,0,114,235,0,0,0,114,231,0,0,0,114,127,
0,0,0,114,156,0,0,0,114,232,0,0,0,41,3,114,
108,0,0,0,90,11,112,97,114,101,110,116,95,112,97,116,
104,114,164,0,0,0,114,4,0,0,0,114,4,0,0,0,
114,5,0,0,0,218,12,95,114,101,99,97,108,99,117,108,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
97,116,101,193,3,0,0,115,16,0,0,0,0,2,18,1,
15,1,21,3,27,1,9,1,12,1,9,1,122,27,95,78,
97,109,101,115,112,97,99,101,80,97,116,104,46,95,114,101,
99,97,108,99,117,108,97,116,101,99,1,0,0,0,0,0,
0,0,1,0,0,0,2,0,0,0,67,0,0,0,115,16,
0,0,0,116,0,0,124,0,0,106,1,0,131,0,0,131,
1,0,83,41,1,78,41,2,218,4,105,116,101,114,114,240,
0,0,0,41,1,114,108,0,0,0,114,4,0,0,0,114,
4,0,0,0,114,5,0,0,0,218,8,95,95,105,116,101,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,95,95,206,3,0,0,115,2,0,0,0,0,1,122,23,
95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,
95,105,116,101,114,95,95,99,1,0,0,0,0,0,0,0,
1,0,0,0,2,0,0,0,67,0,0,0,115,16,0,0,
0,116,0,0,124,0,0,106,1,0,131,0,0,131,1,0,
83,41,1,78,41,2,114,31,0,0,0,114,240,0,0,0,
41,1,114,108,0,0,0,114,4,0,0,0,114,4,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,114,5,0,0,0,218,7,95,95,108,101,110,95,95,209,
3,0,0,115,2,0,0,0,0,1,122,22,95,78,97,109,
101,115,112,97,99,101,80,97,116,104,46,95,95,108,101,110,
95,95,99,1,0,0,0,0,0,0,0,1,0,0,0,2,
0,0,0,67,0,0,0,115,16,0,0,0,100,1,0,106,
0,0,124,0,0,106,1,0,131,1,0,83,41,2,78,122,
20,95,78,97,109,101,115,112,97,99,101,80,97,116,104,40,
123,33,114,125,41,41,2,114,47,0,0,0,114,232,0,0,
0,41,1,114,108,0,0,0,114,4,0,0,0,114,4,0,
0,0,114,5,0,0,0,218,8,95,95,114,101,112,114,95,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
95,212,3,0,0,115,2,0,0,0,0,1,122,23,95,78,
97,109,101,115,112,97,99,101,80,97,116,104,46,95,95,114,
101,112,114,95,95,99,2,0,0,0,0,0,0,0,2,0,
0,0,2,0,0,0,67,0,0,0,115,16,0,0,0,124,
1,0,124,0,0,106,0,0,131,0,0,107,6,0,83,41,
1,78,41,1,114,240,0,0,0,41,2,114,108,0,0,0,
218,4,105,116,101,109,114,4,0,0,0,114,4,0,0,0,
114,5,0,0,0,218,12,95,95,99,111,110,116,97,105,110,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
115,95,95,215,3,0,0,115,2,0,0,0,0,1,122,27,
95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,
95,99,111,110,116,97,105,110,115,95,95,99,2,0,0,0,
0,0,0,0,2,0,0,0,2,0,0,0,67,0,0,0,
115,20,0,0,0,124,0,0,106,0,0,106,1,0,124,1,
0,131,1,0,1,100,0,0,83,41,1,78,41,2,114,232,
0,0,0,114,163,0,0,0,41,2,114,108,0,0,0,114,
245,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,0,114,163,0,0,0,218,3,0,0,115,2,0,0,
0,0,1,122,21,95,78,97,109,101,115,112,97,99,101,80,
97,116,104,46,97,112,112,101,110,100,78,41,13,114,112,0,
0,0,114,111,0,0,0,114,113,0,0,0,114,114,0,0,
0,114,185,0,0,0,114,238,0,0,0,114,233,0,0,0,
114,240,0,0,0,114,242,0,0,0,114,243,0,0,0,114,
244,0,0,0,114,246,0,0,0,114,163,0,0,0,114,4,
0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,114,230,0,0,0,166,3,0,0,115,20,0,0,0,
12,5,6,2,12,6,12,10,12,4,12,13,12,3,12,3,
12,3,12,3,114,230,0,0,0,99,0,0,0,0,0,0,
0,0,0,0,0,0,3,0,0,0,64,0,0,0,115,118,
0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,100,
1,0,100,2,0,132,0,0,90,3,0,101,4,0,100,3,
0,100,4,0,132,0,0,131,1,0,90,5,0,100,5,0,
100,6,0,132,0,0,90,6,0,100,7,0,100,8,0,132,
0,0,90,7,0,100,9,0,100,10,0,132,0,0,90,8,
0,100,11,0,100,12,0,132,0,0,90,9,0,100,13,0,
100,14,0,132,0,0,90,10,0,100,15,0,100,16,0,132,
0,0,90,11,0,100,17,0,83,41,18,218,16,95,78,97,
109,101,115,112,97,99,101,76,111,97,100,101,114,99,4,0,
0,0,0,0,0,0,4,0,0,0,4,0,0,0,67,0,
0,0,115,25,0,0,0,116,0,0,124,1,0,124,2,0,
124,3,0,131,3,0,124,0,0,95,1,0,100,0,0,83,
41,1,78,41,2,114,230,0,0,0,114,232,0,0,0,41,
4,114,108,0,0,0,114,106,0,0,0,114,35,0,0,0,
114,236,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
5,0,0,0,114,185,0,0,0,224,3,0,0,115,2,0,
0,0,0,1,122,25,95,78,97,109,101,115,112,97,99,101,
76,111,97,100,101,114,46,95,95,105,110,105,116,95,95,99,
2,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,
67,0,0,0,115,16,0,0,0,100,1,0,106,0,0,124,
1,0,106,1,0,131,1,0,83,41,2,122,115,82,101,116,
117,114,110,32,114,101,112,114,32,102,111,114,32,116,104,101,
32,109,111,100,117,108,101,46,10,10,32,32,32,32,32,32,
32,32,84,104,101,32,109,101,116,104,111,100,32,105,115,32,
100,101,112,114,101,99,97,116,101,100,46,32,32,84,104,101,
32,105,109,112,111,114,116,32,109,97,99,104,105,110,101,114,
121,32,100,111,101,115,32,116,104,101,32,106,111,98,32,105,
116,115,101,108,102,46,10,10,32,32,32,32,32,32,32,32,
122,25,60,109,111,100,117,108,101,32,123,33,114,125,32,40,
110,97,109,101,115,112,97,99,101,41,62,41,2,114,47,0,
0,0,114,112,0,0,0,41,2,114,170,0,0,0,114,190,
0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,218,11,109,111,100,117,108,101,95,114,101,112,114,227,
3,0,0,115,2,0,0,0,0,7,122,28,95,78,97,109,
101,115,112,97,99,101,76,111,97,100,101,114,46,109,111,100,
117,108,101,95,114,101,112,114,99,2,0,0,0,0,0,0,
0,2,0,0,0,1,0,0,0,67,0,0,0,115,4,0,
0,0,100,1,0,83,41,2,78,84,114,4,0,0,0,41,
2,114,108,0,0,0,114,126,0,0,0,114,4,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,4,0,0,0,114,5,0,0,0,114,159,0,0,0,236,
3,0,0,115,2,0,0,0,0,1,122,27,95,78,97,109,
101,115,112,97,99,101,76,111,97,100,101,114,46,105,115,95,
112,97,99,107,97,103,101,99,2,0,0,0,0,0,0,0,
2,0,0,0,1,0,0,0,67,0,0,0,115,4,0,0,
0,100,1,0,83,41,2,78,114,30,0,0,0,114,4,0,
0,0,41,2,114,108,0,0,0,114,126,0,0,0,114,4,
0,0,0,114,4,0,0,0,114,5,0,0,0,114,202,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,239,3,0,0,115,2,0,0,0,0,1,122,27,95,
78,97,109,101,115,112,97,99,101,76,111,97,100,101,114,46,
103,101,116,95,115,111,117,114,99,101,99,2,0,0,0,0,
0,0,0,2,0,0,0,6,0,0,0,67,0,0,0,115,
22,0,0,0,116,0,0,100,1,0,100,2,0,100,3,0,
100,4,0,100,5,0,131,3,1,83,41,6,78,114,30,0,
0,0,122,8,60,115,116,114,105,110,103,62,114,189,0,0,
0,114,204,0,0,0,84,41,1,114,205,0,0,0,41,2,
114,108,0,0,0,114,126,0,0,0,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
4,0,0,0,114,5,0,0,0,114,187,0,0,0,242,3,
0,0,115,2,0,0,0,0,1,122,25,95,78,97,109,101,
115,112,97,99,101,76,111,97,100,101,114,46,103,101,116,95,
99,111,100,101,99,2,0,0,0,0,0,0,0,2,0,0,
0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,
0,83,41,2,122,42,85,115,101,32,100,101,102,97,117,108,
116,32,115,101,109,97,110,116,105,99,115,32,102,111,114,32,
109,111,100,117,108,101,32,99,114,101,97,116,105,111,110,46,
78,114,4,0,0,0,41,2,114,108,0,0,0,114,164,0,
0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,114,186,0,0,0,245,3,0,0,115,0,0,0,0,122,
30,95,78,97,109,101,115,112,97,99,101,76,111,97,100,101,
114,46,99,114,101,97,116,101,95,109,111,100,117,108,101,99,
2,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,
67,0,0,0,115,4,0,0,0,100,0,0,83,41,1,78,
114,4,0,0,0,41,2,114,108,0,0,0,114,190,0,0,
0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,191,0,0,0,248,3,0,0,115,2,0,0,0,0,1,
122,28,95,78,97,109,101,115,112,97,99,101,76,111,97,100,
101,114,46,101,120,101,99,95,109,111,100,117,108,101,99,2,
0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,67,
0,0,0,115,32,0,0,0,116,0,0,100,1,0,124,0,
0,106,1,0,131,2,0,1,116,2,0,106,3,0,124,0,
0,124,1,0,131,2,0,83,41,2,122,98,76,111,97,100,
32,97,32,110,97,109,101,115,112,97,99,101,32,109,111,100,
117,108,101,46,10,10,32,32,32,32,32,32,32,32,84,104,
105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,112,
114,101,99,97,116,101,100,46,32,32,85,115,101,32,101,120,
101,99,95,109,111,100,117,108,101,40,41,32,105,110,115,116,
101,97,100,46,10,10,32,32,32,32,32,32,32,32,122,38,
110,97,109,101,115,112,97,99,101,32,109,111,100,117,108,101,
32,108,111,97,100,101,100,32,119,105,116,104,32,112,97,116,
104,32,123,33,114,125,41,4,114,105,0,0,0,114,232,0,
0,0,114,121,0,0,0,114,192,0,0,0,41,2,114,108,
0,0,0,114,126,0,0,0,114,4,0,0,0,114,4,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,114,5,0,0,0,114,193,0,0,0,251,3,0,0,
115,4,0,0,0,0,7,16,1,122,28,95,78,97,109,101,
115,112,97,99,101,76,111,97,100,101,114,46,108,111,97,100,
95,109,111,100,117,108,101,78,41,12,114,112,0,0,0,114,
111,0,0,0,114,113,0,0,0,114,185,0,0,0,114,183,
0,0,0,114,248,0,0,0,114,159,0,0,0,114,202,0,
0,0,114,187,0,0,0,114,186,0,0,0,114,191,0,0,
0,114,193,0,0,0,114,4,0,0,0,114,4,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,4,0,0,0,114,5,0,0,0,114,247,0,0,0,223,
3,0,0,115,16,0,0,0,12,1,12,3,18,9,12,3,
12,3,12,3,12,3,12,3,114,247,0,0,0,99,0,0,
0,0,0,0,0,0,0,0,0,0,5,0,0,0,64,0,
0,0,115,160,0,0,0,101,0,0,90,1,0,100,0,0,
90,2,0,100,1,0,90,3,0,101,4,0,100,2,0,100,
3,0,132,0,0,131,1,0,90,5,0,101,4,0,100,4,
0,100,5,0,132,0,0,131,1,0,90,6,0,101,4,0,
100,6,0,100,7,0,132,0,0,131,1,0,90,7,0,101,
4,0,100,8,0,100,9,0,132,0,0,131,1,0,90,8,
0,101,4,0,100,10,0,100,11,0,100,12,0,132,1,0,
131,1,0,90,9,0,101,4,0,100,10,0,100,10,0,100,
13,0,100,14,0,132,2,0,131,1,0,90,10,0,101,4,
0,100,10,0,100,15,0,100,16,0,132,1,0,131,1,0,
90,11,0,100,10,0,83,41,17,218,10,80,97,116,104,70,
105,110,100,101,114,122,62,77,101,116,97,32,112,97,116,104,
32,102,105,110,100,101,114,32,102,111,114,32,115,121,115,46,
112,97,116,104,32,97,110,100,32,112,97,99,107,97,103,101,
32,95,95,112,97,116,104,95,95,32,97,116,116,114,105,98,
117,116,101,115,46,99,1,0,0,0,0,0,0,0,2,0,
0,0,4,0,0,0,67,0,0,0,115,55,0,0,0,120,
48,0,116,0,0,106,1,0,106,2,0,131,0,0,68,93,
31,0,125,1,0,116,3,0,124,1,0,100,1,0,131,2,
0,114,16,0,124,1,0,106,4,0,131,0,0,1,113,16,
0,87,100,2,0,83,41,3,122,125,67,97,108,108,32,116,
104,101,32,105,110,118,97,108,105,100,97,116,101,95,99,97,
99,104,101,115,40,41,32,109,101,116,104,111,100,32,111,110,
32,97,108,108,32,112,97,116,104,32,101,110,116,114,121,32,
102,105,110,100,101,114,115,10,32,32,32,32,32,32,32,32,
115,116,111,114,101,100,32,105,110,32,115,121,115,46,112,97,
116,104,95,105,109,112,111,114,116,101,114,95,99,97,99,104,
101,115,32,40,119,104,101,114,101,32,105,109,112,108,101,109,
101,110,116,101,100,41,46,218,17,105,110,118,97,108,105,100,
97,116,101,95,99,97,99,104,101,115,78,41,5,114,7,0,
0,0,218,19,112,97,116,104,95,105,109,112,111,114,116,101,
114,95,99,97,99,104,101,218,6,118,97,108,117,101,115,114,
115,0,0,0,114,250,0,0,0,41,2,114,170,0,0,0,
218,6,102,105,110,100,101,114,114,4,0,0,0,114,4,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,114,5,0,0,0,114,250,0,0,0,12,4,0,0,
115,6,0,0,0,0,4,22,1,15,1,122,28,80,97,116,
104,70,105,110,100,101,114,46,105,110,118,97,108,105,100,97,
116,101,95,99,97,99,104,101,115,99,2,0,0,0,0,0,
0,0,3,0,0,0,12,0,0,0,67,0,0,0,115,107,
0,0,0,116,0,0,106,1,0,100,1,0,107,9,0,114,
41,0,116,0,0,106,1,0,12,114,41,0,116,2,0,106,
3,0,100,2,0,116,4,0,131,2,0,1,120,59,0,116,
0,0,106,1,0,68,93,44,0,125,2,0,121,14,0,124,
2,0,124,1,0,131,1,0,83,87,113,51,0,4,116,5,
0,107,10,0,114,94,0,1,1,1,119,51,0,89,113,51,
0,88,113,51,0,87,100,1,0,83,100,1,0,83,41,3,
122,113,83,101,97,114,99,104,32,115,101,113,117,101,110,99,
101,32,111,102,32,104,111,111,107,115,32,102,111,114,32,97,
32,102,105,110,100,101,114,32,102,111,114,32,39,112,97,116,
104,39,46,10,10,32,32,32,32,32,32,32,32,73,102,32,
39,104,111,111,107,115,39,32,105,115,32,102,97,108,115,101,
32,116,104,101,110,32,117,115,101,32,115,121,115,46,112,97,
116,104,95,104,111,111,107,115,46,10,10,32,32,32,32,32,
32,32,32,78,122,23,115,121,115,46,112,97,116,104,95,104,
111,111,107,115,32,105,115,32,101,109,112,116,121,41,6,114,
7,0,0,0,218,10,112,97,116,104,95,104,111,111,107,115,
114,60,0,0,0,114,61,0,0,0,114,125,0,0,0,114,
107,0,0,0,41,3,114,170,0,0,0,114,35,0,0,0,
90,4,104,111,111,107,114,4,0,0,0,114,4,0,0,0,
114,5,0,0,0,218,11,95,112,97,116,104,95,104,111,111,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
107,115,20,4,0,0,115,16,0,0,0,0,7,25,1,16,
1,16,1,3,1,14,1,13,1,12,2,122,22,80,97,116,
104,70,105,110,100,101,114,46,95,112,97,116,104,95,104,111,
111,107,115,99,2,0,0,0,0,0,0,0,3,0,0,0,
19,0,0,0,67,0,0,0,115,123,0,0,0,124,1,0,
100,1,0,107,2,0,114,53,0,121,16,0,116,0,0,106,
1,0,131,0,0,125,1,0,87,110,22,0,4,116,2,0,
107,10,0,114,52,0,1,1,1,100,2,0,83,89,110,1,
0,88,121,17,0,116,3,0,106,4,0,124,1,0,25,125,
2,0,87,110,46,0,4,116,5,0,107,10,0,114,118,0,
1,1,1,124,0,0,106,6,0,124,1,0,131,1,0,125,
2,0,124,2,0,116,3,0,106,4,0,124,1,0,60,89,
110,1,0,88,124,2,0,83,41,3,122,210,71,101,116,32,
116,104,101,32,102,105,110,100,101,114,32,102,111,114,32,116,
104,101,32,112,97,116,104,32,101,110,116,114,121,32,102,114,
111,109,32,115,121,115,46,112,97,116,104,95,105,109,112,111,
114,116,101,114,95,99,97,99,104,101,46,10,10,32,32,32,
32,32,32,32,32,73,102,32,116,104,101,32,112,97,116,104,
32,101,110,116,114,121,32,105,115,32,110,111,116,32,105,110,
32,116,104,101,32,99,97,99,104,101,44,32,102,105,110,100,
32,116,104,101,32,97,112,112,114,111,112,114,105,97,116,101,
32,102,105,110,100,101,114,10,32,32,32,32,32,32,32,32,
97,110,100,32,99,97,99,104,101,32,105,116,46,32,73,102,
32,110,111,32,102,105,110,100,101,114,32,105,115,32,97,118,
97,105,108,97,98,108,101,44,32,115,116,111,114,101,32,78,
111,110,101,46,10,10,32,32,32,32,32,32,32,32,114,30,
0,0,0,78,41,7,114,3,0,0,0,114,45,0,0,0,
218,17,70,105,108,101,78,111,116,70,111,117,110,100,69,114,
114,111,114,114,7,0,0,0,114,251,0,0,0,114,137,0,
0,0,114,255,0,0,0,41,3,114,170,0,0,0,114,35,
0,0,0,114,253,0,0,0,114,4,0,0,0,114,4,0,
0,0,114,5,0,0,0,218,20,95,112,97,116,104,95,105,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
109,112,111,114,116,101,114,95,99,97,99,104,101,37,4,0,
0,115,22,0,0,0,0,8,12,1,3,1,16,1,13,3,
9,1,3,1,17,1,13,1,15,1,18,1,122,31,80,97,
116,104,70,105,110,100,101,114,46,95,112,97,116,104,95,105,
109,112,111,114,116,101,114,95,99,97,99,104,101,99,3,0,
0,0,0,0,0,0,6,0,0,0,3,0,0,0,67,0,
0,0,115,119,0,0,0,116,0,0,124,2,0,100,1,0,
131,2,0,114,39,0,124,2,0,106,1,0,124,1,0,131,
1,0,92,2,0,125,3,0,125,4,0,110,21,0,124,2,
0,106,2,0,124,1,0,131,1,0,125,3,0,103,0,0,
125,4,0,124,3,0,100,0,0,107,9,0,114,88,0,116,
3,0,106,4,0,124,1,0,124,3,0,131,2,0,83,116,
3,0,106,5,0,124,1,0,100,0,0,131,2,0,125,5,
0,124,4,0,124,5,0,95,6,0,124,5,0,83,41,2,
78,114,124,0,0,0,41,7,114,115,0,0,0,114,124,0,
0,0,114,182,0,0,0,114,121,0,0,0,114,179,0,0,
0,114,160,0,0,0,114,156,0,0,0,41,6,114,170,0,
0,0,114,126,0,0,0,114,253,0,0,0,114,127,0,0,
0,114,128,0,0,0,114,164,0,0,0,114,4,0,0,0,
114,4,0,0,0,114,5,0,0,0,218,16,95,108,101,103,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
97,99,121,95,103,101,116,95,115,112,101,99,59,4,0,0,
115,18,0,0,0,0,4,15,1,24,2,15,1,6,1,12,
1,16,1,18,1,9,1,122,27,80,97,116,104,70,105,110,
100,101,114,46,95,108,101,103,97,99,121,95,103,101,116,95,
115,112,101,99,78,99,4,0,0,0,0,0,0,0,9,0,
0,0,5,0,0,0,67,0,0,0,115,243,0,0,0,103,
0,0,125,4,0,120,230,0,124,2,0,68,93,191,0,125,
5,0,116,0,0,124,5,0,116,1,0,116,2,0,102,2,
0,131,2,0,115,43,0,113,13,0,124,0,0,106,3,0,
124,5,0,131,1,0,125,6,0,124,6,0,100,1,0,107,
9,0,114,13,0,116,4,0,124,6,0,100,2,0,131,2,
0,114,106,0,124,6,0,106,5,0,124,1,0,124,3,0,
131,2,0,125,7,0,110,18,0,124,0,0,106,6,0,124,
1,0,124,6,0,131,2,0,125,7,0,124,7,0,100,1,
0,107,8,0,114,139,0,113,13,0,124,7,0,106,7,0,
100,1,0,107,9,0,114,158,0,124,7,0,83,124,7,0,
106,8,0,125,8,0,124,8,0,100,1,0,107,8,0,114,
191,0,116,9,0,100,3,0,131,1,0,130,1,0,124,4,
0,106,10,0,124,8,0,131,1,0,1,113,13,0,87,116,
11,0,106,12,0,124,1,0,100,1,0,131,2,0,125,7,
0,124,4,0,124,7,0,95,8,0,124,7,0,83,100,1,
0,83,41,4,122,63,70,105,110,100,32,116,104,101,32,108,
111,97,100,101,114,32,111,114,32,110,97,109,101,115,112,97,
99,101,95,112,97,116,104,32,102,111,114,32,116,104,105,115,
32,109,111,100,117,108,101,47,112,97,99,107,97,103,101,32,
110,97,109,101,46,78,114,181,0,0,0,122,19,115,112,101,
99,32,109,105,115,115,105,110,103,32,108,111,97,100,101,114,
41,13,114,143,0,0,0,114,69,0,0,0,218,5,98,121,
116,101,115,114,1,1,0,0,114,115,0,0,0,114,181,0,
0,0,114,2,1,0,0,114,127,0,0,0,114,156,0,0,
0,114,107,0,0,0,114,149,0,0,0,114,121,0,0,0,
114,160,0,0,0,41,9,114,170,0,0,0,114,126,0,0,
0,114,35,0,0,0,114,180,0,0,0,218,14,110,97,109,
101,115,112,97,99,101,95,112,97,116,104,90,5,101,110,116,
114,121,114,253,0,0,0,114,164,0,0,0,114,128,0,0,
0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
218,9,95,103,101,116,95,115,112,101,99,74,4,0,0,115,
40,0,0,0,0,5,6,1,13,1,21,1,3,1,15,1,
12,1,15,1,21,2,18,1,12,1,3,1,15,1,4,1,
9,1,12,1,12,5,17,2,18,1,9,1,122,20,80,97,
116,104,70,105,110,100,101,114,46,95,103,101,116,95,115,112,
101,99,99,4,0,0,0,0,0,0,0,6,0,0,0,4,
0,0,0,67,0,0,0,115,140,0,0,0,124,2,0,100,
1,0,107,8,0,114,21,0,116,0,0,106,1,0,125,2,
0,124,0,0,106,2,0,124,1,0,124,2,0,124,3,0,
131,3,0,125,4,0,124,4,0,100,1,0,107,8,0,114,
58,0,100,1,0,83,124,4,0,106,3,0,100,1,0,107,
8,0,114,132,0,124,4,0,106,4,0,125,5,0,124,5,
0,114,125,0,100,2,0,124,4,0,95,5,0,116,6,0,
124,1,0,124,5,0,124,0,0,106,2,0,131,3,0,124,
4,0,95,4,0,124,4,0,83,100,1,0,83,110,4,0,
124,4,0,83,100,1,0,83,41,3,122,98,102,105,110,100,
32,116,104,101,32,109,111,100,117,108,101,32,111,110,32,115,
121,115,46,112,97,116,104,32,111,114,32,39,112,97,116,104,
39,32,98,97,115,101,100,32,111,110,32,115,121,115,46,112,
97,116,104,95,104,111,111,107,115,32,97,110,100,10,32,32,
32,32,32,32,32,32,115,121,115,46,112,97,116,104,95,105,
109,112,111,114,116,101,114,95,99,97,99,104,101,46,78,90,
9,110,97,109,101,115,112,97,99,101,41,7,114,7,0,0,
0,114,35,0,0,0,114,5,1,0,0,114,127,0,0,0,
114,156,0,0,0,114,158,0,0,0,114,230,0,0,0,41,
6,114,170,0,0,0,114,126,0,0,0,114,35,0,0,0,
114,180,0,0,0,114,164,0,0,0,114,4,1,0,0,114,
4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,181,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,0,106,4,0,0,115,26,0,0,0,0,4,12,1,
9,1,21,1,12,1,4,1,15,1,9,1,6,3,9,1,
24,1,4,2,7,2,122,20,80,97,116,104,70,105,110,100,
101,114,46,102,105,110,100,95,115,112,101,99,99,3,0,0,
0,0,0,0,0,4,0,0,0,3,0,0,0,67,0,0,
0,115,41,0,0,0,124,0,0,106,0,0,124,1,0,124,
2,0,131,2,0,125,3,0,124,3,0,100,1,0,107,8,
0,114,34,0,100,1,0,83,124,3,0,106,1,0,83,41,
2,122,170,102,105,110,100,32,116,104,101,32,109,111,100,117,
108,101,32,111,110,32,115,121,115,46,112,97,116,104,32,111,
114,32,39,112,97,116,104,39,32,98,97,115,101,100,32,111,
110,32,115,121,115,46,112,97,116,104,95,104,111,111,107,115,
32,97,110,100,10,32,32,32,32,32,32,32,32,115,121,115,
46,112,97,116,104,95,105,109,112,111,114,116,101,114,95,99,
97,99,104,101,46,10,10,32,32,32,32,32,32,32,32,84,
104,105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,
112,114,101,99,97,116,101,100,46,32,32,85,115,101,32,102,
105,110,100,95,115,112,101,99,40,41,32,105,110,115,116,101,
97,100,46,10,10,32,32,32,32,32,32,32,32,78,41,2,
114,181,0,0,0,114,127,0,0,0,41,4,114,170,0,0,
0,114,126,0,0,0,114,35,0,0,0,114,164,0,0,0,
114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
182,0,0,0,128,4,0,0,115,8,0,0,0,0,8,18,
1,12,1,4,1,122,22,80,97,116,104,70,105,110,100,101,
114,46,102,105,110,100,95,109,111,100,117,108,101,41,12,114,
112,0,0,0,114,111,0,0,0,114,113,0,0,0,114,114,
0,0,0,114,183,0,0,0,114,250,0,0,0,114,255,0,
0,0,114,1,1,0,0,114,2,1,0,0,114,5,1,0,
0,114,181,0,0,0,114,182,0,0,0,114,4,0,0,0,
114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
249,0,0,0,8,4,0,0,115,22,0,0,0,12,2,6,
2,18,8,18,17,18,22,18,15,3,1,18,31,3,1,21,
21,3,1,114,249,0,0,0,99,0,0,0,0,0,0,0,
0,0,0,0,0,3,0,0,0,64,0,0,0,115,133,0,
0,0,101,0,0,90,1,0,100,0,0,90,2,0,100,1,
0,90,3,0,100,2,0,100,3,0,132,0,0,90,4,0,
100,4,0,100,5,0,132,0,0,90,5,0,101,6,0,90,
7,0,100,6,0,100,7,0,132,0,0,90,8,0,100,8,
0,100,9,0,132,0,0,90,9,0,100,10,0,100,11,0,
100,12,0,132,1,0,90,10,0,100,13,0,100,14,0,132,
0,0,90,11,0,101,12,0,100,15,0,100,16,0,132,0,
0,131,1,0,90,13,0,100,17,0,100,18,0,132,0,0,
90,14,0,100,10,0,83,41,19,218,10,70,105,108,101,70,
105,110,100,101,114,122,172,70,105,108,101,45,98,97,115,101,
100,32,102,105,110,100,101,114,46,10,10,32,32,32,32,73,
110,116,101,114,97,99,116,105,111,110,115,32,119,105,116,104,
32,116,104,101,32,102,105,108,101,32,115,121,115,116,101,109,
32,97,114,101,32,99,97,99,104,101,100,32,102,111,114,32,
112,101,114,102,111,114,109,97,110,99,101,44,32,98,101,105,
110,103,10,32,32,32,32,114,101,102,114,101,115,104,101,100,
32,119,104,101,110,32,116,104,101,32,100,105,114,101,99,116,
111,114,121,32,116,104,101,32,102,105,110,100,101,114,32,105,
115,32,104,97,110,100,108,105,110,103,32,104,97,115,32,98,
101,101,110,32,109,111,100,105,102,105,101,100,46,10,10,32,
32,32,32,99,2,0,0,0,0,0,0,0,5,0,0,0,
5,0,0,0,7,0,0,0,115,122,0,0,0,103,0,0,
125,3,0,120,52,0,124,2,0,68,93,44,0,92,2,0,
137,0,0,125,4,0,124,3,0,106,0,0,135,0,0,102,
1,0,100,1,0,100,2,0,134,0,0,124,4,0,68,131,
1,0,131,1,0,1,113,13,0,87,124,3,0,124,0,0,
95,1,0,124,1,0,112,79,0,100,3,0,124,0,0,95,
2,0,100,6,0,124,0,0,95,3,0,116,4,0,131,0,
0,124,0,0,95,5,0,116,4,0,131,0,0,124,0,0,
95,6,0,100,5,0,83,41,7,122,154,73,110,105,116,105,
97,108,105,122,101,32,119,105,116,104,32,116,104,101,32,112,
97,116,104,32,116,111,32,115,101,97,114,99,104,32,111,110,
32,97,110,100,32,97,32,118,97,114,105,97,98,108,101,32,
110,117,109,98,101,114,32,111,102,10,32,32,32,32,32,32,
32,32,50,45,116,117,112,108,101,115,32,99,111,110,116,97,
105,110,105,110,103,32,116,104,101,32,108,111,97,100,101,114,
32,97,110,100,32,116,104,101,32,102,105,108,101,32,115,117,
102,102,105,120,101,115,32,116,104,101,32,108,111,97,100,101,
114,10,32,32,32,32,32,32,32,32,114,101,99,111,103,110,
105,122,101,115,46,99,1,0,0,0,0,0,0,0,2,0,
0,0,3,0,0,0,51,0,0,0,115,27,0,0,0,124,
0,0,93,17,0,125,1,0,124,1,0,136,0,0,102,2,
0,86,1,113,3,0,100,0,0,83,41,1,78,114,4,0,
0,0,41,2,114,22,0,0,0,114,225,0,0,0,41,1,
114,127,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
227,0,0,0,157,4,0,0,115,2,0,0,0,6,0,122,
38,70,105,108,101,70,105,110,100,101,114,46,95,95,105,110,
105,116,95,95,46,60,108,111,99,97,108,115,62,46,60,103,
101,110,101,120,112,114,62,114,58,0,0,0,114,29,0,0,
0,78,114,87,0,0,0,41,7,114,149,0,0,0,218,8,
95,108,111,97,100,101,114,115,114,35,0,0,0,218,11,95,
112,97,116,104,95,109,116,105,109,101,218,3,115,101,116,218,
11,95,112,97,116,104,95,99,97,99,104,101,218,19,95,114,
101,108,97,120,101,100,95,112,97,116,104,95,99,97,99,104,
101,41,5,114,108,0,0,0,114,35,0,0,0,218,14,108,
111,97,100,101,114,95,100,101,116,97,105,108,115,90,7,108,
111,97,100,101,114,115,114,166,0,0,0,114,4,0,0,0,
41,1,114,127,0,0,0,114,5,0,0,0,114,185,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,151,4,0,0,115,16,0,0,0,0,4,6,1,19,1,
36,1,9,2,15,1,9,1,12,1,122,19,70,105,108,101,
70,105,110,100,101,114,46,95,95,105,110,105,116,95,95,99,
1,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,
67,0,0,0,115,13,0,0,0,100,3,0,124,0,0,95,
0,0,100,2,0,83,41,4,122,31,73,110,118,97,108,105,
100,97,116,101,32,116,104,101,32,100,105,114,101,99,116,111,
114,121,32,109,116,105,109,101,46,114,29,0,0,0,78,114,
87,0,0,0,41,1,114,8,1,0,0,41,1,114,108,0,
0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,114,250,0,0,0,165,4,0,0,115,2,0,0,0,0,
2,122,28,70,105,108,101,70,105,110,100,101,114,46,105,110,
118,97,108,105,100,97,116,101,95,99,97,99,104,101,115,99,
2,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,
67,0,0,0,115,59,0,0,0,124,0,0,106,0,0,124,
1,0,131,1,0,125,2,0,124,2,0,100,1,0,107,8,
0,114,37,0,100,1,0,103,0,0,102,2,0,83,124,2,
0,106,1,0,124,2,0,106,2,0,112,55,0,103,0,0,
102,2,0,83,41,2,122,197,84,114,121,32,116,111,32,102,
105,110,100,32,97,32,108,111,97,100,101,114,32,102,111,114,
32,116,104,101,32,115,112,101,99,105,102,105,101,100,32,109,
111,100,117,108,101,44,32,111,114,32,116,104,101,32,110,97,
109,101,115,112,97,99,101,10,32,32,32,32,32,32,32,32,
112,97,99,107,97,103,101,32,112,111,114,116,105,111,110,115,
46,32,82,101,116,117,114,110,115,32,40,108,111,97,100,101,
114,44,32,108,105,115,116,45,111,102,45,112,111,114,116,105,
111,110,115,41,46,10,10,32,32,32,32,32,32,32,32,84,
104,105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,
112,114,101,99,97,116,101,100,46,32,32,85,115,101,32,102,
105,110,100,95,115,112,101,99,40,41,32,105,110,115,116,101,
97,100,46,10,10,32,32,32,32,32,32,32,32,78,41,3,
114,181,0,0,0,114,127,0,0,0,114,156,0,0,0,41,
3,114,108,0,0,0,114,126,0,0,0,114,164,0,0,0,
114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
124,0,0,0,171,4,0,0,115,8,0,0,0,0,7,15,
1,12,1,10,1,122,22,70,105,108,101,70,105,110,100,101,
114,46,102,105,110,100,95,108,111,97,100,101,114,99,6,0,
0,0,0,0,0,0,7,0,0,0,7,0,0,0,67,0,
0,0,115,40,0,0,0,124,1,0,124,2,0,124,3,0,
131,2,0,125,6,0,116,0,0,124,2,0,124,3,0,100,
1,0,124,6,0,100,2,0,124,4,0,131,2,2,83,41,
3,78,114,127,0,0,0,114,156,0,0,0,41,1,114,167,
0,0,0,41,7,114,108,0,0,0,114,165,0,0,0,114,
126,0,0,0,114,35,0,0,0,90,4,115,109,115,108,114,
180,0,0,0,114,127,0,0,0,114,4,0,0,0,114,4,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,0,114,5,0,0,0,114,5,1,0,0,183,4,0,
0,115,6,0,0,0,0,1,15,1,18,1,122,20,70,105,
108,101,70,105,110,100,101,114,46,95,103,101,116,95,115,112,
101,99,78,99,3,0,0,0,0,0,0,0,14,0,0,0,
15,0,0,0,67,0,0,0,115,234,1,0,0,100,1,0,
125,3,0,124,1,0,106,0,0,100,2,0,131,1,0,100,
3,0,25,125,4,0,121,34,0,116,1,0,124,0,0,106,
2,0,112,49,0,116,3,0,106,4,0,131,0,0,131,1,
0,106,5,0,125,5,0,87,110,24,0,4,116,6,0,107,
10,0,114,85,0,1,1,1,100,10,0,125,5,0,89,110,
1,0,88,124,5,0,124,0,0,106,7,0,107,3,0,114,
120,0,124,0,0,106,8,0,131,0,0,1,124,5,0,124,
0,0,95,7,0,116,9,0,131,0,0,114,153,0,124,0,
0,106,10,0,125,6,0,124,4,0,106,11,0,131,0,0,
125,7,0,110,15,0,124,0,0,106,12,0,125,6,0,124,
4,0,125,7,0,124,7,0,124,6,0,107,6,0,114,45,
1,116,13,0,124,0,0,106,2,0,124,4,0,131,2,0,
125,8,0,120,100,0,124,0,0,106,14,0,68,93,77,0,
92,2,0,125,9,0,125,10,0,100,5,0,124,9,0,23,
125,11,0,116,13,0,124,8,0,124,11,0,131,2,0,125,
12,0,116,15,0,124,12,0,131,1,0,114,208,0,124,0,
0,106,16,0,124,10,0,124,1,0,124,12,0,124,8,0,
103,1,0,124,2,0,131,5,0,83,113,208,0,87,116,17,
0,124,8,0,131,1,0,125,3,0,120,123,0,124,0,0,
106,14,0,68,93,112,0,92,2,0,125,9,0,125,10,0,
116,13,0,124,0,0,106,2,0,124,4,0,124,9,0,23,
131,2,0,125,12,0,116,18,0,100,6,0,106,19,0,124,
12,0,131,1,0,100,7,0,100,3,0,131,1,1,1,124,
7,0,124,9,0,23,124,6,0,107,6,0,114,55,1,116,
15,0,124,12,0,131,1,0,114,55,1,124,0,0,106,16,
0,124,10,0,124,1,0,124,12,0,100,8,0,124,2,0,
131,5,0,83,113,55,1,87,124,3,0,114,230,1,116,18,
0,100,9,0,106,19,0,124,8,0,131,1,0,131,1,0,
1,116,20,0,106,21,0,124,1,0,100,8,0,131,2,0,
125,13,0,124,8,0,103,1,0,124,13,0,95,22,0,124,
13,0,83,100,8,0,83,41,11,122,125,84,114,121,32,116,
111,32,102,105,110,100,32,97,32,108,111,97,100,101,114,32,
102,111,114,32,116,104,101,32,115,112,101,99,105,102,105,101,
100,32,109,111,100,117,108,101,44,32,111,114,32,116,104,101,
32,110,97,109,101,115,112,97,99,101,10,32,32,32,32,32,
32,32,32,112,97,99,107,97,103,101,32,112,111,114,116,105,
111,110,115,46,32,82,101,116,117,114,110,115,32,40,108,111,
97,100,101,114,44,32,108,105,115,116,45,111,102,45,112,111,
114,116,105,111,110,115,41,46,70,114,58,0,0,0,114,56,
0,0,0,114,29,0,0,0,114,185,0,0,0,122,9,116,
114,121,105,110,103,32,123,125,114,98,0,0,0,78,122,25,
112,111,115,115,105,98,108,101,32,110,97,109,101,115,112,97,
99,101,32,102,111,114,32,123,125,114,87,0,0,0,41,23,
114,32,0,0,0,114,39,0,0,0,114,35,0,0,0,114,
3,0,0,0,114,45,0,0,0,114,219,0,0,0,114,40,
0,0,0,114,8,1,0,0,218,11,95,102,105,108,108,95,
99,97,99,104,101,114,6,0,0,0,114,11,1,0,0,114,
88,0,0,0,114,10,1,0,0,114,28,0,0,0,114,7,
1,0,0,114,44,0,0,0,114,5,1,0,0,114,46,0,
0,0,114,105,0,0,0,114,47,0,0,0,114,121,0,0,
0,114,160,0,0,0,114,156,0,0,0,41,14,114,108,0,
0,0,114,126,0,0,0,114,180,0,0,0,90,12,105,115,
95,110,97,109,101,115,112,97,99,101,90,11,116,97,105,108,
95,109,111,100,117,108,101,114,133,0,0,0,90,5,99,97,
99,104,101,90,12,99,97,99,104,101,95,109,111,100,117,108,
101,90,9,98,97,115,101,95,112,97,116,104,114,225,0,0,
0,114,165,0,0,0,90,13,105,110,105,116,95,102,105,108,
101,110,97,109,101,90,9,102,117,108,108,95,112,97,116,104,
114,164,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
5,0,0,0,114,181,0,0,0,188,4,0,0,115,68,0,
0,0,0,3,6,1,19,1,3,1,34,1,13,1,11,1,
15,1,10,1,9,2,9,1,9,1,15,2,9,1,6,2,
12,1,18,1,22,1,10,1,15,1,12,1,32,4,12,2,
22,1,22,1,25,1,16,1,12,1,29,1,6,1,19,1,
18,1,12,1,4,1,122,20,70,105,108,101,70,105,110,100,
101,114,46,102,105,110,100,95,115,112,101,99,99,1,0,0,
0,0,0,0,0,9,0,0,0,13,0,0,0,67,0,0,
0,115,11,1,0,0,124,0,0,106,0,0,125,1,0,121,
31,0,116,1,0,106,2,0,124,1,0,112,33,0,116,1,
0,106,3,0,131,0,0,131,1,0,125,2,0,87,110,33,
0,4,116,4,0,116,5,0,116,6,0,102,3,0,107,10,
0,114,75,0,1,1,1,103,0,0,125,2,0,89,110,1,
0,88,116,7,0,106,8,0,106,9,0,100,1,0,131,1,
0,115,112,0,116,10,0,124,2,0,131,1,0,124,0,0,
95,11,0,110,111,0,116,10,0,131,0,0,125,3,0,120,
90,0,124,2,0,68,93,82,0,125,4,0,124,4,0,106,
12,0,100,2,0,131,1,0,92,3,0,125,5,0,125,6,
0,125,7,0,124,6,0,114,191,0,100,3,0,106,13,0,
124,5,0,124,7,0,106,14,0,131,0,0,131,2,0,125,
8,0,110,6,0,124,5,0,125,8,0,124,3,0,106,15,
0,124,8,0,131,1,0,1,113,128,0,87,124,3,0,124,
0,0,95,11,0,116,7,0,106,8,0,106,9,0,116,16,
0,131,1,0,114,7,1,100,4,0,100,5,0,132,0,0,
124,2,0,68,131,1,0,124,0,0,95,17,0,100,6,0,
83,41,7,122,68,70,105,108,108,32,116,104,101,32,99,97,
99,104,101,32,111,102,32,112,111,116,101,110,116,105,97,108,
32,109,111,100,117,108,101,115,32,97,110,100,32,112,97,99,
107,97,103,101,115,32,102,111,114,32,116,104,105,115,32,100,
105,114,101,99,116,111,114,121,46,114,0,0,0,0,114,58,
0,0,0,122,5,123,125,46,123,125,99,1,0,0,0,0,
0,0,0,2,0,0,0,3,0,0,0,83,0,0,0,115,
28,0,0,0,104,0,0,124,0,0,93,18,0,125,1,0,
124,1,0,106,0,0,131,0,0,146,2,0,113,6,0,83,
114,4,0,0,0,41,1,114,88,0,0,0,41,2,114,22,
0,0,0,90,2,102,110,114,4,0,0,0,114,4,0,0,
0,114,5,0,0,0,250,9,60,115,101,116,99,111,109,112,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
62,6,5,0,0,115,2,0,0,0,9,0,122,41,70,105,
108,101,70,105,110,100,101,114,46,95,102,105,108,108,95,99,
97,99,104,101,46,60,108,111,99,97,108,115,62,46,60,115,
101,116,99,111,109,112,62,78,41,18,114,35,0,0,0,114,
3,0,0,0,90,7,108,105,115,116,100,105,114,114,45,0,
0,0,114,0,1,0,0,218,15,80,101,114,109,105,115,115,
105,111,110,69,114,114,111,114,218,18,78,111,116,65,68,105,
114,101,99,116,111,114,121,69,114,114,111,114,114,7,0,0,
0,114,8,0,0,0,114,9,0,0,0,114,9,1,0,0,
114,10,1,0,0,114,83,0,0,0,114,47,0,0,0,114,
88,0,0,0,218,3,97,100,100,114,10,0,0,0,114,11,
1,0,0,41,9,114,108,0,0,0,114,35,0,0,0,90,
8,99,111,110,116,101,110,116,115,90,21,108,111,119,101,114,
95,115,117,102,102,105,120,95,99,111,110,116,101,110,116,115,
114,245,0,0,0,114,106,0,0,0,114,237,0,0,0,114,
225,0,0,0,90,8,110,101,119,95,110,97,109,101,114,4,
0,0,0,114,4,0,0,0,114,5,0,0,0,114,13,1,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,233,4,0,0,115,34,0,0,0,0,2,9,1,3,
1,31,1,22,3,11,3,18,1,18,7,9,1,13,1,24,
1,6,1,27,2,6,1,17,1,9,1,18,1,122,22,70,
105,108,101,70,105,110,100,101,114,46,95,102,105,108,108,95,
99,97,99,104,101,99,1,0,0,0,0,0,0,0,3,0,
0,0,3,0,0,0,7,0,0,0,115,25,0,0,0,135,
0,0,135,1,0,102,2,0,100,1,0,100,2,0,134,0,
0,125,2,0,124,2,0,83,41,3,97,20,1,0,0,65,
32,99,108,97,115,115,32,109,101,116,104,111,100,32,119,104,
105,99,104,32,114,101,116,117,114,110,115,32,97,32,99,108,
111,115,117,114,101,32,116,111,32,117,115,101,32,111,110,32,
115,121,115,46,112,97,116,104,95,104,111,111,107,10,32,32,
32,32,32,32,32,32,119,104,105,99,104,32,119,105,108,108,
32,114,101,116,117,114,110,32,97,110,32,105,110,115,116,97,
110,99,101,32,117,115,105,110,103,32,116,104,101,32,115,112,
101,99,105,102,105,101,100,32,108,111,97,100,101,114,115,32,
97,110,100,32,116,104,101,32,112,97,116,104,10,32,32,32,
32,32,32,32,32,99,97,108,108,101,100,32,111,110,32,116,
104,101,32,99,108,111,115,117,114,101,46,10,10,32,32,32,
32,32,32,32,32,73,102,32,116,104,101,32,112,97,116,104,
32,99,97,108,108,101,100,32,111,110,32,116,104,101,32,99,
108,111,115,117,114,101,32,105,115,32,110,111,116,32,97,32,
100,105,114,101,99,116,111,114,121,44,32,73,109,112,111,114,
116,69,114,114,111,114,32,105,115,10,32,32,32,32,32,32,
32,32,114,97,105,115,101,100,46,10,10,32,32,32,32,32,
32,32,32,99,1,0,0,0,0,0,0,0,1,0,0,0,
4,0,0,0,19,0,0,0,115,43,0,0,0,116,0,0,
124,0,0,131,1,0,115,30,0,116,1,0,100,1,0,100,
2,0,124,0,0,131,1,1,130,1,0,136,0,0,124,0,
0,136,1,0,140,1,0,83,41,3,122,45,80,97,116,104,
32,104,111,111,107,32,102,111,114,32,105,109,112,111,114,116,
108,105,98,46,109,97,99,104,105,110,101,114,121,46,70,105,
108,101,70,105,110,100,101,114,46,122,30,111,110,108,121,32,
100,105,114,101,99,116,111,114,105,101,115,32,97,114,101,32,
115,117,112,112,111,114,116,101,100,114,35,0,0,0,41,2,
114,46,0,0,0,114,107,0,0,0,41,1,114,35,0,0,
0,41,2,114,170,0,0,0,114,12,1,0,0,114,4,0,
0,0,114,5,0,0,0,218,24,112,97,116,104,95,104,111,
111,107,95,102,111,114,95,70,105,108,101,70,105,110,100,101,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,18,5,0,0,115,6,0,0,0,0,2,12,1,18,1,
122,54,70,105,108,101,70,105,110,100,101,114,46,112,97,116,
104,95,104,111,111,107,46,60,108,111,99,97,108,115,62,46,
112,97,116,104,95,104,111,111,107,95,102,111,114,95,70,105,
108,101,70,105,110,100,101,114,114,4,0,0,0,41,3,114,
170,0,0,0,114,12,1,0,0,114,18,1,0,0,114,4,
0,0,0,41,2,114,170,0,0,0,114,12,1,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
5,0,0,0,218,9,112,97,116,104,95,104,111,111,107,8,
5,0,0,115,4,0,0,0,0,10,21,6,122,20,70,105,
108,101,70,105,110,100,101,114,46,112,97,116,104,95,104,111,
111,107,99,1,0,0,0,0,0,0,0,1,0,0,0,2,
0,0,0,67,0,0,0,115,16,0,0,0,100,1,0,106,
0,0,124,0,0,106,1,0,131,1,0,83,41,2,78,122,
16,70,105,108,101,70,105,110,100,101,114,40,123,33,114,125,
41,41,2,114,47,0,0,0,114,35,0,0,0,41,1,114,
108,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,0,114,244,0,0,0,26,5,0,0,115,2,0,0,
0,0,1,122,19,70,105,108,101,70,105,110,100,101,114,46,
95,95,114,101,112,114,95,95,41,15,114,112,0,0,0,114,
111,0,0,0,114,113,0,0,0,114,114,0,0,0,114,185,
0,0,0,114,250,0,0,0,114,130,0,0,0,114,182,0,
0,0,114,124,0,0,0,114,5,1,0,0,114,181,0,0,
0,114,13,1,0,0,114,183,0,0,0,114,19,1,0,0,
114,244,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
4,0,0,0,114,5,0,0,0,114,6,1,0,0,142,4,
0,0,115,20,0,0,0,12,7,6,2,12,14,12,4,6,
2,12,12,12,5,15,45,12,31,18,18,114,6,1,0,0,
99,4,0,0,0,0,0,0,0,6,0,0,0,11,0,0,
0,67,0,0,0,115,195,0,0,0,124,0,0,106,0,0,
100,1,0,131,1,0,125,4,0,124,0,0,106,0,0,100,
2,0,131,1,0,125,5,0,124,4,0,115,99,0,124,5,
0,114,54,0,124,5,0,106,1,0,125,4,0,110,45,0,
124,2,0,124,3,0,107,2,0,114,84,0,116,2,0,124,
1,0,124,2,0,131,2,0,125,4,0,110,15,0,116,3,
0,124,1,0,124,2,0,131,2,0,125,4,0,124,5,0,
115,126,0,116,4,0,124,1,0,124,2,0,100,3,0,124,
4,0,131,2,1,125,5,0,121,44,0,124,5,0,124,0,
0,100,2,0,60,124,4,0,124,0,0,100,1,0,60,124,
2,0,124,0,0,100,4,0,60,124,3,0,124,0,0,100,
5,0,60,87,110,18,0,4,116,5,0,107,10,0,114,190,
0,1,1,1,89,110,1,0,88,100,0,0,83,41,6,78,
218,10,95,95,108,111,97,100,101,114,95,95,218,8,95,95,
115,112,101,99,95,95,114,127,0,0,0,90,8,95,95,102,
105,108,101,95,95,90,10,95,95,99,97,99,104,101,100,95,
95,41,6,218,3,103,101,116,114,127,0,0,0,114,223,0,
0,0,114,218,0,0,0,114,167,0,0,0,218,9,69,120,
99,101,112,116,105,111,110,41,6,90,2,110,115,114,106,0,
0,0,90,8,112,97,116,104,110,97,109,101,90,9,99,112,
97,116,104,110,97,109,101,114,127,0,0,0,114,164,0,0,
0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
218,14,95,102,105,120,95,117,112,95,109,111,100,117,108,101,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
32,5,0,0,115,34,0,0,0,0,2,15,1,15,1,6,
1,6,1,12,1,12,1,18,2,15,1,6,1,21,1,3,
1,10,1,10,1,10,1,14,1,13,2,114,24,1,0,0,
99,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0,
0,67,0,0,0,115,55,0,0,0,116,0,0,116,1,0,
106,2,0,131,0,0,102,2,0,125,0,0,116,3,0,116,
4,0,102,2,0,125,1,0,116,5,0,116,6,0,102,2,
0,125,2,0,124,0,0,124,1,0,124,2,0,103,3,0,
83,41,1,122,95,82,101,116,117,114,110,115,32,97,32,108,
105,115,116,32,111,102,32,102,105,108,101,45,98,97,115,101,
100,32,109,111,100,117,108,101,32,108,111,97,100,101,114,115,
46,10,10,32,32,32,32,69,97,99,104,32,105,116,101,109,
32,105,115,32,97,32,116,117,112,108,101,32,40,108,111,97,
100,101,114,44,32,115,117,102,102,105,120,101,115,41,46,10,
32,32,32,32,41,7,114,224,0,0,0,114,145,0,0,0,
218,18,101,120,116,101,110,115,105,111,110,95,115,117,102,102,
105,120,101,115,114,218,0,0,0,114,84,0,0,0,114,223,
0,0,0,114,74,0,0,0,41,3,90,10,101,120,116,101,
110,115,105,111,110,115,90,6,115,111,117,114,99,101,90,8,
98,121,116,101,99,111,100,101,114,4,0,0,0,114,4,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,114,5,0,0,0,114,161,0,0,0,55,5,0,0,
115,8,0,0,0,0,5,18,1,12,1,12,1,114,161,0,
0,0,99,1,0,0,0,0,0,0,0,12,0,0,0,12,
0,0,0,67,0,0,0,115,70,2,0,0,124,0,0,97,
0,0,116,0,0,106,1,0,97,1,0,116,0,0,106,2,
0,97,2,0,116,1,0,106,3,0,116,4,0,25,125,1,
0,120,76,0,100,26,0,68,93,68,0,125,2,0,124,2,
0,116,1,0,106,3,0,107,7,0,114,83,0,116,0,0,
106,5,0,124,2,0,131,1,0,125,3,0,110,13,0,116,
1,0,106,3,0,124,2,0,25,125,3,0,116,6,0,124,
1,0,124,2,0,124,3,0,131,3,0,1,113,44,0,87,
100,5,0,100,6,0,103,1,0,102,2,0,100,7,0,100,
8,0,100,6,0,103,2,0,102,2,0,102,2,0,125,4,
0,120,149,0,124,4,0,68,93,129,0,92,2,0,125,5,
0,125,6,0,116,7,0,100,9,0,100,10,0,132,0,0,
124,6,0,68,131,1,0,131,1,0,115,199,0,116,8,0,
130,1,0,124,6,0,100,11,0,25,125,7,0,124,5,0,
116,1,0,106,3,0,107,6,0,114,241,0,116,1,0,106,
3,0,124,5,0,25,125,8,0,80,113,156,0,121,20,0,
116,0,0,106,5,0,124,5,0,131,1,0,125,8,0,80,
87,113,156,0,4,116,9,0,107,10,0,114,28,1,1,1,
1,119,156,0,89,113,156,0,88,113,156,0,87,116,9,0,
100,12,0,131,1,0,130,1,0,116,6,0,124,1,0,100,
13,0,124,8,0,131,3,0,1,116,6,0,124,1,0,100,
14,0,124,7,0,131,3,0,1,116,6,0,124,1,0,100,
15,0,100,16,0,106,10,0,124,6,0,131,1,0,131,3,
0,1,121,19,0,116,0,0,106,5,0,100,17,0,131,1,
0,125,9,0,87,110,24,0,4,116,9,0,107,10,0,114,
147,1,1,1,1,100,18,0,125,9,0,89,110,1,0,88,
116,6,0,124,1,0,100,17,0,124,9,0,131,3,0,1,
116,0,0,106,5,0,100,19,0,131,1,0,125,10,0,116,
6,0,124,1,0,100,19,0,124,10,0,131,3,0,1,124,
5,0,100,7,0,107,2,0,114,238,1,116,0,0,106,5,
0,100,20,0,131,1,0,125,11,0,116,6,0,124,1,0,
100,21,0,124,11,0,131,3,0,1,116,6,0,124,1,0,
100,22,0,116,11,0,131,0,0,131,3,0,1,116,12,0,
106,13,0,116,2,0,106,14,0,131,0,0,131,1,0,1,
124,5,0,100,7,0,107,2,0,114,66,2,116,15,0,106,
16,0,100,23,0,131,1,0,1,100,24,0,116,12,0,107,
6,0,114,66,2,100,25,0,116,17,0,95,18,0,100,18,
0,83,41,27,122,205,83,101,116,117,112,32,116,104,101,32,
112,97,116,104,45,98,97,115,101,100,32,105,109,112,111,114,
116,101,114,115,32,102,111,114,32,105,109,112,111,114,116,108,
105,98,32,98,121,32,105,109,112,111,114,116,105,110,103,32,
110,101,101,100,101,100,10,32,32,32,32,98,117,105,108,116,
45,105,110,32,109,111,100,117,108,101,115,32,97,110,100,32,
105,110,106,101,99,116,105,110,103,32,116,104,101,109,32,105,
110,116,111,32,116,104,101,32,103,108,111,98,97,108,32,110,
97,109,101,115,112,97,99,101,46,10,10,32,32,32,32,79,
116,104,101,114,32,99,111,109,112,111,110,101,110,116,115,32,
97,114,101,32,101,120,116,114,97,99,116,101,100,32,102,114,
111,109,32,116,104,101,32,99,111,114,101,32,98,111,111,116,
115,116,114,97,112,32,109,111,100,117,108,101,46,10,10,32,
32,32,32,114,49,0,0,0,114,60,0,0,0,218,8,98,
117,105,108,116,105,110,115,114,142,0,0,0,90,5,112,111,
115,105,120,250,1,47,218,2,110,116,250,1,92,99,1,0,
0,0,0,0,0,0,2,0,0,0,3,0,0,0,115,0,
0,0,115,33,0,0,0,124,0,0,93,23,0,125,1,0,
116,0,0,124,1,0,131,1,0,100,0,0,107,2,0,86,
1,113,3,0,100,1,0,83,41,2,114,29,0,0,0,78,
41,1,114,31,0,0,0,41,2,114,22,0,0,0,114,77,
0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
0,0,114,227,0,0,0,91,5,0,0,115,2,0,0,0,
6,0,122,25,95,115,101,116,117,112,46,60,108,111,99,97,
108,115,62,46,60,103,101,110,101,120,112,114,62,114,59,0,
0,0,122,30,105,109,112,111,114,116,108,105,98,32,114,101,
113,117,105,114,101,115,32,112,111,115,105,120,32,111,114,32,
110,116,114,3,0,0,0,114,25,0,0,0,114,21,0,0,
0,114,30,0,0,0,90,7,95,116,104,114,101,97,100,78,
90,8,95,119,101,97,107,114,101,102,90,6,119,105,110,114,
101,103,114,169,0,0,0,114,6,0,0,0,122,4,46,112,
121,119,122,6,95,100,46,112,121,100,84,41,4,122,3,95,
105,111,122,9,95,119,97,114,110,105,110,103,115,122,8,98,
117,105,108,116,105,110,115,122,7,109,97,114,115,104,97,108,
41,19,114,121,0,0,0,114,7,0,0,0,114,145,0,0,
0,114,239,0,0,0,114,112,0,0,0,90,18,95,98,117,
105,108,116,105,110,95,102,114,111,109,95,110,97,109,101,114,
116,0,0,0,218,3,97,108,108,218,14,65,115,115,101,114,
116,105,111,110,69,114,114,111,114,114,107,0,0,0,114,26,
0,0,0,114,11,0,0,0,114,229,0,0,0,114,149,0,
0,0,114,25,1,0,0,114,84,0,0,0,114,163,0,0,
0,114,168,0,0,0,114,173,0,0,0,41,12,218,17,95,
98,111,111,116,115,116,114,97,112,95,109,111,100,117,108,101,
90,11,115,101,108,102,95,109,111,100,117,108,101,90,12,98,
117,105,108,116,105,110,95,110,97,109,101,90,14,98,117,105,
108,116,105,110,95,109,111,100,117,108,101,90,10,111,115,95,
100,101,116,97,105,108,115,90,10,98,117,105,108,116,105,110,
95,111,115,114,21,0,0,0,114,25,0,0,0,90,9,111,
115,95,109,111,100,117,108,101,90,13,116,104,114,101,97,100,
95,109,111,100,117,108,101,90,14,119,101,97,107,114,101,102,
95,109,111,100,117,108,101,90,13,119,105,110,114,101,103,95,
109,111,100,117,108,101,114,4,0,0,0,114,4,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,5,0,0,0,218,6,95,115,101,116,117,112,66,5,0,
0,115,82,0,0,0,0,8,6,1,9,1,9,3,13,1,
13,1,15,1,18,2,13,1,20,3,33,1,19,2,31,1,
10,1,15,1,13,1,4,2,3,1,15,1,5,1,13,1,
12,2,12,1,16,1,16,1,25,3,3,1,19,1,13,2,
11,1,16,3,15,1,16,3,12,1,15,1,16,3,19,1,
19,1,12,1,13,1,12,1,114,33,1,0,0,99,1,0,
0,0,0,0,0,0,2,0,0,0,3,0,0,0,67,0,
0,0,115,116,0,0,0,116,0,0,124,0,0,131,1,0,
1,116,1,0,131,0,0,125,1,0,116,2,0,106,3,0,
106,4,0,116,5,0,106,6,0,124,1,0,140,0,0,103,
1,0,131,1,0,1,116,7,0,106,8,0,100,1,0,107,
2,0,114,78,0,116,2,0,106,9,0,106,10,0,116,11,
0,131,1,0,1,116,2,0,106,9,0,106,10,0,116,12,
0,131,1,0,1,116,5,0,124,0,0,95,5,0,116,13,
0,124,0,0,95,13,0,100,2,0,83,41,3,122,41,73,
110,115,116,97,108,108,32,116,104,101,32,112,97,116,104,45,
98,97,115,101,100,32,105,109,112,111,114,116,32,99,111,109,
112,111,110,101,110,116,115,46,114,28,1,0,0,78,41,14,
114,33,1,0,0,114,161,0,0,0,114,7,0,0,0,114,
254,0,0,0,114,149,0,0,0,114,6,1,0,0,114,19,
1,0,0,114,3,0,0,0,114,112,0,0,0,218,9,109,
101,116,97,95,112,97,116,104,114,163,0,0,0,114,168,0,
0,0,114,249,0,0,0,114,218,0,0,0,41,2,114,32,
1,0,0,90,17,115,117,112,112,111,114,116,101,100,95,108,
111,97,100,101,114,115,114,4,0,0,0,114,4,0,0,0,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
114,5,0,0,0,218,8,95,105,110,115,116,97,108,108,134,
5,0,0,115,16,0,0,0,0,2,10,1,9,1,28,1,
15,1,16,1,16,4,9,1,114,35,1,0,0,41,3,122,
3,119,105,110,114,1,0,0,0,114,2,0,0,0,41,57,
114,114,0,0,0,114,10,0,0,0,114,11,0,0,0,114,
17,0,0,0,114,19,0,0,0,114,28,0,0,0,114,38,
0,0,0,114,39,0,0,0,114,43,0,0,0,114,44,0,
0,0,114,46,0,0,0,114,55,0,0,0,218,4,116,121,
112,101,218,8,95,95,99,111,100,101,95,95,114,144,0,0,
0,114,15,0,0,0,114,135,0,0,0,114,14,0,0,0,
114,18,0,0,0,90,17,95,82,65,87,95,77,65,71,73,
67,95,78,85,77,66,69,82,114,73,0,0,0,114,72,0,
0,0,114,84,0,0,0,114,74,0,0,0,90,23,68,69,
66,85,71,95,66,89,84,69,67,79,68,69,95,83,85,70,
70,73,88,69,83,90,27,79,80,84,73,77,73,90,69,68,
95,66,89,84,69,67,79,68,69,95,83,85,70,70,73,88,
69,83,114,79,0,0,0,114,85,0,0,0,114,91,0,0,
0,114,95,0,0,0,114,97,0,0,0,114,105,0,0,0,
114,123,0,0,0,114,130,0,0,0,114,141,0,0,0,114,
147,0,0,0,114,150,0,0,0,114,155,0,0,0,218,6,
111,98,106,101,99,116,114,162,0,0,0,114,167,0,0,0,
114,168,0,0,0,114,184,0,0,0,114,194,0,0,0,114,
210,0,0,0,114,218,0,0,0,114,223,0,0,0,114,229,
0,0,0,114,224,0,0,0,114,230,0,0,0,114,247,0,
0,0,114,249,0,0,0,114,6,1,0,0,114,24,1,0,
0,114,161,0,0,0,114,33,1,0,0,114,35,1,0,0,
114,4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
5,0,0,0,218,8,60,109,111,100,117,108,101,62,8,0,
0,0,115,100,0,0,0,6,17,6,3,12,12,12,5,12,
5,12,6,12,12,12,10,12,9,12,5,12,7,15,22,15,
Issue #24400: Introduce a distinct type for 'async def' coroutines. Summary of changes: 1. Coroutines now have a distinct, separate from generators type at the C level: PyGen_Type, and a new typedef PyCoroObject. PyCoroObject shares the initial segment of struct layout with PyGenObject, making it possible to reuse existing generators machinery. The new type is exposed as 'types.CoroutineType'. As a consequence of having a new type, CO_GENERATOR flag is no longer applied to coroutines. 2. Having a separate type for coroutines made it possible to add an __await__ method to the type. Although it is not used by the interpreter (see details on that below), it makes coroutines naturally (without using __instancecheck__) conform to collections.abc.Coroutine and collections.abc.Awaitable ABCs. [The __instancecheck__ is still used for generator-based coroutines, as we don't want to add __await__ for generators.] 3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to allow passing native coroutines to the YIELD_FROM opcode. Before this change, 'yield from o' expression was compiled to: (o) GET_ITER LOAD_CONST YIELD_FROM Now, we use GET_YIELD_FROM_ITER instead of GET_ITER. The reason for adding a new opcode is that GET_ITER is used in some contexts (such as 'for .. in' loops) where passing a coroutine object is invalid. 4. Add two new introspection functions to the inspec module: getcoroutinestate(c) and getcoroutinelocals(c). 5. inspect.iscoroutine(o) is updated to test if 'o' is a native coroutine object. Before this commit it used abc.Coroutine, and it was requested to update inspect.isgenerator(o) to use abc.Generator; it was decided, however, that inspect functions should really be tailored for checking for native types. 6. sys.set_coroutine_wrapper(w) API is updated to work with only native coroutines. Since types.coroutine decorator supports any type of callables now, it would be confusing that it does not work for all types of coroutines. 7. Exceptions logic in generators C implementation was updated to raise clearer messages for coroutines: Before: TypeError("generator raised StopIteration") After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
110,22,1,18,2,6,1,6,2,9,2,9,2,10,2,21,
44,12,33,12,19,12,12,12,12,18,8,12,28,12,17,21,
55,21,12,18,10,12,14,9,3,12,1,15,65,19,64,19,
28,22,110,19,41,25,43,25,16,6,3,25,53,19,57,19,
41,19,134,19,146,15,23,12,11,12,68,
};