Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

I was wrong so removing the close call when io_refs gets to zero causes error 
on test_urllib2 [0] where close is asserted to be True and I only tested 
test_urllib initially. One another way would be to check for fp.closed in 
http.client before flushing but as mentioned before I am not sure of the 
attribute being always present and also to modify http.client code just for 
tests.

[0] 
https://github.com/python/cpython/blob/f12ba7cd0a7370631214ac0b337ab5455ce717b2/Lib/test/test_urllib2.py#L1685

----------

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

Reply via email to