New submission from Zane Bitter <za...@fedoraproject.org>:

This is a related issue to bug 34269, in the sense that it is also due to the 
caching added by the fix for bug 30962.

In this case, the bug is triggered by setting the public 'level' attribute of a 
logging.Logger object, instead of calling the setLevel() method. Although this 
was probably never a good idea, prior to Python3.7 it worked as expected. Now 
it renders the level out of sync with the cache, leading to inconsistent 
results that are hard to debug.

An example in the wild: https://review.opendev.org/676450

----------
components: Library (Lib)
messages: 349741
nosy: zaneb
priority: normal
severity: normal
status: open
title: Setting logger.level directly has no effect due to caching in 3.7+
type: behavior
versions: Python 3.7, Python 3.8

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

Reply via email to