mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.12] gh-111276: Clarify docs and comments about the role of LC_CTYPE (GH-111319) (#111391)
Fix locale.LC_CTYPE documentation to no longer mention string.lower() et al. Those functions were removed in Python 3.0:
https://docs.python.org/2/library/string.htmlGH-deprecated-string-functions
Also, fix a comment in logging about locale-specific behavior of `str.lower()`.
(cherry picked from commit 6d42759c5e
)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
parent
883233dcc3
commit
713210985b
2 changed files with 11 additions and 8 deletions
|
@ -833,10 +833,8 @@ class SysLogHandler(logging.Handler):
|
|||
"local7": LOG_LOCAL7,
|
||||
}
|
||||
|
||||
#The map below appears to be trivially lowercasing the key. However,
|
||||
#there's more to it than meets the eye - in some locales, lowercasing
|
||||
#gives unexpected results. See SF #1524081: in the Turkish locale,
|
||||
#"INFO".lower() != "info"
|
||||
# Originally added to work around GH-43683. Unnecessary since GH-50043 but kept
|
||||
# for backwards compatibility.
|
||||
priority_map = {
|
||||
"DEBUG" : "debug",
|
||||
"INFO" : "info",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue