Marcel Hellkamp
Marcel Hellkamp
It's a very small piece of code and somewhat obvious if you think about it, so I don't care much if my name is mentioned or not. That someone noticed,...
Looks like birkenfeld introduced the function in 2007 https://github.com/mitsuhiko/werkzeug/commit/2fe4c8f24b42ba2d6f75ebe75dbc2ef80561fb8f He's the one :)
This also means that someone _broke_ the nice properties of the decorator later by turning it into a data descriptor, then fixing it again in werkzeug 0.6, which perhaps explains...
Hm. Not wanting to trigger `500` is understandable, but I struggle to decide which behavior is correct in case of a bad `Content-Type` value. HTTP spec does not allow it,...
I'd imagine the following approach for a low-level non-blocking API: * `AIOMultipartParser.parse(bytes)` parses a non-empty chunk of input data and yields zero or more events: `PartInfo`, a non-empty byte-like object,...
`PartInfo` is only returned after all headers of a part were parsed and the `\r\n\r\n` was consumed. So, as long as the header part is not complete, an empty iterator...
The iterator-of-events approach (in contrast to the poll-individual-events approach) does not need an "I need more data" signal, because it always accepts more data. If you feed in a small...
Much of the error checking in your `main()` example for my approach can be removed if we actually trust the API to do what is documented. The parser works as...
> I'm confused as to why we would need multiple types of parser for blocking / async etc. We don't. We need one non-blocking parser, which can be used to...
So we can both build the other approach as a wrapper around our own. Nice trick with the generator as a way to send data into a deep callstack. I...