[issue45171] stacklevel handling in logging module is inconsistent

2022-03-27 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset c12ba6b2ff7908c8970b978f149d51ecd3fb195c by Jouke Witteveen in branch 'main': bpo-45171: Remove tests of deprecated logger.warn(). (GH-32139) https://github.com/python/cpython/commit/c12ba6b2ff7908c8970b978f149d51ecd3fb195c -- __

[issue45171] stacklevel handling in logging module is inconsistent

2022-03-27 Thread Jouke Witteveen
Change by Jouke Witteveen : -- pull_requests: +30220 pull_request: https://github.com/python/cpython/pull/32139 ___ Python tracker ___ _

[issue45171] stacklevel handling in logging module is inconsistent

2022-03-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan 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

[issue45171] stacklevel handling in logging module is inconsistent

2022-03-27 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 5ca6d7469be53960843df39bb900e9c3359f127f by Jouke Witteveen in branch 'main': bpo-45171: Fix stacklevel handling in logging. (GH-28287) https://github.com/python/cpython/commit/5ca6d7469be53960843df39bb900e9c3359f127f -- nosy: +vinay.saji

[issue45171] stacklevel handling in logging module is inconsistent

2021-11-08 Thread Jouke Witteveen
Jouke Witteveen added the comment: I would expect the opposite. Since the issue is visible only in certain cases (shortcut calls such as `logging.info` over `logger.info`, or redirected calls such as `logger.warn` which adds a stack frame for redirecting to `logger.warning`), any code that u

[issue45171] stacklevel handling in logging module is inconsistent

2021-11-08 Thread Andrei Kulakov
Andrei Kulakov added the comment: The stacklevel arg was added 3+ years ago, wouldn't fixing this break a lot of code in a way that's hard to detect? That is to say, logs will look just fine, but when you try to debug an issue, you will realise it's pointing to an unhelpful location? --

[issue45171] stacklevel handling in logging module is inconsistent

2021-09-11 Thread Jouke Witteveen
Change by Jouke Witteveen : -- keywords: +patch pull_requests: +26703 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28287 ___ Python tracker ___

[issue45171] stacklevel handling in logging module is inconsistent

2021-09-11 Thread Jouke Witteveen
New submission from Jouke Witteveen : Handling of `stacklevel` in the logging module makes a few unwarranted assumptions, for instance on the depth of the stack due to internal logging module calls. This can be seen for instance when using the shortcut call `logging.warning` to the root logge