Rolf Krahl added the comment:

The design goal for my implementation was compatibility.  My version can be 
used as a drop in replacement for the existing urllib's HTTPHandler.  The only 
thing that need to be changed in the calling code is that it must call 
build_opener() to select the chunked handler in the place of the default 
HTTPHandler.  After this, the calling code can use the returned opener in the 
very same way as usual.

I guess, switching to a push interface would require major changes in the 
calling code.  

In principle, you could certainly support both schemes at the same time: you 
could change the internal design to a push interface and than wrap this by a 
pull interface for the compatibility with existing code.  But I'm not sure 
whether this would be worth the effort.  If, as Piotr suggests, the current 
urllib is going to be replaced by urllib3, then I guess, its questionable if it 
makes sense to add  major design changes that are incompatible with existing 
code to the current standard lib.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12319>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to