15
0

Accepting request 1135449 from devel:languages:python

- update to 1.2.0:
  * New ``PREFER_MONTH_OF_YEAR`` setting (#1146)
  * Absolute years in Russian are no longer being treated as a
    number of years in the past (#1129)
  * Cleanups and internal improvements:
  * Removed the use of ``datetime.utcnow``, deprecated on Python
    3.12 (#1179)
  * Applied Black formatting to the code base (#1158)
  * Initial integration with OSSFuzz (#1198)
  * Extended test cases (#1191)

- Update to 1.1.3
- Update to 1.1.2
  * Implement a PARSERS setting
  * Add support for `PREFER_DATES_FROM` in relative/freshness parser
  * Add support for `PREFER_DAY_OF_MONTH` in base-formats parser
  * Added UTC -00:00 as a valid offset
  * Fix support for “one”
  * Fix tokenizer for non recognized characters
  * Prevent installing regex 2019.02.19

OBS-URL: https://build.opensuse.org/request/show/1135449
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-dateparser?expand=0&rev=19
This commit is contained in:
2023-12-28 21:55:16 +00:00
committed by Git OBS Bridge
5 changed files with 41 additions and 29 deletions

Binary file not shown.

BIN
dateparser-1.2.0.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -2,19 +2,16 @@
tests/test_language_detect.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/tests/test_language_detect.py
+++ b/tests/test_language_detect.py
@@ -1,6 +1,8 @@
Index: dateparser-1.2.0/tests/test_language_detect.py
===================================================================
--- dateparser-1.2.0.orig/tests/test_language_detect.py
+++ dateparser-1.2.0/tests/test_language_detect.py
@@ -1,3 +1,4 @@
+import os
+import unittest
+
import unittest
from datetime import datetime
from unittest.mock import Mock
-import unittest
from parameterized import parameterized, param
@@ -13,6 +15,7 @@ from dateparser.search import search_dat
@@ -17,6 +18,7 @@ from dateparser.search import search_dat
detect_languages = Mock()
detect_languages.return_value = ["en"]
@@ -22,10 +19,10 @@
class CustomLangDetectParserTest(unittest.TestCase):
def check_is_returned_list(self):
@@ -22,6 +25,7 @@ class CustomLangDetectParserTest(unittes
param(dt_string="14 June 2020", confidence_threshold=0.0),
param(dt_string="26 July 2021", confidence_threshold=0.0)
])
@@ -28,6 +30,7 @@ class CustomLangDetectParserTest(unittes
param(dt_string="26 July 2021", confidence_threshold=0.0),
]
)
+ @unittest.skipIf(NO_NETWORK, "Test requires network access")
def test_custom_language_detect_fast_text(self, dt_string, confidence_threshold):
self.result = fast_text_detect_languages(dt_string, confidence_threshold)

View File

@@ -1,3 +1,17 @@
-------------------------------------------------------------------
Thu Dec 7 20:46:37 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 1.2.0:
* New ``PREFER_MONTH_OF_YEAR`` setting (#1146)
* Absolute years in Russian are no longer being treated as a
number of years in the past (#1129)
* Cleanups and internal improvements:
* Removed the use of ``datetime.utcnow``, deprecated on Python
3.12 (#1179)
* Applied Black formatting to the code base (#1158)
* Initial integration with OSSFuzz (#1198)
* Extended test cases (#1191)
-------------------------------------------------------------------
Sat Oct 14 00:54:16 UTC 2023 - Matej Cepl <mcepl@cepl.eu>
@@ -63,7 +77,7 @@ Mon Jan 2 18:57:33 UTC 2023 - Dirk Müller <dmueller@suse.com>
-------------------------------------------------------------------
Mon Nov 7 21:15:24 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to 1.1.3
- Update to 1.1.3
New features:
* Add support for fractional units (#876)
Improvements:
@@ -78,7 +92,7 @@ Mon Nov 7 21:15:24 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
-------------------------------------------------------------------
Thu Oct 27 22:51:58 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to 1.1.2
- Update to 1.1.2
* Added support for negative timestamp (#1060)
* Fixed PytzUsageWarning for Python versions >= 3.6 (#1062)
* Added support for dates with dots and spaces (#1028)
@@ -188,13 +202,13 @@ Thu Apr 2 09:44:00 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- update to version 0.7.4
* Fixed Python 2.7 tests
* Extended Norwegian support
* Implement a PARSERS setting
* Add support for `PREFER_DATES_FROM` in relative/freshness parser
* Add support for `PREFER_DAY_OF_MONTH` in base-formats parser
* Added UTC -00:00 as a valid offset
* Fix support for “one”
* Fix tokenizer for non recognized characters
* Prevent installing regex 2019.02.19
* Implement a PARSERS setting
* Add support for `PREFER_DATES_FROM` in relative/freshness parser
* Add support for `PREFER_DAY_OF_MONTH` in base-formats parser
* Added UTC -00:00 as a valid offset
* Fix support for “one”
* Fix tokenizer for non recognized characters
* Prevent installing regex 2019.02.19
* Added Hungarian language.
* Added setting, `STRICT_PARSING` to ignore incomplete dates.
* More simplifications for Russian and Ukrainian languages.

View File

@@ -16,10 +16,9 @@
#
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-dateparser
Version: 1.1.8
Version: 1.2.0
Release: 0
Summary: Date parsing library designed to parse dates from HTML pages
License: BSD-3-Clause
@@ -84,7 +83,9 @@ export NO_NETWORK=1
ignoretestfiles="--ignore tests/test_dateparser_data_integrity.py"
# https://github.com/scrapinghub/dateparser/issues/1053
ignoretestfiles="$ignoretestfiles --ignore tests/test_search.py"
%pytest $ignoretestfiles
# overflow on 32bit
donttest="(not test_timezone_offset_calculation)"
%pytest -k "$donttest" $ignoretestfiles
%post
%python_install_alternative dateparser-download