From 6ac3ae28b85b4859b87ad8362f8cb26071086ad6 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 26 Sep 2023 19:51:20 -0400 Subject: [PATCH] drop fallback for people running from source with calibre 5.41 --- src/calibre/utils/icu.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/calibre/utils/icu.py b/src/calibre/utils/icu.py index 24c3450b97..510ae675ed 100644 --- a/src/calibre/utils/icu.py +++ b/src/calibre/utils/icu.py @@ -83,10 +83,7 @@ def collator(strength=None, numeric=None, ignore_alternate_chars=None, upper_fir if upper_first is not None: ans.upper_first = upper_first 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) - except AttributeError: - pass # people running from source without latest binary + ans.set_attribute(_icu.UCOL_ALTERNATE_HANDLING, _icu.UCOL_SHIFTED if ignore_alternate_chars else _icu.UCOL_NON_IGNORABLE) thread_local_collator_cache.cache[key] = ans return ans