drop fallback for people running from source with calibre 5.41

This commit is contained in:
Eli Schwartz 2023-09-26 19:51:20 -04:00
parent 75887beea7
commit 6ac3ae28b8
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6

View File

@ -83,10 +83,7 @@ def collator(strength=None, numeric=None, ignore_alternate_chars=None, upper_fir
if upper_first is not None: if upper_first is not None:
ans.upper_first = upper_first ans.upper_first = upper_first
if ignore_alternate_chars is not None: if ignore_alternate_chars is not None:
try: ans.set_attribute(_icu.UCOL_ALTERNATE_HANDLING, _icu.UCOL_SHIFTED if ignore_alternate_chars else _icu.UCOL_NON_IGNORABLE)
ans.set_attribute(_icu.UCOL_ALTERNATE_HANDLING, _icu.UCOL_SHIFTED if ignore_alternate_chars else _icu.UCOL_NON_IGNORABLE)
except AttributeError:
pass # people running from source without latest binary
thread_local_collator_cache.cache[key] = ans thread_local_collator_cache.cache[key] = ans
return ans return ans