Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] python3-dateparser: update to 1.1.1, patch breakage on python3-regex
@ 2022-08-22 17:28 icp1994
  2022-08-22 18:00 ` icp1994
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: icp1994 @ 2022-08-22 17:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]

There is a new pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages python3-dateparser
https://github.com/void-linux/void-packages/pull/38833

python3-dateparser: update to 1.1.1, patch breakage on python3-regex
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

Note that the breakage is not caused by updating the package rather due to an API change introduced in [`python3-regex-2022.3.15`](https://github.com/scrapinghub/dateparser/issues/1045#issuecomment-1069484011). Upstream mitigates this by pinning to an older version of that regex library in their setup.py but that doesn't work for [distro packages](https://github.com/scrapinghub/dateparser/issues/1052#issuecomment-1136438340). This patch is deemed sufficient by one of the [dateparser authors](https://github.com/scrapinghub/dateparser/issues/1052#issuecomment-1131559215) as a temporary fix till they make a new release with a proper fix.

Only one package, `Komikku-0.40.0` depends on this currently.

A patch file from https://github.com/void-linux/void-packages/pull/38833.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-python3-dateparser-38833.patch --]
[-- Type: text/x-diff, Size: 2747 bytes --]

From 9e8d4e53959f1e9d38a5415b7c37f3d5745bff79 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Mon, 22 Aug 2022 13:13:20 +0530
Subject: [PATCH] python3-dateparser: update to 1.1.1.

---
 .../patches/fix-python3-regex-incompatibility.patch  | 11 +++++++++++
 srcpkgs/python3-dateparser/template                  | 12 ++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)
 create mode 100644 srcpkgs/python3-dateparser/patches/fix-python3-regex-incompatibility.patch

diff --git a/srcpkgs/python3-dateparser/patches/fix-python3-regex-incompatibility.patch b/srcpkgs/python3-dateparser/patches/fix-python3-regex-incompatibility.patch
new file mode 100644
index 000000000000..4c69d14f1023
--- /dev/null
+++ b/srcpkgs/python3-dateparser/patches/fix-python3-regex-incompatibility.patch
@@ -0,0 +1,11 @@
+--- 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
diff --git a/srcpkgs/python3-dateparser/template b/srcpkgs/python3-dateparser/template
index 9d7c54cd818e..8185cc488fcd 100644
--- a/srcpkgs/python3-dateparser/template
+++ b/srcpkgs/python3-dateparser/template
@@ -1,17 +1,21 @@
 # Template file for 'python3-dateparser'
 pkgname=python3-dateparser
-version=1.0.0
-revision=2
+version=1.1.1
+revision=1
 wrksrc=dateparser-${version}
 build_style=python3-module
+make_check_args="--ignore tests/test_hijri.py --ignore tests/test_jalali.py
+ --ignore tests/test_language_detect.py --ignore tests/test_dateparser_data_integrity.py"
 hostmakedepends="python3-setuptools"
-depends="python3-dateutil python3-regex python3-tzlocal"
+depends="python3-dateutil python3-pytz python3-regex python3-tzlocal"
+checkdepends="${depends} python3-parameterized python3-pytest-xdist"
 short_desc="Python parser for human readable dates"
 maintainer="Lorem <notloremipsum@protonmail.com>"
 license="BSD-3-Clause"
 homepage="https://github.com/scrapinghub/dateparser"
+changelog="https://raw.githubusercontent.com/scrapinghub/dateparser/master/HISTORY.rst"
 distfiles="${PYPI_SITE}/d/dateparser/dateparser-${version}.tar.gz"
-checksum=159cc4e01a593706a15cd4e269a0b3345edf3aef8bf9278a57dac8adf5bf1e4a
+checksum=038196b1f12c7397e38aad3d61588833257f6f552baa63a1499e6987fa8d42d9
 
 post_install() {
 	vlicense LICENSE

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: python3-dateparser: update to 1.1.1, patch breakage on python3-regex
  2022-08-22 17:28 [PR PATCH] python3-dateparser: update to 1.1.1, patch breakage on python3-regex icp1994
@ 2022-08-22 18:00 ` icp1994
  2022-08-22 19:07 ` icp1994
  2022-09-06  9:19 ` [PR PATCH] [Closed]: " sgn
  2 siblings, 0 replies; 4+ messages in thread
From: icp1994 @ 2022-08-22 18:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

New comment by icp1994 on void-packages repository

https://github.com/void-linux/void-packages/pull/38833#issuecomment-1222727933

Comment:
One test failed (23421 passed) only on the x86_64-musl instance. From the test's name it's due to that container having non-english locale.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: python3-dateparser: update to 1.1.1, patch breakage on python3-regex
  2022-08-22 17:28 [PR PATCH] python3-dateparser: update to 1.1.1, patch breakage on python3-regex icp1994
  2022-08-22 18:00 ` icp1994
@ 2022-08-22 19:07 ` icp1994
  2022-09-06  9:19 ` [PR PATCH] [Closed]: " sgn
  2 siblings, 0 replies; 4+ messages in thread
From: icp1994 @ 2022-08-22 19:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

New comment by icp1994 on void-packages repository

https://github.com/void-linux/void-packages/pull/38833#issuecomment-1222727933

Comment:
One test failed (23421 passed) only on the x86_64-musl instance. From the test's name it's due to that container having non-english locale.

edit: I see now that the glibc build starts with
```
Generating GNU libc locales...
  C.UTF-8... done.
  en_US.UTF-8... done.
glibc-locales: configuring ...
glibc-locales: configured successfully.
```
which is obviously missing in musl build.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Closed]: python3-dateparser: update to 1.1.1, patch breakage on python3-regex
  2022-08-22 17:28 [PR PATCH] python3-dateparser: update to 1.1.1, patch breakage on python3-regex icp1994
  2022-08-22 18:00 ` icp1994
  2022-08-22 19:07 ` icp1994
@ 2022-09-06  9:19 ` sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2022-09-06  9:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

There's a closed pull request on the void-packages repository

python3-dateparser: update to 1.1.1, patch breakage on python3-regex
https://github.com/void-linux/void-packages/pull/38833

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

Note that the breakage is not caused by updating the package rather due to an API change introduced in [`python3-regex-2022.3.15`](https://github.com/scrapinghub/dateparser/issues/1045#issuecomment-1069484011). Upstream mitigates this by pinning to an older version of that regex library in their setup.py but that doesn't work for [distro packages](https://github.com/scrapinghub/dateparser/issues/1052#issuecomment-1136438340). This patch is deemed sufficient by one of the [dateparser authors](https://github.com/scrapinghub/dateparser/issues/1052#issuecomment-1131559215) as a temporary fix till they make a new release with a proper fix.

Only one package, `Komikku-0.40.0` depends on this currently.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-06  9:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22 17:28 [PR PATCH] python3-dateparser: update to 1.1.1, patch breakage on python3-regex icp1994
2022-08-22 18:00 ` icp1994
2022-08-22 19:07 ` icp1994
2022-09-06  9:19 ` [PR PATCH] [Closed]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).