Irit Katriel <iritkatr...@yahoo.com> added the comment:

The documentation states that: 

Calling a GzipFile object’s close() method does not close fileobj, since you 
might wish to append more material after the compressed data. This also allows 
you to pass an io.BytesIO object opened for writing as fileobj, and retrieve 
the resulting memory buffer using the io.BytesIO object’s getvalue() method.

(https://docs.python.org/3.8/library/gzip.html)


It's reasonable that, since you opened the file, you would also be responsible 
for closing it.

----------
components: +Library (Lib)
nosy: +iritkatriel

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

Reply via email to