@@ -183,7 +183,7 @@ msgstr ""
183183
184184#: ../../library/asyncio-dev.rst:87
185185msgid "loop.call_soon_threadsafe(fut.cancel)"
186- msgstr ""
186+ msgstr "loop.call_soon_threadsafe(fut.cancel) "
187187
188188#: ../../library/asyncio-dev.rst:89
189189msgid ""
@@ -203,6 +203,14 @@ msgid ""
203203"# Wait for the result:\n"
204204"result = future.result()"
205205msgstr ""
206+ "async def coro_func():\n"
207+ " return await asyncio.sleep(1, 42)\n"
208+ "\n"
209+ "# Later in another OS thread:\n"
210+ "\n"
211+ "future = asyncio.run_coroutine_threadsafe(coro_func(), loop)\n"
212+ "# Wait for the result:\n"
213+ "result = future.result()"
206214
207215#: ../../library/asyncio-dev.rst:102
208216msgid "To handle signals the event loop must be run in the main thread."
@@ -267,7 +275,7 @@ msgstr ""
267275
268276#: ../../library/asyncio-dev.rst:148
269277msgid "logging.getLogger(\" asyncio\" ).setLevel(logging.WARNING)"
270- msgstr ""
278+ msgstr "logging.getLogger( \" asyncio \" ).setLevel(logging.WARNING) "
271279
272280#: ../../library/asyncio-dev.rst:151
273281msgid ""
@@ -309,6 +317,8 @@ msgid ""
309317"test.py:7: RuntimeWarning: coroutine 'test' was never awaited\n"
310318" test()"
311319msgstr ""
320+ "test.py:7: RuntimeWarning: coroutine 'test' was never awaited\n"
321+ " test()"
312322
313323#: ../../library/asyncio-dev.rst:181 ../../library/asyncio-dev.rst:237
314324msgid "Output in debug mode::"
@@ -327,6 +337,16 @@ msgid ""
327337" test()\n"
328338" test()"
329339msgstr ""
340+ "test.py:7: RuntimeWarning: coroutine 'test' was never awaited\n"
341+ "Coroutine created at (most recent call last)\n"
342+ " File \" ../t.py\" , line 9, in <module>\n"
343+ " asyncio.run(main(), debug=True)\n"
344+ "\n"
345+ " < .. >\n"
346+ "\n"
347+ " File \" ../t.py\" , line 7, in main\n"
348+ " test()\n"
349+ " test()"
330350
331351#: ../../library/asyncio-dev.rst:194
332352msgid ""
@@ -339,6 +359,8 @@ msgid ""
339359"async def main():\n"
340360" await test()"
341361msgstr ""
362+ "async def main():\n"
363+ " await test()"
342364
343365#: ../../library/asyncio-dev.rst:202
344366msgid "Detect never-retrieved exceptions"
@@ -368,6 +390,15 @@ msgid ""
368390"\n"
369391"asyncio.run(main())"
370392msgstr ""
393+ "import asyncio\n"
394+ "\n"
395+ "async def bug():\n"
396+ " raise Exception(\" not consumed\" )\n"
397+ "\n"
398+ "async def main():\n"
399+ " asyncio.create_task(bug())\n"
400+ "\n"
401+ "asyncio.run(main())"
371402
372403#: ../../library/asyncio-dev.rst:223
373404msgid ""
@@ -380,6 +411,14 @@ msgid ""
380411" raise Exception(\" not consumed\" )\n"
381412"Exception: not consumed"
382413msgstr ""
414+ "Task exception was never retrieved\n"
415+ "future: <Task finished coro=<bug() done, defined at test.py:3>\n"
416+ " exception=Exception('not consumed')>\n"
417+ "\n"
418+ "Traceback (most recent call last):\n"
419+ " File \" test.py\" , line 4, in bug\n"
420+ " raise Exception(\" not consumed\" )\n"
421+ "Exception: not consumed"
383422
384423#: ../../library/asyncio-dev.rst:232
385424msgid ""
@@ -389,7 +428,7 @@ msgstr ""
389428
390429#: ../../library/asyncio-dev.rst:235
391430msgid "asyncio.run(main(), debug=True)"
392- msgstr ""
431+ msgstr "asyncio.run(main(), debug=True) "
393432
394433#: ../../library/asyncio-dev.rst:239
395434msgid ""
@@ -408,3 +447,17 @@ msgid ""
408447" raise Exception(\" not consumed\" )\n"
409448"Exception: not consumed"
410449msgstr ""
450+ "Task exception was never retrieved\n"
451+ "future: <Task finished coro=<bug() done, defined at test.py:3>\n"
452+ " exception=Exception('not consumed') created at asyncio/tasks.py:321>\n"
453+ "\n"
454+ "source_traceback: Object created at (most recent call last):\n"
455+ " File \" ../t.py\" , line 9, in <module>\n"
456+ " asyncio.run(main(), debug=True)\n"
457+ "\n"
458+ "< .. >\n"
459+ "\n"
460+ "Traceback (most recent call last):\n"
461+ " File \" ../t.py\" , line 4, in bug\n"
462+ " raise Exception(\" not consumed\" )\n"
463+ "Exception: not consumed"
0 commit comments