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

Issue 168070043: Move loop attribute to _FlowControlMixin

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 5 months ago by haypo_gmail
Modified:
9 years, 5 months ago
Reviewers:
Andrew Svetlov, GvR
Visibility:
Public.

Description

Move loop attribute to _FlowControlMixin

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -8 lines) Patch
M asyncio/proactor_events.py View 1 chunk +1 line, -2 lines 0 comments Download
M asyncio/selector_events.py View 2 chunks +1 line, -2 lines 0 comments Download
M asyncio/transports.py View 1 chunk +3 lines, -1 line 2 comments Download
M asyncio/unix_events.py View 1 chunk +1 line, -2 lines 0 comments Download
M tests/test_transports.py View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 5
GvR
Good catch. LGTM.
9 years, 5 months ago (2014-11-03 03:03:47 UTC) #1
Andrew Svetlov
https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py File asyncio/transports.py (right): https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py#newcode243 asyncio/transports.py:243: assert loop is not None assert is inconsistent with ...
9 years, 5 months ago (2014-11-05 15:39:50 UTC) #2
Andrew Svetlov
https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py File asyncio/transports.py (right): https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py#newcode243 asyncio/transports.py:243: assert loop is not None assert is inconsistent with ...
9 years, 5 months ago (2014-11-05 15:39:50 UTC) #3
haypo_gmail
https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py File asyncio/transports.py (right): https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py#newcode243 asyncio/transports.py:243: assert loop is not None On 2014/11/05 15:39:50, Andrew ...
9 years, 5 months ago (2014-11-05 15:49:27 UTC) #4
Andrew Svetlov
9 years, 5 months ago (2014-11-05 16:04:56 UTC) #5
On 2014/11/05 15:49:27, haypo_gmail wrote:
> https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py
> File asyncio/transports.py (right):
> 
>
https://codereview.appspot.com/168070043/diff/1/asyncio/transports.py#newcode243
> asyncio/transports.py:243: assert loop is not None
> On 2014/11/05 15:39:50, Andrew Svetlov wrote:
> > assert is inconsistent with ctor signature: looking on __init__ the loop
> > parameter has default None value.
> 
> Well, that's right but I wanted to use the same prototype than other classes.
> Example with Future:
> 
>     def __init__(self, *, loop=None):

Yes, Future and others can be constructed with implicit event loop.
But every transport in asyncio requires explicit pass of loop parameter.
Sign in to reply to this message.

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