Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-croniter for openSUSE:Factory
checked in at 2023-09-01 14:19:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-croniter (Old)
and /work/SRC/openSUSE:Factory/.python-croniter.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-croniter"
Fri Sep 1 14:19:24 2023 rev:26 rq:1108278 version:1.4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-croniter/python-croniter.changes
2023-06-26 18:16:57.578701143 +0200
+++
/work/SRC/openSUSE:Factory/.python-croniter.new.1766/python-croniter.changes
2023-09-01 14:19:52.365649485 +0200
@@ -1,0 +2,12 @@
+Thu Aug 31 12:04:22 UTC 2023 - Steve Kowalik <[email protected]>
+
+- Update to 1.4.1:
+ * Make a retrocompatible version of 1.4.0 change about supporting
+ VIXIECRON bug.
+ * Added "implement_cron_bug" flag to make the cron parser compatible
+ with a bug in Vixie/ISC Cron.
+- Switch to pyproject macros.
+- Actually drop future requirement.
+- Stop using greedy globs in %files.
+
+-------------------------------------------------------------------
Old:
----
croniter-1.3.15.tar.gz
New:
----
croniter-1.4.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-croniter.spec ++++++
--- /var/tmp/diff_new_pack.sQHwNp/_old 2023-09-01 14:19:53.321683607 +0200
+++ /var/tmp/diff_new_pack.sQHwNp/_new 2023-09-01 14:19:53.325683750 +0200
@@ -18,18 +18,19 @@
%{?sle15_python_module_pythons}
Name: python-croniter
-Version: 1.3.15
+Version: 1.4.1
Release: 0
Summary: Python iterators for datetime objects with cron-like format
License: MIT
URL: https://github.com/kiorky/croniter
Source:
https://files.pythonhosted.org/packages/source/c/croniter/croniter-%{version}.tar.gz
-BuildRequires: %{python_module future}
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest >= 3.0.3}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tzlocal}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
@@ -44,10 +45,10 @@
%setup -q -n croniter-%{version}
%build
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@@ -56,6 +57,7 @@
%files %{python_files}
%license LICENSE
%doc README.rst
-%{python_sitelib}/*
+%{python_sitelib}/croniter
+%{python_sitelib}/croniter-%{version}.dist-info
%changelog
++++++ croniter-1.3.15.tar.gz -> croniter-1.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/croniter-1.3.15/CHANGELOG.rst
new/croniter-1.4.1/CHANGELOG.rst
--- old/croniter-1.3.15/CHANGELOG.rst 2023-05-25 15:56:30.000000000 +0200
+++ new/croniter-1.4.1/CHANGELOG.rst 2023-06-15 20:03:28.000000000 +0200
@@ -1,6 +1,21 @@
Changelog
==============
+1.4.1 (2023-06-15)
+------------------
+
+- Make a retrocompatible version of 1.4.0 change about supporting VIXIECRON
bug. (fix #47)
+ [kiorky]
+
+
+1.4.0 (2023-06-15)
+------------------
+
+- Added "implement_cron_bug" flag to make the cron parser compatible with a
bug in Vixie/ISC Cron
+ [kiorky, David White <[email protected]>]
+ *WARNING*: EXPAND METHOD CHANGES RETURN VALUE
+
+
1.3.15 (2023-05-25)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/croniter-1.3.15/PKG-INFO new/croniter-1.4.1/PKG-INFO
--- old/croniter-1.3.15/PKG-INFO 2023-05-25 15:56:30.939684200 +0200
+++ new/croniter-1.4.1/PKG-INFO 2023-06-15 20:03:28.799223000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: croniter
-Version: 1.3.15
+Version: 1.4.1
Summary: croniter provides iteration for datetime object with cron like format
Home-page: http://github.com/kiorky/croniter
Author: Matsumoto Taichi, kiorky
@@ -323,6 +323,21 @@
Changelog
==============
+1.4.1 (2023-06-15)
+------------------
+
+- Make a retrocompatible version of 1.4.0 change about supporting VIXIECRON
bug. (fix #47)
+ [kiorky]
+
+
+1.4.0 (2023-06-15)
+------------------
+
+- Added "implement_cron_bug" flag to make the cron parser compatible with a
bug in Vixie/ISC Cron
+ [kiorky, David White <[email protected]>]
+ *WARNING*: EXPAND METHOD CHANGES RETURN VALUE
+
+
1.3.15 (2023-05-25)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/croniter-1.3.15/setup.py new/croniter-1.4.1/setup.py
--- old/croniter-1.3.15/setup.py 2023-05-25 15:56:30.000000000 +0200
+++ new/croniter-1.4.1/setup.py 2023-06-15 20:03:28.000000000 +0200
@@ -24,7 +24,7 @@
setup(
name='croniter',
- version='1.3.15',
+ version='1.4.1',
py_modules=['croniter', ],
description=(
'croniter provides iteration for datetime '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/croniter-1.3.15/src/croniter/croniter.py
new/croniter-1.4.1/src/croniter/croniter.py
--- old/croniter-1.3.15/src/croniter/croniter.py 2023-05-25
15:56:30.000000000 +0200
+++ new/croniter-1.4.1/src/croniter/croniter.py 2023-06-15 20:03:28.000000000
+0200
@@ -40,10 +40,12 @@
(r'^(?P<pre>((?P<he>(({WEEKDAYS})(-({WEEKDAYS}))?)').format(WEEKDAYS=WEEKDAYS) +
(r'|(({MONTHS})(-({MONTHS}))?)|\w+)#)|l)(?P<last>\d+)$').format(MONTHS=MONTHS)
)
+re_star = re.compile('[*]')
hash_expression_re = re.compile(
r'^(?P<hash_type>h|r)(\((?P<range_begin>\d+)-(?P<range_end>\d+)\))?(\/(?P<divisor>\d+))?$'
)
VALID_LEN_EXPRESSION = [5, 6]
+EXPRESSIONS = {}
def timedelta_to_seconds(td):
@@ -151,9 +153,10 @@
def __init__(self, expr_format, start_time=None, ret_type=float,
day_or=True, max_years_between_matches=None, is_prev=False,
- hash_id=None):
+ hash_id=None, implement_cron_bug=False):
self._ret_type = ret_type
self._day_or = day_or
+ self._implement_cron_bug = implement_cron_bug
if hash_id:
if not isinstance(hash_id, (bytes, str)):
@@ -178,6 +181,7 @@
self.set_current(start_time, force=False)
self.expanded, self.nth_weekday_of_month = self.expand(expr_format,
hash_id=hash_id)
+ self.expressions = EXPRESSIONS[(expr_format, hash_id)]
self._is_prev = is_prev
@classmethod
@@ -254,19 +258,30 @@
"is acceptable.")
# exception to support day of month and day of week as defined in cron
+ dom_dow_exception_processed = False
if (expanded[2][0] != '*' and expanded[4][0] != '*') and self._day_or:
- bak = expanded[4]
- expanded[4] = ['*']
- t1 = self._calc(self.cur, expanded, nth_weekday_of_month, is_prev)
- expanded[4] = bak
- expanded[2] = ['*']
-
- t2 = self._calc(self.cur, expanded, nth_weekday_of_month, is_prev)
- if not is_prev:
- result = t1 if t1 < t2 else t2
+ # If requested, handle a bug in vixie cron/ISC cron where
day_of_month and day_of_week form
+ # an intersection (AND) instead of a union (OR) if either field is
an asterisk or starts with an asterisk
+ # (https://crontab.guru/cron-bug.html)
+ if self._implement_cron_bug and
(re_star.match(self.expressions[2]) or re_star.match(self.expressions[4])):
+ # To produce a schedule identical to the cron bug, we'll
bypass the code that
+ # makes a union of DOM and DOW, and instead skip to the code
that does an intersect instead
+ pass
else:
- result = t1 if t1 > t2 else t2
- else:
+ bak = expanded[4]
+ expanded[4] = ['*']
+ t1 = self._calc(self.cur, expanded, nth_weekday_of_month,
is_prev)
+ expanded[4] = bak
+ expanded[2] = ['*']
+
+ t2 = self._calc(self.cur, expanded, nth_weekday_of_month,
is_prev)
+ if not is_prev:
+ result = t1 if t1 < t2 else t2
+ else:
+ result = t1 if t1 > t2 else t2
+ dom_dow_exception_processed = True
+
+ if not dom_dow_exception_processed:
result = self._calc(self.cur, expanded,
nth_weekday_of_month, is_prev)
@@ -782,6 +797,7 @@
"day-of-week field does not support mixing literal values
and nth day of week syntax. "
"Cron: '{}' dow={} vs nth={}".format(expr_format,
dow_expanded_set, nth_weekday_of_month))
+ EXPRESSIONS[(expr_format, hash_id)] = expressions
return expanded, nth_weekday_of_month
@classmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/croniter-1.3.15/src/croniter/tests/test_croniter.py
new/croniter-1.4.1/src/croniter/tests/test_croniter.py
--- old/croniter-1.3.15/src/croniter/tests/test_croniter.py 2023-05-25
15:56:30.000000000 +0200
+++ new/croniter-1.4.1/src/croniter/tests/test_croniter.py 2023-06-15
20:03:28.000000000 +0200
@@ -202,6 +202,23 @@
self.assertEqual(n3.day, 1)
self.assertEqual(n3.year, 2010)
+ def testDomDowVixieCronBug(self):
+ expr = '0 16 */2 * sat'
+
+ # UNION OF "every odd-numbered day" and "every Saturday"
+ itr = croniter(expr, start_time=datetime(2023, 5, 2),
ret_type=datetime)
+ self.assertEqual(itr.get_next(), datetime(2023, 5, 3, 16, 0, 0)) #
Wed May 3 2023
+ self.assertEqual(itr.get_next(), datetime(2023, 5, 5, 16, 0, 0)) #
Fri May 5 2023
+ self.assertEqual(itr.get_next(), datetime(2023, 5, 6, 16, 0, 0)) #
Sat May 6 2023
+ self.assertEqual(itr.get_next(), datetime(2023, 5, 7, 16, 0, 0)) #
Sun May 7 2023
+
+ # INTERSECTION OF "every odd-numbered day" and "every Saturday"
+ itr = croniter(expr, start_time=datetime(2023, 5, 2),
ret_type=datetime, implement_cron_bug=True)
+ self.assertEqual(itr.get_next(), datetime(2023, 5, 13, 16, 0, 0)) #
Sat May 13 2023
+ self.assertEqual(itr.get_next(), datetime(2023, 5, 27, 16, 0, 0)) #
Sat May 27 2023
+ self.assertEqual(itr.get_next(), datetime(2023, 6, 3, 16, 0, 0)) #
Sat June 3 2023
+ self.assertEqual(itr.get_next(), datetime(2023, 6, 17, 16, 0, 0)) #
Sun June 17 2023
+
def testMonth(self):
base = datetime(2010, 1, 25)
itr = croniter('0 0 1 * *', base)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/croniter-1.3.15/src/croniter.egg-info/PKG-INFO
new/croniter-1.4.1/src/croniter.egg-info/PKG-INFO
--- old/croniter-1.3.15/src/croniter.egg-info/PKG-INFO 2023-05-25
15:56:30.000000000 +0200
+++ new/croniter-1.4.1/src/croniter.egg-info/PKG-INFO 2023-06-15
20:03:28.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: croniter
-Version: 1.3.15
+Version: 1.4.1
Summary: croniter provides iteration for datetime object with cron like format
Home-page: http://github.com/kiorky/croniter
Author: Matsumoto Taichi, kiorky
@@ -323,6 +323,21 @@
Changelog
==============
+1.4.1 (2023-06-15)
+------------------
+
+- Make a retrocompatible version of 1.4.0 change about supporting VIXIECRON
bug. (fix #47)
+ [kiorky]
+
+
+1.4.0 (2023-06-15)
+------------------
+
+- Added "implement_cron_bug" flag to make the cron parser compatible with a
bug in Vixie/ISC Cron
+ [kiorky, David White <[email protected]>]
+ *WARNING*: EXPAND METHOD CHANGES RETURN VALUE
+
+
1.3.15 (2023-05-25)
-------------------