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 @@ -454,11 +454,16 @@ The :mod:`locale` module defines the following exception and functions:
454
454
455
455
.. data :: LC_CTYPE
456
456
457
- .. index :: pair: module; string
458
-
459
- Locale category for the character type functions. Depending on the settings of
460
- this category, the functions of module :mod: `string ` dealing with case change
461
- their behaviour.
457
+ Locale category for the character type functions. Most importantly, this
458
+ category defines the text encoding, i.e. how bytes are interpreted as
459
+ Unicode codepoints. See :pep: `538 ` and :pep: `540 ` for how this variable
460
+ might be automatically coerced to ``C.UTF-8 `` to avoid issues created by
461
+ invalid settings in containers or incompatible settings passed over remote
462
+ SSH connections.
463
+
464
+ Python doesn't internally use locale-dependent character transformation functions
465
+ from ``ctype.h ``. Instead, an internal ``pyctype.h `` provides locale-independent
466
+ equivalents like :c:macro: `!Py_TOLOWER `.
462
467
463
468
464
469
.. data :: LC_COLLATE
Original file line number Diff line number Diff line change @@ -830,10 +830,8 @@ class SysLogHandler(logging.Handler):
830
830
"local7" : LOG_LOCAL7 ,
831
831
}
832
832
833
- #The map below appears to be trivially lowercasing the key. However,
834
- #there's more to it than meets the eye - in some locales, lowercasing
835
- #gives unexpected results. See SF #1524081: in the Turkish locale,
836
- #"INFO".lower() != "info"
833
+ # Originally added to work around GH-43683. Unnecessary since GH-50043 but kept
834
+ # for backwards compatibility.
837
835
priority_map = {
838
836
"DEBUG" : "debug" ,
839
837
"INFO" : "info" ,
You can’t perform that action at this time.
0 commit comments