Amaury has found an issue with open and closefd, http://bugs.python.org/issue4233

The additional warnings aren't critical. But in retrospection I think that I made a small error during the design of the closefd feature. With a file descriptor number as first argument and closefd set to false, the file descriptor isn't closed when the file object is deallocated. It's also impossible to close the fd with close(). Right now close() doesn't do anything and you can still write or read after close(). This behavior is surprising to the user. I like to change close() to set the internal fd attribute to -1 (meaning close) but keep the fd open.

Maybe the warning could be dropped all along, too.

Christian

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to