[Python-Dev] please back out changeset f903cf864191 before alpha-2

Ryan rymg19 at gmail.com
Mon Aug 26 20:34:32 CEST 2013

How about StreamParser? I mean, even if it isn't quite the same, that name would still make sense.

Eli Bendersky <eliben at gmail.com> wrote:

>On Mon, Aug 26, 2013 at 8:57 AM, Antoine Pitrou <solipsis at pitrou.net>
>> Le Mon, 26 Aug 2013 17:44:41 +0200,
>> Simon Cross <hodgestar+pythondev at gmail.com> a écrit :
>> > On Mon, Aug 26, 2013 at 2:51 PM, Antoine Pitrou
><solipsis at pitrou.net>
>> > wrote:
>> > > Because this API is mostly useful when the data is received (*)
>at a
>> > > slow enough speed - which usually means from the network, not
>from a
>> > > hard drive.
>> >
>> > It looks like all the events have to be ready before one can start
>> > iterating over .events() in the new API? That doesn't seem that
>> > from an asynchronous programming perspective and .data_received()
>> > .eof_received() appear to be thin wrappers over .feed() and
>> What do you mean, "all events have to be ready"?
>> If you look at the unit tests, the events are generated on-the-fly,
>> not at the end of the document.
>> (exactly the same as iterparse(), except that iterparse() is
>> Implementation-wise, data_received() and eof_received() are not thin
>> wrappers over feed() and close(), they rely on an internal API to get
>> at the generated events (which justifies putting the functionality
>> inside the etree module, by the way).
>Antoine, you opted out of the tracker issue but I feel it's fair to let
>know that after a lot of discussion with Nick and Stefan (*), we've
>on renaming the input methods to feed & close, and the output method to
>read_events. We are also considering a different name for the class.
>I've posted with more detail and rationale in
>http://bugs.python.org/issue17741, but to summarize:
>The input-side of IncrementalParser is the same as the plain XMLParser.
>latter can also be given data incrementally by means of "feed". By
>it would collect the whole tree and return it in close(), but in
>you can rig a custom target that does something more fluid (though not
>the full extent of IncrementalParser). Therefore it was deemed
>confusing to
>have different names for this. Another reason is consistency with
>xml.sax.xmlreader.IncrementalParser, which also has feed() and close().
>As for the output method name, Nick suggested that read_events conveys
>destructive nature of the method better (by analogy to file/stream
>and others agreed.
>As for the class name, IncrementalParser is ambiguous because it's not
>immediately clear which side is incremental. Input or output? For the
>input, it's no more incremental than XMLParser itself, as stated above.
>output is what's different here, so we're considering a few candidates
>a better name that conveys the meaning more precisely.
>And to reiterate, I realize that it's unpleasant for you to have this
>up after it has already been committed. I assume the blame for not
>reviewing it in more detail originally. However, I feel it would still
>better to revise this now than just leave it be. APIs added to stdlib
>cooked in there for a *long time*. Alternatively, Nick suggested
>this API a "provisional" status (PEP 411), and that's an option if we
>manage to reach some sort of consensus.
>(*) Well, to be completely precise, Stefan is still opposed to the
>Python-Dev mailing list
>Python-Dev at python.org

Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130826/c85b5e2b/attachment-0001.html>

More information about the Python-Dev mailing list