Movatterモバイル変換


[0]ホーム

URL:


homepage

Message285445

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Authoryselivanov
Recipientsgvanrossum, yselivanov
Date2017-01-13.22:11:24
SpamBayes Score-1.0
Marked as misclassifiedYes
Message-id<1484345484.86.0.127501941011.issue29271@psf.upfronthosting.co.za>
In-reply-to
Content
Quoting Alberto Berdi from python-tulip mailing list:working with the Python 3.6 asyncio implemented in C, i've got what isfor me a strange behavior of the asyncio.Task.current taskfunction. Executing the following test: import asyncio async def coro():     print(asyncio.Task.current_task())     print(asyncio.Task.current_task(None))     print(asyncio.Task.current_task(loop=asyncio.get_event_loop())) loop = asyncio.get_event_loop() loop.run_until_complete(coro())in Py3.5, I obtain the result:<Task pending coro=<coro() running at test_task.py:4> cb=[_run_until_complete_cb() at /usr/lib/python3.5/asyncio/base_events.py:176]><Task pending coro=<coro() running at test_task.py:5> cb=[_run_until_complete_cb() at /usr/lib/python3.5/asyncio/base_events.py:176]><Task pending coro=<coro() running at test_task.py:6> cb=[_run_until_complete_cb() at /usr/lib/python3.5/asyncio/base_events.py:176]>In Py3.6, i get:<Task pending coro=<coro() running at test_task.py:4> cb=[_run_until_complete_cb() at /usr/lib/python3.6/asyncio/base_events.py:176]>None<Task pending coro=<coro() running at test_task.py:6> cb=[_run_until_complete_cb() at /usr/lib/python3.6/asyncio/base_events.py:176]>What's going on here? It's still right to expect the same result from the three calls or something has changed?The documentation for the Task.current_task() function seems unchanged between the two version.My python3.6 has version:$ python3.6 -VVPython 3.6.0 (default, Dec 29 2016, 04:29:02) [GCC 6.2.1 20161215]
History
DateUserActionArgs
2017-01-13 22:11:24yselivanovsetrecipients: +yselivanov,gvanrossum
2017-01-13 22:11:24yselivanovsetmessageid: <1484345484.86.0.127501941011.issue29271@psf.upfronthosting.co.za>
2017-01-13 22:11:24yselivanovlinkissue29271 messages
2017-01-13 22:11:24yselivanovcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp