[issue45171] stacklevel handling in logging module is inconsistent

Karthikeyan Singaravelan report at bugs.python.org
Sun Mar 27 12:40:13 EDT 2022


Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:

The commit seems to emit a deprecation warning in test_logging. Probably the warning needs to be handled while setting trigger = self.logger.warn

PYTHONWARNINGS=always ./python -Wall -m test test_logging                       
0:00:00 load avg: 1.63 Run tests sequentially
0:00:00 load avg: 1.63 [1/1] test_logging
/home/karthikeyan/stuff/python/cpython/Lib/test/test_logging.py:5056: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
  trigger('test', stacklevel=the_level)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 20.1 sec
Tests result: SUCCESS

----------
nosy: +xtreak

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


More information about the Python-bugs-list mailing list