Martin Panter added the comment:

FYI instead of changing the helper into a static method, I think you could have 
just called http.client._get_content_length().

I don’t understand why we need the new encode_chunked=True flag. Can’t 
urllib.request leave the Transfer-Encoding field up to http.client? Yes it does 
set Content-Length in the Request object, but it does not set Accept-Encoding 
nor Connection. Also, it looks like you can still get chunked encoding if you 
set encode_chunked=False, which is confusing.

I left some review comments, and I think some of my earlier comments still 
apply. I still find it confusing the variety of objects accepted, and the 
different levels that the APIs work on. Hopefully it will become less confusing 
if we can figure out all the corner cases. I do think unifying the data types 
accepted by urlopen() and HTTPConnection is good, though I am not sure allowing 
text in urlopen() is the right direction.

----------

_______________________________________
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