File tree 2 files changed +12
-9
lines changed
2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -464,11 +464,16 @@ The :mod:`locale` module defines the following exception and functions:
464
464
465
465
.. data :: LC_CTYPE
466
466
467
- .. index :: pair: module; string
468
-
469
- Locale category for the character type functions. Depending on the settings of
470
- this category, the functions of module :mod: `string ` dealing with case change
471
- their behaviour.
467
+ Locale category for the character type functions. Most importantly, this
468
+ category defines the text encoding, i.e. how bytes are interpreted as
469
+ Unicode codepoints. See :pep: `538 ` and :pep: `540 ` for how this variable
470
+ might be automatically coerced to ``C.UTF-8 `` to avoid issues created by
471
+ invalid settings in containers or incompatible settings passed over remote
472
+ SSH connections.
473
+
474
+ Python doesn't internally use locale-dependent character transformation functions
475
+ from ``ctype.h ``. Instead, an internal ``pyctype.h `` provides locale-independent
476
+ equivalents like :c:macro: `!Py_TOLOWER `.
472
477
473
478
474
479
.. data :: LC_COLLATE
Original file line number Diff line number Diff line change @@ -833,10 +833,8 @@ class SysLogHandler(logging.Handler):
833
833
"local7" : LOG_LOCAL7 ,
834
834
}
835
835
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.
840
838
priority_map = {
841
839
"DEBUG" : "debug" ,
842
840
"INFO" : "info" ,
You can’t perform that action at this time.
0 commit comments