File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -476,11 +476,16 @@ The :mod:`locale` module defines the following exception and functions:
476476
477477.. data :: LC_CTYPE
478478
479- .. index :: pair: module; string
480-
481- Locale category for the character type functions. Depending on the settings of
482- this category, the functions of module :mod: `string ` dealing with case change
483- their behaviour.
479+ Locale category for the character type functions. Most importantly, this
480+ category defines the text encoding, i.e. how bytes are interpreted as
481+ Unicode codepoints. See :pep: `538 ` and :pep: `540 ` for how this variable
482+ might be automatically coerced to ``C.UTF-8 `` to avoid issues created by
483+ invalid settings in containers or incompatible settings passed over remote
484+ SSH connections.
485+
486+ Python doesn't internally use locale-dependent character transformation functions
487+ from ``ctype.h ``. Instead, an internal ``pyctype.h `` provides locale-independent
488+ equivalents like :c:macro: `!Py_TOLOWER `.
484489
485490
486491.. data :: LC_COLLATE
Original file line number Diff line number Diff line change @@ -833,10 +833,8 @@ class SysLogHandler(logging.Handler):
833833 "local7" : LOG_LOCAL7 ,
834834 }
835835
836- #The map below appears to be trivially lowercasing the key. However,
837- #there's more to it than meets the eye - in some locales, lowercasing
838- #gives unexpected results. See SF #1524081: in the Turkish locale,
839- #"INFO".lower() != "info"
836+ # Originally added to work around GH-43683. Unnecessary since GH-50043 but kept
837+ # for backwards compatibility.
840838 priority_map = {
841839 "DEBUG" : "debug" ,
842840 "INFO" : "info" ,
You can’t perform that action at this time.
0 commit comments