Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| de237c2eb2 | |||
| 80f1b7a186 | |||
| 845659ebb4 | |||
| 8daedb198b |
BIN
dateparser-1.2.0.tar.gz
LFS
Normal file
BIN
dateparser-1.2.0.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:986316f17cb8cdc23ea8ce563027c5ef12fc725b6fb1d137c14ca08777c5ecf7
|
|
||||||
size 329840
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
Index: dateparser-1.2.2/tests/test_search.py
|
|
||||||
===================================================================
|
|
||||||
--- dateparser-1.2.2.orig/tests/test_search.py
|
|
||||||
+++ dateparser-1.2.2/tests/test_search.py
|
|
||||||
@@ -1099,7 +1099,7 @@ class TestTranslateSearch(BaseTestCase):
|
|
||||||
languages=["ru"],
|
|
||||||
)
|
|
||||||
expected = [
|
|
||||||
- ("12 января", datetime.datetime(2025, 1, 12, 0, 0), "ru"),
|
|
||||||
- ("30 апреля", datetime.datetime(2025, 4, 30, 0, 0), "ru"),
|
|
||||||
+ ("12 января", datetime.datetime(today.year, 1, 12, 0, 0), "ru"),
|
|
||||||
+ ("30 апреля", datetime.datetime(today.year, 4, 30, 0, 0), "ru"),
|
|
||||||
]
|
|
||||||
assert result == expected
|
|
||||||
@@ -2,19 +2,16 @@
|
|||||||
tests/test_language_detect.py | 6 +++++-
|
tests/test_language_detect.py | 6 +++++-
|
||||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
Index: dateparser-1.2.2/tests/test_language_detect.py
|
Index: dateparser-1.2.0/tests/test_language_detect.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- dateparser-1.2.2.orig/tests/test_language_detect.py
|
--- dateparser-1.2.0.orig/tests/test_language_detect.py
|
||||||
+++ dateparser-1.2.2/tests/test_language_detect.py
|
+++ dateparser-1.2.0/tests/test_language_detect.py
|
||||||
@@ -2,6 +2,7 @@ import pytest
|
@@ -1,3 +1,4 @@
|
||||||
|
|
||||||
pytest.importorskip("fasttext")
|
|
||||||
|
|
||||||
+import os
|
+import os
|
||||||
import unittest
|
import unittest
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
@@ -21,6 +22,7 @@ from dateparser.search import search_dat
|
@@ -17,6 +18,7 @@ from dateparser.search import search_dat
|
||||||
detect_languages = Mock()
|
detect_languages = Mock()
|
||||||
detect_languages.return_value = ["en"]
|
detect_languages.return_value = ["en"]
|
||||||
|
|
||||||
@@ -22,7 +19,7 @@ Index: dateparser-1.2.2/tests/test_language_detect.py
|
|||||||
|
|
||||||
class CustomLangDetectParserTest(unittest.TestCase):
|
class CustomLangDetectParserTest(unittest.TestCase):
|
||||||
def check_is_returned_list(self):
|
def check_is_returned_list(self):
|
||||||
@@ -32,6 +34,7 @@ class CustomLangDetectParserTest(unittes
|
@@ -28,6 +30,7 @@ class CustomLangDetectParserTest(unittes
|
||||||
param(dt_string="26 July 2021", confidence_threshold=0.0),
|
param(dt_string="26 July 2021", confidence_threshold=0.0),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,22 +1,3 @@
|
|||||||
-------------------------------------------------------------------
|
|
||||||
Fri Jan 2 12:55:05 UTC 2026 - Markéta Machová <mmachova@suse.com>
|
|
||||||
|
|
||||||
- Add happy-new-year.patch, sent upstream (boo#1255836)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
Mon Sep 15 11:38:15 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
|
||||||
|
|
||||||
- Update to 1.2.2
|
|
||||||
* Fix PytzUsageWarning
|
|
||||||
* Avoid repeated loop over timezones
|
|
||||||
* Migrate from hijri-converter to hijridate
|
|
||||||
* Set minimum versions for dependencies
|
|
||||||
* Limited numpy to 1.x when installing dateparser[fasttext]
|
|
||||||
* Handle the Russian preposition “с”
|
|
||||||
* Fix weekday search
|
|
||||||
* Add Python 3.14 support
|
|
||||||
* Cache timezone offsets to improve import time
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 14 12:44:20 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
Thu Aug 14 12:44:20 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-dateparser
|
# spec file for package python-dateparser
|
||||||
#
|
#
|
||||||
# Copyright (c) 2026 SUSE LLC and contributors
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
%endif
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-dateparser
|
Name: python-dateparser
|
||||||
Version: 1.2.2
|
Version: 1.2.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Date parsing library designed to parse dates from HTML pages
|
Summary: Date parsing library designed to parse dates from HTML pages
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
@@ -32,17 +32,15 @@ Source: https://files.pythonhosted.org/packages/source/d/dateparser/date
|
|||||||
# PATCH-FIX-UPSTREAM mark-network-tests.patch gh#scrapinghub/dateparser#1059 mcepl@suse.com
|
# PATCH-FIX-UPSTREAM mark-network-tests.patch gh#scrapinghub/dateparser#1059 mcepl@suse.com
|
||||||
# mark test requiring network access
|
# mark test requiring network access
|
||||||
Patch1: mark-network-tests.patch
|
Patch1: mark-network-tests.patch
|
||||||
# PATCH-FIX-UPSTREAM https://github.com/scrapinghub/dateparser/pull/1294 use current year in test_search_dates_with_prepositions
|
|
||||||
Patch2: happy-new-year.patch
|
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-python-dateutil >= 2.7.0
|
Requires: python-python-dateutil
|
||||||
Requires: python-pytz >= 2024.2
|
Requires: python-pytz
|
||||||
Requires: python-regex >= 2024.9.11
|
Requires: python-regex
|
||||||
Requires: python-tzlocal >= 0.2
|
Requires: python-tzlocal
|
||||||
Recommends: python-convertdate
|
Recommends: convertdate
|
||||||
Recommends: python-fasttext
|
Recommends: python-fasttext
|
||||||
Recommends: python-langdetect
|
Recommends: python-langdetect
|
||||||
Recommends: python-ruamel.yaml
|
Recommends: python-ruamel.yaml
|
||||||
@@ -60,11 +58,11 @@ BuildRequires: %{python_module fasttext}
|
|||||||
BuildRequires: %{python_module langdetect}
|
BuildRequires: %{python_module langdetect}
|
||||||
BuildRequires: %{python_module parameterized}
|
BuildRequires: %{python_module parameterized}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module python-dateutil >= 2.7.0}
|
BuildRequires: %{python_module python-dateutil}
|
||||||
BuildRequires: %{python_module pytz >= 2024.2}
|
BuildRequires: %{python_module pytz}
|
||||||
BuildRequires: %{python_module regex >= 2024.9.11}
|
BuildRequires: %{python_module regex}
|
||||||
BuildRequires: %{python_module ruamel.yaml}
|
BuildRequires: %{python_module ruamel.yaml}
|
||||||
BuildRequires: %{python_module tzlocal >= 0.2}
|
BuildRequires: %{python_module tzlocal}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@@ -93,6 +91,8 @@ sed -i '1{/\/usr\/bin\/env python/d;}' \
|
|||||||
export NO_NETWORK=1
|
export NO_NETWORK=1
|
||||||
# Requires files not shipped in PyPI sdist
|
# Requires files not shipped in PyPI sdist
|
||||||
ignoretestfiles="--ignore tests/test_dateparser_data_integrity.py"
|
ignoretestfiles="--ignore tests/test_dateparser_data_integrity.py"
|
||||||
|
# https://github.com/scrapinghub/dateparser/issues/1053
|
||||||
|
ignoretestfiles="$ignoretestfiles --ignore tests/test_search.py"
|
||||||
# overflow on 32bit
|
# overflow on 32bit
|
||||||
donttest="(not test_timezone_offset_calculation)"
|
donttest="(not test_timezone_offset_calculation)"
|
||||||
%pytest -k "$donttest" $ignoretestfiles
|
%pytest -k "$donttest" $ignoretestfiles
|
||||||
|
|||||||
Reference in New Issue
Block a user