user/py3-dateparser: upgrade to 1.1.8

This commit is contained in:
Antoine Martin 2023-04-01 09:15:14 -04:00
parent 9248c55972
commit a008fa7791
Signed by: forge
GPG key ID: D62A472A4AA7D541
2 changed files with 3 additions and 32 deletions

View file

@ -1,25 +0,0 @@
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

View file

@ -3,7 +3,7 @@
_pyname="dateparser"
pkgname="py3-$_pyname"
pkgver=1.1.1
pkgver=1.1.8
pkgrel=0
arch="noarch"
pkgdesc="Python parser for human readable dates"
@ -12,10 +12,7 @@ license="BSD-3-Clause"
depends='python3 py3-dateutil py3-regex py3-tz py3-ruamel-yaml'
makedepends="py3-setuptools"
options="!check" # No testsuite
source="
$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz
0001-fix-for-parsing-error-due-to-regex-version.patch
"
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
build() {
@ -26,6 +23,5 @@ package() {
python3 setup.py install --root="$pkgdir"/ --optimize=1 --skip-build
}
sha512sums="
2ef25877616ce6e0aaa4ede53b4c27e848a63e5237b6e4095071b1a4eb5e0162e25f0be6a96697a11628753b798c9dfeff5d098889bf409678f51a3f4446d944 py3-dateparser-1.1.1.tar.gz
9f6234c729c6464ee4020288b0695d13dbc2c78d531711d3b36901164c104183f2a293649c4f1312122c7fa29e653720c533b3dabb55a517153f399b00cee8f5 0001-fix-for-parsing-error-due-to-regex-version.patch
45fc6ee67be77ae9ece818b25e680a9416c30bbe8d71746a2b08910b57406d65e6b9f0c51ada1697034ea1f3f9a0952c2f0616c9fa1be4c7886e459e1cc2d898 py3-dateparser-1.1.8.tar.gz
"