[issue43723] Deprecate camelCase aliases from threading.py

STINNER Victor report at bugs.python.org
Mon Apr 12 08:30:47 EDT 2021


STINNER Victor <vstinner at python.org> added the comment:

> Tests should treat any unhandled deprecation warnings as a test failure.

libregrtest sets a sys.unraisablehook: a test is marked as "failed" if any "unraisable exception" is logged.

libregrtest might use a hook on warnings to do the same: log the warning, but mark the test as failed?

One issue that I had with libregrtest and sys.unraisablehook was that some "unraisable exception" was not logged in buildbot logs. I had to use sys.__stderr__ to ensure that the exception is logged. See regrtest_unraisable_hook() of test.libregrtest.utils.

It would be annoying to get a test marked as "FAILED" if the warning is not visible in logs :-(

---

Using -Werror on some CIs would be another option.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43723>
_______________________________________


More information about the Python-bugs-list mailing list