Łukasz Langa <luk...@langa.pl> added the comment:

Have you encountered misuse of Mock's `name` and `parent` in the wild? As 
you're saying, since `str()` and `repr()` will error out anyway, it's unlikely 
users were doing this in the first place.

I'm a little hesitant to accept the deprecation since there are very many 
places in the stdlib where we accept an equivalent of, say, `name=`  during 
some object's `__init__()` and just assign it to a field. If that happens not 
to be printable and crash `repr()` then too bad... but we won't be adding 
checks for each such case, right?

----------
nosy: +lukasz.langa

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

Reply via email to