https://github.com/python/cpython
Revision 0a24a57888798905e3b8891c59e61ed4f1bfc5a8 authored by Miss Islington (bot) on 16 December 2020, 10:10:32 UTC, committed by GitHub on 16 December 2020, 10:10:32 UTC
* bpo-42644: Validate values in logging.disable() Technically make the value of manager a property that checks and convert values assigned to it properly. This has the side effect of making `logging.disable` also accept strings representing the various level of warnings. We want to validate the type of the disable attribute at assignment time, as it is later compared to other levels when emitting warnings and would generate a `TypeError: '>=' not supported between ....` in a different part of the code base, which can make it difficult to track down. When assigned an incorrect value; it will raise a TypeError when the wrong type, or ValueError if an invalid str. Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> (cherry picked from commit b32d8b4f9bcd2e7d11240b6b9de0262cf8f5e09d) Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
1 parent aedc94b
Tip revision: 0a24a57888798905e3b8891c59e61ed4f1bfc5a8 authored by Miss Islington (bot) on 16 December 2020, 10:10:32 UTC
bpo-42644: Validate values in logging.disable() (GH-23786)
bpo-42644: Validate values in logging.disable() (GH-23786)
Tip revision: 0a24a57
File | Mode | Size |
---|---|---|
.azure-pipelines | ||
.github | ||
Doc | ||
Grammar | ||
Include | ||
Lib | ||
Mac | ||
Misc | ||
Modules | ||
Objects | ||
PC | ||
PCbuild | ||
Parser | ||
Programs | ||
Python | ||
Tools | ||
m4 | ||
.gitattributes | -rw-r--r-- | 1.8 KB |
.gitignore | -rw-r--r-- | 1.8 KB |
.travis.yml | -rw-r--r-- | 8.1 KB |
CODE_OF_CONDUCT.md | -rw-r--r-- | 630 bytes |
LICENSE | -rw-r--r-- | 13.6 KB |
Makefile.pre.in | -rw-r--r-- | 66.0 KB |
README.rst | -rw-r--r-- | 9.8 KB |
aclocal.m4 | -rw-r--r-- | 10.7 KB |
config.guess | -rwxr-xr-x | 43.1 KB |
config.sub | -rwxr-xr-x | 35.4 KB |
configure | -rwxr-xr-x | 493.6 KB |
configure.ac | -rw-r--r-- | 163.6 KB |
install-sh | -rwxr-xr-x | 15.0 KB |
pyconfig.h.in | -rw-r--r-- | 44.3 KB |
setup.py | -rw-r--r-- | 101.7 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...