STINNER Victor <vstin...@redhat.com> added the comment:

> I found the weird code in the example in several projects. I have corrected 
> it to use the pool as a context manager or to call close(), but this means 
> that users are doing this and it used to work and not it does not: 
> technically is a regression.

That's why I'm asking for a revert :-) I suggest to revert this change 
immediately from 2.7, 3.6 and 3.7, and later see what can be done for master.

Even if we design carefully an API, there will be always someone to misuse it 
:-) I would prefer to stop promoting such bad code and find a transition to 
more correct code.

I disagree that a child should keep its parent alive.

I would be ok to use a *weak reference* from the child to the parent to detect 
when the parent goes away, and maybe trigger an action in that case. For 
example, raise an exception or log a warning.

----------

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

Reply via email to