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

Issue 110820049: Add asyncio.tasks.task_factory variable

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 9 months ago by haypo_gmail
Modified:
9 years, 8 months ago
Visibility:
Public.

Description

Add asyncio.tasks.task_factory variable

Patch Set 1 #

Patch Set 2 : Add BaseEventLoop.task_factory #

Total comments: 3

Patch Set 3 : Move task_factory to the event loop policy #

Total comments: 3

Patch Set 4 : Add loop.create_task() #

Total comments: 1

Patch Set 5 : Add create_task() to AbstractEventLoop #

Patch Set 6 : Only add BaseEventLoop.create_task(), leave event loop policies unchanged #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -3 lines) Patch
M asyncio/base_events.py View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M asyncio/events.py View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M asyncio/streams.py View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M asyncio/tasks.py View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M asyncio/test_utils.py View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tests/test_base_events.py View 1 2 3 4 5 2 chunks +24 lines, -0 lines 0 comments Download
M tests/test_events.py View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 18
GvR
https://codereview.appspot.com/110820049/diff/20001/asyncio/base_events.py File asyncio/base_events.py (right): https://codereview.appspot.com/110820049/diff/20001/asyncio/base_events.py#newcode133 asyncio/base_events.py:133: task_factory = tasks.Task Assuming this is going to be ...
9 years, 9 months ago (2014-07-03 17:33:09 UTC) #1
haypo_gmail
https://codereview.appspot.com/110820049/diff/20001/asyncio/base_events.py File asyncio/base_events.py (right): https://codereview.appspot.com/110820049/diff/20001/asyncio/base_events.py#newcode133 asyncio/base_events.py:133: task_factory = tasks.Task On 2014/07/03 17:33:09, GvR wrote: > ...
9 years, 9 months ago (2014-07-03 22:19:25 UTC) #2
GvR
https://codereview.appspot.com/110820049/diff/20001/asyncio/base_events.py File asyncio/base_events.py (right): https://codereview.appspot.com/110820049/diff/20001/asyncio/base_events.py#newcode133 asyncio/base_events.py:133: task_factory = tasks.Task On 2014/07/03 22:19:25, haypo_gmail wrote: > ...
9 years, 9 months ago (2014-07-03 23:30:21 UTC) #3
haypo_gmail
On 2014/07/03 23:30:21, GvR wrote: > Somehow this feels like a hack, not up to ...
9 years, 8 months ago (2014-07-04 20:38:11 UTC) #4
yselivanov
I like this patch. I think we should also add a 'create_task()' method to EventLoop ...
9 years, 8 months ago (2014-07-07 15:51:41 UTC) #5
songofacandy
On 2014/07/07 15:51:41, yselivanov wrote: > I like this patch. > > I think we ...
9 years, 8 months ago (2014-07-07 16:25:48 UTC) #6
yselivanov
On 2014/07/07 16:25:48, songofacandy wrote: > On 2014/07/07 15:51:41, yselivanov wrote: > > I like ...
9 years, 8 months ago (2014-07-07 16:43:15 UTC) #7
haypo_gmail
On 2014/07/07 15:51:41, yselivanov wrote: > I like this patch. Cool. > I think we ...
9 years, 8 months ago (2014-07-07 19:33:42 UTC) #8
yselivanov
https://codereview.appspot.com/110820049/diff/60001/asyncio/base_events.py File asyncio/base_events.py (right): https://codereview.appspot.com/110820049/diff/60001/asyncio/base_events.py#newcode155 asyncio/base_events.py:155: def create_task(self, coro): You should also update AbstractEventLoop with ...
9 years, 8 months ago (2014-07-07 20:11:28 UTC) #9
haypo_gmail
On 2014/07/07 20:11:28, yselivanov wrote: > You should also update AbstractEventLoop with a 'create_task' api ...
9 years, 8 months ago (2014-07-07 21:30:40 UTC) #10
yselivanov
On 2014/07/07 21:30:40, haypo_gmail wrote: > On 2014/07/07 20:11:28, yselivanov wrote: > > You should ...
9 years, 8 months ago (2014-07-07 21:46:30 UTC) #11
GvR
Wow, I like the latest version (just the create_task()) method a lot! However, it requires ...
9 years, 8 months ago (2014-07-08 00:06:24 UTC) #12
yselivanov
On 2014/07/08 00:06:24, GvR wrote: > Wow, I like the latest version (just the create_task()) ...
9 years, 8 months ago (2014-07-08 00:12:53 UTC) #13
haypo_gmail
Guido wrote: > However, it requires subclassing. Maybe that's not a problem if the > ...
9 years, 8 months ago (2014-07-08 00:40:17 UTC) #14
yselivanov
On 2014/07/08 00:40:17, haypo_gmail wrote: > Guido wrote: > > However, it requires subclassing. Maybe ...
9 years, 8 months ago (2014-07-08 01:31:55 UTC) #15
GvR
On 2014/07/08 01:31:55, yselivanov wrote: > I'm +1 for 'loop.create_task()' being the only public and ...
9 years, 8 months ago (2014-07-08 01:50:53 UTC) #16
yselivanov
On 2014/07/08 01:50:53, GvR wrote: > On 2014/07/08 01:31:55, yselivanov wrote: > > I'm +1 ...
9 years, 8 months ago (2014-07-08 02:19:03 UTC) #17
GvR
9 years, 8 months ago (2014-07-08 02:34:01 UTC) #18
On 2014/07/08 02:19:03, yselivanov wrote:
> On 2014/07/08 01:50:53, GvR wrote:
> > On 2014/07/08 01:31:55, yselivanov wrote:
> > > I'm +1 for 'loop.create_task()' being the only public and safe api for
> > creating
> > > tasks.
> > 
> > Agreed. LGTM!
> 
> Great ;) I'm really excited about this patch!
> This will make it into 3.4.x, right?

Yup. This is exactly the kind of API adjustments that the "provisional" status
was meant for.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b