[issue5418] urllib.response.addinfourl does not support __exit__

2009-03-26 Thread Jeremy Hylton

Jeremy Hylton  added the comment:

Makes sense to me.
Committed revision 70625.

--
resolution: accepted -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5418] urllib.response.addinfourl does not support __exit__

2009-03-26 Thread Jeremy Hylton

Changes by Jeremy Hylton :


--
assignee:  -> jhylton
nosy: +jhylton
resolution:  -> accepted

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5418] urllib.response.addinfourl does not support __exit__

2009-03-04 Thread Mitchell Model

New submission from Mitchell Model :

response = urllib.request.open(someURL)
page = response.read()

close() be called on response after the read(), right?  Experimentation 
shows that I can repeatedly read from response until I close it, getting 
back empty bytes objects.

Thinking that anything with a close() should support the with statement, 
I tried putting  the code inside one but got
AttributeError: 'addinfourl' object has no attribute '__exit__'
so I can see that it doesn't support with. It seems like it should.

--
components: Library (Lib)
messages: 83174
nosy: MLModel
severity: normal
status: open
title: urllib.response.addinfourl does not support __exit__
type: behavior
versions: Python 3.0, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com