Serhiy Storchaka added the comment:

1. What if only object which directly owns a limited resource will emit a 
ResourceWarning? This can break some tests, but may be these tests are too 
strong? Current GC may be better than when io classes were implemented.

2. An object which indirectly owns a limited resource don't know about this if 
use only public API. It can known about this only if the wrapped object 
provides _dealloc_warn(). Thus _dealloc_warn() extends the API. If allows an 
object which indirectly owns a limited resource emit a resource warning, it may 
be worth to expose _dealloc_warn() or something equivalent as public API.

----------

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

Reply via email to