Andrei Kulakov <andrei....@gmail.com> added the comment:

Martin:

I have a couple of concerns:

 - Generally (AFAIK) Python is very conservative about silencing arbitrary 
exceptions. There are a few functions with args like `ignore_errors`, but those 
are for errors in the logic of respective functions. I don't recall examples 
where any error would be silenced via an argument, but if there are such cases, 
it would be interesting to look into how the design decision was made.

In this case of course arbitrary exceptions coming any objects' __repr__ may be 
silenced.

There is a clear and very explicit way to catch exceptions via try/except and 
as a dev, I would really want to be able to look at a module, look at all 
try/except clauses and be confident that exceptions are not silenced elsewhere.

 - You are targeting this fix to production use, but realistically, if merged, 
it will be used both in testing and production. Which means, by not seeing 
these exceptions in testing, you will have a higher chance of deploying them to 
production where they can surface in other circumstances.

IOW, as a dev I might prefer to see these errors early and often, rather than 
have a mechanism that ends up silencing errors more broadly than intended.

I'm not saying this fix should be rejected, but that there's a tricky balance 
here -- and I don't feel confident enough about this solution to approve the PR 
if I reviewed it.

----------

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

Reply via email to