Re: [Python-Dev] News from asyncio

2014-02-02 Thread Cameron Simpson
On 27Jan2014 09:15, Devin Jeanpierre wrote: > On Mon, Jan 27, 2014 at 5:21 AM, Victor Stinner > wrote: > > - asyncio.IncompleReadError.expected is the total expected size, not > > the remaining size > > Why not be consistent with the meaning of > http.client.IncompleteRead.expected? The current

Re: [Python-Dev] News from asyncio

2014-02-02 Thread Victor Stinner
Latest asyncio update: it has a new asyncio.subprocess submodule which provides a high-level API to control subprocesses, similar to subprocess.Popen but using asyncio event loop (and so is asynchronous). It solves the following old and tricky issue: http://bugs.python.org/issue12187 "subprocess.w

Re: [Python-Dev] News from asyncio

2014-01-27 Thread Devin Jeanpierre
On Mon, Jan 27, 2014 at 5:21 AM, Victor Stinner wrote: > - asyncio.IncompleReadError.expected is the total expected size, not > the remaining size Why not be consistent with the meaning of http.client.IncompleteRead.expected? The current meaning can be recovered via len(e.partial) + e.expected.

Re: [Python-Dev] News from asyncio

2014-01-27 Thread Victor Stinner
2014-01-27 Serhiy Storchaka : > 27.01.14 12:55, Victor Stinner написав(ла): > >> IncompleteReadError has two additionnal attributes: >> >> - partial: "incomplete" received bytes >> - expected: total number of expected bytes (n parameter of readexactly) > > This looks similar to http.client.Incomple

Re: [Python-Dev] News from asyncio

2014-01-27 Thread Serhiy Storchaka
27.01.14 12:55, Victor Stinner написав(ла): IncompleteReadError has two additionnal attributes: - partial: "incomplete" received bytes - expected: total number of expected bytes (n parameter of readexactly) This looks similar to http.client.IncompleteRead. ___

Re: [Python-Dev] News from asyncio

2014-01-27 Thread Victor Stinner
2014-01-27 Gustavo Carneiro : >> > Why not simply EOFError? >> >> IncompleteReadError has two additionnal attributes: >> >> - partial: "incomplete" received bytes >> - expected: total number of expected bytes (n parameter of readexactly) >> >> I prefer to use a different exception to ensure that th

Re: [Python-Dev] News from asyncio

2014-01-27 Thread Gustavo Carneiro
On 27 January 2014 10:55, Victor Stinner wrote: > 2014-01-27 Antoine Pitrou : > > On Mon, 27 Jan 2014 10:45:37 +0100 > > Victor Stinner wrote: > >> > >> - Tulip #111: StreamReader.readexactly() now raises an > >> IncompleteReadError if the > >> end of stream is reached before we received enough

Re: [Python-Dev] News from asyncio

2014-01-27 Thread Victor Stinner
2014-01-27 Antoine Pitrou : > On Mon, 27 Jan 2014 10:45:37 +0100 > Victor Stinner wrote: >> >> - Tulip #111: StreamReader.readexactly() now raises an >> IncompleteReadError if the >> end of stream is reached before we received enough bytes, instead of >> returning >> less bytes than requested. >

Re: [Python-Dev] News from asyncio

2014-01-27 Thread Antoine Pitrou
On Mon, 27 Jan 2014 10:45:37 +0100 Victor Stinner wrote: > > - Tulip #111: StreamReader.readexactly() now raises an > IncompleteReadError if the > end of stream is reached before we received enough bytes, instead of returning > less bytes than requested. Why not simply EOFError? Regards Antoin