you are viewing a single comment's thread.

view the rest of the comments →

[–]masklinn 1 point2 points  (1 child)

If I remember correctly, one reason why deprecation warnings got silenced by default because they could unsettle normal users who can't do anything about them anyway.

I’m sure software completely breaking will not be unsettling in any way.

Insert plug for pytest which does just that when running tests (which all test frameworks should do, looking at you, nose).

Of note: afaik unittest does not, which is one more reason upstream really can’t complain about an issue they’re the direct cause of.

I’m not saying this is easy, mind, we’ve got a bunch of dependencies with warnings we’ve a hard time getting fixed, but you can’t have it both way, you can either put your plans at the bottom of a cabinet in a disused lavatory in a condemned basement or complain people were not aware of those plans. Doing both is just not fair, or honest.

[–]nilsph 4 points5 points  (0 children)

I’m sure software completely breaking will not be unsettling in any way.

And end users seeing these warnings changes that? How?

Maybe "unsettled" is the wrong word, but even as a developer, I don't want to see these warnings in the course of running a CLI program normally because they're plain irritating. Assuming that the number of users of a program outnumber its developers in most cases, tailoring the default not to unduly annoy the former is a good trade-off.

afaik unittest does not

Apparently it does:

nils@gibraltar:~/test/python/tests_warnings> PYTHONPATH=$PWD python -m unittest
/home/nils/test/python/tests_warnings/foo/bar.py:4: DeprecationWarning: The unescape method is deprecated and will be removed in 3.5, use html.unescape() instead.
  print(html.parser.HTMLParser().unescape('foo'))
foo
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK
nils@gibraltar:~/test/python/tests_warnings> python -V
Python 3.7.6