ayaports/user/py3-dateparser/0001-fix-for-parsing-error-due-to-regex-version.patch
build@apk-groulx f77e3588dc user/insaned: new aport
user/lua-aports: upgrade
user/paperless-ng: upgrade + openrc
user/paperless-ngx: new aport
user/py3-anyio: new aport
user/py3-dateparser: upgrade
user/py3-pdf2image: new aport
user/py3-pyaml: new aport
user/py3-pytz: new aport
user/py3-pyyaml: new aport
user/py3-tzdata: new aport
user/py3-tzlocal: new aport
user/rmfakecloud: upgrade
user/scanbd: new aport
user/scantopl: new aport
user/xinetd: new aport
2022-08-15 15:51:38 +00:00

25 lines
1,005 B
Diff

From 12a5ef9e641ac65bf2f5f2a8427d2f85466b35ca Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Sun, 31 Jul 2022 16:32:21 +0000
Subject: [PATCH 1/1] fix for parsing error due to regex version
---
dateparser/languages/locale.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dateparser/languages/locale.py b/dateparser/languages/locale.py
index 0cb5785..a1b3c8f 100644
--- a/dateparser/languages/locale.py
+++ b/dateparser/languages/locale.py
@@ -169,7 +169,7 @@ class Locale:
if normalize:
value = list(map(normalize_unicode, value))
pattern = '|'.join(sorted(value, key=len, reverse=True))
- pattern = DIGIT_GROUP_PATTERN.sub(r'?P<n>\d+', pattern)
+ pattern = pattern.replace(r'\d+', r'?P<n>\d+')
pattern = re.compile(r'^(?:{})$'.format(pattern), re.UNICODE | re.IGNORECASE)
relative_dictionary[pattern] = key
return relative_dictionary
--
2.36.2