module utils: update code to python3 (#10907)

* module utils: update code to python3

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-10-12 00:42:11 +13:00 committed by GitHub
commit cc83188594
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 83 additions and 77 deletions

View file

@ -50,11 +50,11 @@ def mapping_profile(string):
if in_table_c12(c):
# map non-ASCII space characters
# (that can be mapped) to Unicode space
tmp.append(u' ')
tmp.append(' ')
else:
tmp.append(c)
return u"".join(tmp)
return "".join(tmp)
def is_ral_string(string):
@ -160,7 +160,7 @@ def saslprep(string):
# "This profile specifies using Unicode normalization form KC."
string = normalize('NFKC', string)
if not string:
return u''
return ''
# RFC4013: 2.3. Prohibited Output.
# RFC4013: 2.4. Bidirectional Characters.