@@ -1120,6 +1120,8 @@ msgid ""
1120
1120
"return the currently running loop when called from coroutines and callbacks."
1121
1121
" (Contributed by Yury Selivanov in :issue:`28613`.)"
1122
1122
msgstr ""
1123
+ ":func:`~asyncio.get_event_loop` 函数已更改为当在例程和回调中被调用时始终返回当前正在运行的循环。(由 Yury "
1124
+ "Selivanov 在 :issue:`28613` 中贡献。)"
1123
1125
1124
1126
#: ../../whatsnew/3.6.rst:826
1125
1127
msgid ""
@@ -1128,6 +1130,10 @@ msgid ""
1128
1130
" now accept all kinds of :term:`awaitable objects <awaitable>`. (Contributed"
1129
1131
" by Yury Selivanov.)"
1130
1132
msgstr ""
1133
+ ":func:`~a
8000
syncio.ensure_future` 函数以及所有用到它的函数,比如 "
1134
+ ":meth:`loop.run_until_complete() "
1135
+ "<asyncio.loop.run_until_complete>`,现在将接受所有种类的 :term:`可等待对象 <awaitable>`。 (由 "
1136
+ "Yury Selivanov 贡献。)"
1131
1137
1132
1138
#: ../../whatsnew/3.6.rst:831
1133
1139
msgid ""
@@ -1162,34 +1168,46 @@ msgid ""
1162
1168
"faster :class:`asyncio.Future` implementation. (Contributed by Yury "
1163
1169
"Selivanov in :issue:`27041`.)"
1164
1170
msgstr ""
1171
+ "新增 :meth:`loop.create_future() <asyncio.loop.create_future>` 方法用来创建 Future "
1172
+ "对象。 这允许替代性的事件循环实现,比如 `uvloop "
1173
+ "<https://github.com/MagicStack/uvloop>`_,以提供更快速的 :class:`asyncio.Future` 实现。"
1174
+ " (由 Yury Selivanov 在 :issue:`27041` 中贡献。)"
1165
1175
1166
1176
#: ../../whatsnew/3.6.rst:850
1167
1177
msgid ""
1168
1178
"New :meth:`loop.get_exception_handler() "
1169
1179
"<asyncio.loop.get_exception_handler>` method to get the current exception "
1170
1180
"handler. (Contributed by Yury Selivanov in :issue:`27040`.)"
1171
1181
msgstr ""
1182
+ "新增 :meth:`loop.get_exception_handler() <asyncio.loop.get_exception_handler>`"
1183
+ " 方法用于获取当前异常处理句柄。 (由 Yury Selivanov 在 :issue:`27040` 中贡献。)"
1172
1184
1173
1185
#: ../../whatsnew/3.6.rst:854
1174
1186
msgid ""
1175
1187
"New :meth:`StreamReader.readuntil() <asyncio.StreamReader.readuntil>` method"
1176
1188
" to read data from the stream until a separator bytes sequence appears. "
1177
1189
"(Contributed by Mark Korenberg.)"
1178
1190
msgstr ""
1191
+ "新增 :meth:`StreamReader.readuntil() <asyncio.StreamReader.readuntil>` "
1192
+ "方法用于从流读取数据直到出现作为分隔符的字节序列。 (由 Mark Korenberg 贡献。)"
1179
1193
1180
1194
#: ../../whatsnew/3.6.rst:859
1181
1195
msgid ""
1182
1196
"The performance of :meth:`StreamReader.readexactly() "
1183
1197
"<asyncio.StreamReader.readexactly>` has been improved. (Contributed by Mark "
1184
1198
"Korenberg in :issue:`28370`.)"
1185
1199
msgstr ""
1200
+ ":meth:`StreamReader.readexactly() <asyncio.StreamReader.readexactly>` "
1201
+ "的性能已获得提升。 (由 Mark Korenberg 在 :issue:`28370` 中贡献。)"
1186
1202
1187
1203
#: ../../whatsnew/3.6.rst:863
1188
1204
msgid ""
1189
1205
"The :meth:`loop.getaddrinfo() <asyncio.loop.getaddrinfo>` method is "
1190
1206
"optimized to avoid calling the system ``getaddrinfo`` function if the "
1191
1207
"address is already resolved. (Contributed by A. Jesse Jiryu Davis.)"
1192
1208
msgstr ""
1209
+ ":meth:`loop.getaddrinfo() <asyncio.loop.getaddrinfo>` 方法已获得优化已避免当地址已被解析时调用系统"
1210
+ " ``getaddrinfo`` 函数。 (由 A. Jesse Jiryu Davis 贡献。)"
1193
1211
1194
1212
#: ../../whatsnew/3.6.rst:868
1195
1213
msgid ""
@@ -1198,13 +1216,18 @@ msgid ""
1198
1216
"scheduled as a result of the last iteration will be discarded. (Contributed "
1199
1217
"by Guido van Rossum in :issue:`25593`.)"
1200
1218
msgstr ""
1219
+ ":meth:`loop.stop() <asyncio.loop.stop>` 方法已被更改为在当前迭代之后立即停止循环。 "
1220
+ "任何作为上次迭代的结果被加入计划任务的新回调都将被丢弃。 (由 Guido van Rossum 在 :issue:`25593` 中贡献。)"
1201
1221
1202
1222
#: ../../whatsnew/3.6.rst:874
1203
1223
msgid ""
1204
1224
":meth:`Future.set_exception <asyncio.futures.Future.set_exception>` will now"
1205
1225
" raise :exc:`TypeError` when passed an instance of the :exc:`StopIteration` "
1206
1226
"exception. (Contributed by Chris Angelico in :issue:`26221`.)"
1207
1227
msgstr ""
1228
+ "现在 :meth:`Future.set_exception <asyncio.futures.Future.set_exception>` 在传入一个"
1229
+ " :exc:`StopIteration` 异常的实例时将引发 :exc:`TypeError`。 (由 Chris Angelico 在 "
1230
+ ":issue:`26221` 中贡献。)"
1208
1231
1209
1232
#: ../../whatsnew/3.6.rst:879
1210
1233
msgid ""
@@ -1213,6 +1236,9 @@ msgid ""
1213
1236
"accept connections outside of asyncio, but that use asyncio to handle them. "
1214
1237
"(Contributed by Jim Fulton in :issue:`27392`.)"
1215
1238
msgstr ""
1239
+ "新增 :meth:`loop.connect_accepted_socket() "
1240
+ "<asyncio.loop.connect_accepted_socket>` 方法供接受 asyncio 以外的连接,但使用 asyncio "
1241
+ "来处理它们的服务器使用。 (由 Jim Fulton 在 :issue:`27392` 中贡献。)"
1216
1242
1217
1243
#: ../../whatsnew/3.6.rst:884
1218
1244
msgid ""
0 commit comments