17
0

Accepting request 1046277 from devel:languages:python

- update to 1.1.5:
  * Parse short versions of day, month, and year
  * Add a test for “in 1d”
  * Update languages_info
  * Add a workaround for zipimporter not having exec_module before Python
    3.10
  * Stabilize tests at midnight
  * Add a test case for French
  * Improved support for languages such as Slovak, Indonesian, Hindi, German
    and Japanese
  * Recursively create a model home
  * Replace regex sub with simple string replace
  * Add Python 3.10, 3.11 support
  * Drop support for Python 3.5, 3.6 versions
- drop incompatible-regex-pattern.patch (upstream)

OBS-URL: https://build.opensuse.org/request/show/1046277
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-dateparser?expand=0&rev=12
This commit is contained in:
2023-01-04 16:50:46 +00:00
committed by Git OBS Bridge
5 changed files with 24 additions and 23 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ae7a7de30f26983d09fff802c1f9d35d54e1c11d7ab52ae904a1f3fc037ecba5
size 293781

3
dateparser-1.1.5.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:107f3cc87a60770e10d111349adc1504224a6b60753a47a64b0ec842ab85b5a9
size 295364

View File

@@ -1,15 +0,0 @@
---
dateparser/languages/locale.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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

View File

@@ -1,3 +1,22 @@
-------------------------------------------------------------------
Mon Jan 2 18:57:33 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 1.1.5:
* Parse short versions of day, month, and year
* Add a test for “in 1d”
* Update languages_info
* Add a workaround for zipimporter not having exec_module before Python
3.10
* Stabilize tests at midnight
* Add a test case for French
* Improved support for languages such as Slovak, Indonesian, Hindi, German
and Japanese
* Recursively create a model home
* Replace regex sub with simple string replace
* Add Python 3.10, 3.11 support
* Drop support for Python 3.5, 3.6 versions
- drop incompatible-regex-pattern.patch (upstream)
-------------------------------------------------------------------
Mon Nov 7 21:15:24 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-dateparser
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,15 +19,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-dateparser
Version: 1.1.3
Version: 1.1.5
Release: 0
Summary: Date parsing library designed to parse dates from HTML pages
License: BSD-3-Clause
URL: https://github.com/scrapinghub/dateparser
Source: https://files.pythonhosted.org/packages/source/d/dateparser/dateparser-%{version}.tar.gz
# PATCH-FIX-UPSTREAM incompatible-regex-pattern.patch gh#scrapinghub/dateparser#1052 mcepl@suse.com
# use pattern compatible with the modern version of regex
Patch0: incompatible-regex-pattern.patch
# PATCH-FIX-UPSTREAM mark-network-tests.patch gh#scrapinghub/dateparser#1059 mcepl@suse.com
# mark test requiring network access
Patch1: mark-network-tests.patch