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-05-03 12:57:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-croniter (Old) and /work/SRC/openSUSE:Factory/.python-croniter.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-croniter" Wed May 3 12:57:50 2023 rev:23 rq:1084215 version:1.3.14 Changes: -------- --- /work/SRC/openSUSE:Factory/python-croniter/python-croniter.changes 2022-10-14 15:42:17.923894297 +0200 +++ /work/SRC/openSUSE:Factory/.python-croniter.new.1533/python-croniter.changes 2023-05-03 12:57:53.568049490 +0200 @@ -1,0 +2,11 @@ +Wed May 3 08:42:57 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 1.3.14: + * Add check for range begin/end + * restore py2 compat + * Do not expose `i` into global namespace + * Fix DOW hash parsing [kiorky] + * better error handling on py3 [kiorky] + * Add Python 3.11 support and move docs files to main folder + +------------------------------------------------------------------- Old: ---- croniter-1.3.7.tar.gz New: ---- croniter-1.3.14.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-croniter.spec ++++++ --- /var/tmp/diff_new_pack.psfJnG/_old 2023-05-03 12:57:54.036052240 +0200 +++ /var/tmp/diff_new_pack.psfJnG/_new 2023-05-03 12:57:54.040052263 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-croniter # -# 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 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-croniter -Version: 1.3.7 +Version: 1.3.14 Release: 0 Summary: Python iterators for datetime objects with cron-like format License: MIT @@ -54,7 +54,7 @@ %pytest src %files %{python_files} -%license docs/LICENSE +%license LICENSE %doc README.rst %{python_sitelib}/* ++++++ croniter-1.3.7.tar.gz -> croniter-1.3.14.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/CHANGELOG.rst new/croniter-1.3.14/CHANGELOG.rst --- old/croniter-1.3.7/CHANGELOG.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/croniter-1.3.14/CHANGELOG.rst 2023-04-12 18:06:44.000000000 +0200 @@ -0,0 +1,454 @@ +Changelog +============== + +1.3.14 (2023-04-12) +------------------- + +- Lint + + +1.3.13 (2023-04-12) +------------------- + +- Add check for range begin/end + + + +1.3.12 (2023-04-12) +------------------- + +- restore py2 compat + + +1.3.11 (2023-04-12) +------------------- + +- Do not expose `i` into global namespace + + +1.3.10 (2023-04-07) +------------------- + +- Fix DOW hash parsing [kiorky] +- better error handling on py3 [kiorky] + +1.3.8 (2022-11-22) +------------------ + +- Add Python 3.11 support and move docs files to main folder [rafsaf] + + +1.3.7 (2022-09-06) +------------------ + +- fix tests +- Fix croniter_range infinite loop [Shachar Snapiri <ssnap...@paloaltonetworks.com>] + + +1.3.5 (2022-05-14) +------------------ + +- Add Python 3.10 support [eelkevdbos] + + +1.3.4 (2022-02-18) +------------------ + +- Really fix compat for tests under py27 + [kiorky] + + +1.3.3 (2022-02-18) +------------------ + +- Fix compat for tests under py27 + [kiorky] + + +1.3.2 (2022-02-18) +------------------ + +- Fix #12: regressions with set_current + [kiorky, agateblue] + + +1.3.1 (2022-02-15) +------------------ + +- Restore compat with python2 + [kiorky] + + +1.3.0 (2022-02-15) +------------------ + +- Add a way to make next() easier to use. This fixes #11 + [kiorky] + + +1.2.0 (2022-01-14) +------------------ + +- Enforce validation for day=1. Before this release we used to support day=0 and it was silently glided to day=1 to support having both day in day in 4th field when it came to have 6fields cron forms (second repeat). It will now raises a CroniterBadDateError. See https://github.com/kiorky/croniter/issues/6 + [kiorky] + +1.1.0 (2021-12-03) +------------------ + +- Enforce validation for month=1. Before this release we used to support month=0 and it was silently glided to month=1 to support having both day in month in 4th field when it came to have 6fields cron forms (second repeat). It will now raises a CroniterBadDateError. See https://github.com/kiorky/croniter/issues/6 + [kiorky] + +1.0.15 (2021-06-25) +------------------- + +- restore py2 [kiorky] + + +1.0.14 (2021-06-25) +------------------- + +- better type checks [kiorky] + + +1.0.13 (2021-05-06) +------------------- + +- Fix ZeroDivisionError with ``* * R/0 * *`` + [cuu508] + +1.0.12 (2021-04-13) +------------------- + +- Add support for hashed/random/keyword expressions + Ryan Finnie (rfinnie) +- Review support support for hashed/random/keyword expression and add expanders reactor + [ kiorky ] + + +1.0.11 (2021-04-07) +------------------- + +- fix bug: bad case:``0 6 30 3 *`` + [zed2015(zhangchi)] +- Add support for ``L`` in the day_of_week component. This enable expressions like ``* * * * L4``, which means last Thursday of the month. This resolves #159. + [Kintyre] +- Create ``CroniterUnsupportedSyntaxError`` exception for situations where CRON syntax may be valid but some combinations of features is not supported. + Currently, this is used when the ``day_of_week`` component has a combination of literal values and nth/last syntax at the same time. + For example, ``0 0 * * 1,L6`` or ``0 0 * * 15,sat#1`` will both raise this exception because of mixing literal days of the week with nth-weekday or last-weekday syntax. + This *may* impact existing cron expressions in prior releases, because ``0 0 * * 15,sat#1`` was previously allowed but incorrectly handled. + [Kintyre] + +- Update ``croniter_range()`` to allow an alternate ``croniter`` class to be used. Helpful when using a custom class derived from croniter. + [Kintyre] + + +1.0.10 (2021-03-25) +------------------- + +- Remove external library ``natsort``. + Sorting of cron expression components now handled with ``sorted()`` with a custom ``key`` function. + [Kintyre] + + + +1.0.9 (2021-03-23) +------------------ + +- Remove futures dependency + [kiorky] + + +1.0.8 (2021-03-06) +------------------ + +- Update `_expand` to lowercase each component of the expression. + This is in relation to #157. With this change, croniter accepts and correctly handles `* * 10-L * *`. + [cuu508] + + +1.0.7 (2021-03-02) +------------------ + +- Fix _expand to reject int literals with underscores + [cuu508] +- Remove a debug statement to make flake8 happy + [cuu508] + +1.0.6 (2021-02-01) +------------------ + +- Fix combination of star and invalid expression bugs + [kiorky] + + +1.0.5 (2021-01-29) +------------------ + +- Security fix: fix overflow when using cron ranges + [kiorky] + +1.0.4 (2021-01-29) +------------------ + +- Spelling fix release + + +1.0.3 (2021-01-29) +------------------ + +- Fix #155: raise CroniterBadCronError when error syntax + [kiorky] + + +1.0.2 (2021-01-19) +------------------ + +- Fix match when datetime has microseconds + [kiorky] + +1.0.1 (2021-01-06) +------------------ +- no changes, just to make sense with new semver2 (making croniter on a stable state) + [kiorky] + + +0.3.37 (2020-12-31) +------------------- + +- Added Python 3.8 and 3.9 support + [eumiro] + + +0.3.36 (2020-11-02) +------------------- + +- Updated docs section regarding ``max_years_between_matches`` to be more shorter and hopefully more relevant. + [Kintyre] +- Don't install tests + [scop] + + +0.3.35 (2020-10-11) +------------------- + +- Handle L in ranges. This fixes #142. + [kiorky] +- Add a new initialization parameter ``max_years_between_matches`` to support finding the next/previous date beyond the default 1 year window, if so desired. Updated README to include additional notes and example of this usage. Fixes #145. + [Kintyre] +- The ``croniter_range()`` function was updated to automatically determines the appropriate ``max_years_between_matches`` value, this preventing handling of the ``CroniterBadDateError`` exception. + [Kintyre] +- Updated exception handling classes: ``CroniterBadDateError`` now only + applies during date finding operations (next/prev), and all parsing errors can now be caught using ``CroniterBadCronError``. The ``CroniterNotAlphaError`` exception is now a subclass of ``CroniterBadCronError``. A brief description of each exception class was added as an inline docstring. + [Kintyre] +- Updated iterable interfaces to replace the ``CroniterBadDateError`` with ``StopIteration`` if (and only if) the ``max_years_between_matches`` argument is provided. The rationale here is that if the user has specified the max tolerance between matches, then there's no need to further inform them of no additional matches. Just stop the iteration. This also keeps backwards compatibility. + [Kintyre] +- Minor docs update + [Kintyre] + + +0.3.34 (2020-06-19) +------------------- + +- Feat ``croniter_range(start, stop, cron)`` + [Kintyre] +- Optimization for poorly written cron expression + [Kintyre] + +0.3.33 (2020-06-15) +------------------- + +- Make dateutil tz support more official + [Kintyre] +- Feat/support for day or + [ç°å£ä¿¡å ] + +0.3.32 (2020-05-27) +------------------- + +- document seconds repeats, fixes #122 + [kiorky] +- Implement match method, fixes #54 + [kiorky] +- Adding tests for #127 (test more DSTs and croniter behavior around) + [kiorky] +- Changed lag_hours comparison to absolute to manage dst boundary when getting previous + [Sokkka] + +0.3.31 (2020-01-02) +------------------- + +- Fix get_next() when start_time less then 1s before next instant + [AlexHill] + + +0.3.30 (2019-04-20) +------------------- + +- credits + + +0.3.29 (2019-03-26) +------------------- + +- credits +- history stripping (security) +- Handle -Sun notation, This fixes `#119 <https://github.com/taichino/croniter/issues/119>`_. + [kiorky] +- Handle invalid ranges correctly, This fixes `#114 <https://github.com/taichino/croniter/issues/114>`_. + [kiorky] + +0.3.25 (2018-08-07) +------------------- +- Pypi hygiene + [hugovk] + + +0.3.24 (2018-06-20) +------------------- +- fix `#107 <https://github.com/taichino/croniter/issues/107>`_: microsecond threshold + [kiorky] + + +0.3.23 (2018-05-23) +------------------- + +- fix ``get_next`` while preserving the fix of ``get_prev`` in 7661c2aaa + [Avikam Agur <avi...@pagaya-inv.com>] + + +0.3.22 (2018-05-16) +------------------- +- Don't count previous minute if now is dynamic + If the code is triggered from 5-asterisk based cron + ``get_prev`` based on ``datetime.now()`` is expected to return + current cron iteration and not previous execution. + [Igor Khrol <igor.kh...@toptal.com>] + +0.3.20 (2017-11-06) +------------------- + +- More DST fixes + [Kevin Rose <kbrose@github>] + + +0.3.19 (2017-08-31) +------------------- + +- fix #87: backward dst changes + [kiorky] + + +0.3.18 (2017-08-31) +------------------- + +- Add is valid method, refactor errors + [otherpirate, Mauro Murari <mauro_mur...@hotmail.com>] + + +0.3.17 (2017-05-22) +------------------- +- DOW occurrence sharp style support. + [kiorky, Kengo Seki <sek...@apache.org>] + + +0.3.16 (2017-03-15) +------------------- + +- Better test suite [mrcrilly@github] +- DST support [kiorky] + +0.3.15 (2017-02-16) +------------------- + +- fix bug around multiple conditions and range_val in + _get_prev_nearest_diff. + [abeja-yuki@github] + +0.3.14 (2017-01-25) +------------------- + +- issue #69: added day_or option to change behavior when day-of-month and + day-of-week is given + [Andreas Vogl <a.v...@hackner-security.com>] + + + +0.3.13 (2016-11-01) +------------------- + +- `Real fix for #34 <https://github.com/taichino/croniter/pull/73>`_ + [kiorky@github] +- `Modernize test infra <https://github.com/taichino/croniter/pull/72>`_ + [kiorky@github] +- `Release as a universal wheel <https://github.com/kiorky/croniter/pull/16>`_ + [adamchainz@github] +- `Raise ValueError on negative numbers <https://github.com/taichino/croniter/pull/63>`_ + [josegonzalez@github] +- `Compare types using "issubclass" instead of exact match <https://github.com/taichino/croniter/pull/70>`_ + [darkk@github] +- `Implement step cron with a variable base <https://github.com/taichino/croniter/pull/60>`_ + [josegonzalez@github] + +0.3.12 (2016-03-10) +------------------- +- support setting ret_type in __init__ [Brent Tubbs <brent.tu...@gmail.com>] + +0.3.11 (2016-01-13) +------------------- + +- Bug fix: The get_prev API crashed when last day of month token was used. Some + essential logic was missing. + [Iddo Aviram <iddo.avi...@similarweb.com>] + + +0.3.10 (2015-11-29) +------------------- + +- The functionality of 'l' as day of month was broken, since the month variable + was not properly updated + [Iddo Aviram <iddo.avi...@similarweb.com>] + +0.3.9 (2015-11-19) +------------------ + +- Don't use datetime functions python 2.6 doesn't support + [petervtzand] + +0.3.8 (2015-06-23) +------------------ +- Truncate microseconds by setting to 0 + [Corey Wright] + + +0.3.7 (2015-06-01) +------------------ + +- converting sun in range sun-thu transforms to int 0 which is + recognized as empty string; the solution was to convert sun to string "0" + +0.3.6 (2015-05-29) +------------------ + +- Fix default behavior when no start_time given + Default value for ``start_time`` parameter is calculated at module init time rather than call time. +- Fix timezone support and stop depending on the system time zone + + + +0.3.5 (2014-08-01) +------------------ + +- support for 'l' (last day of month) + + +0.3.4 (2014-01-30) +------------------ + +- Python 3 compat +- QA Release + + +0.3.3 (2012-09-29) +------------------ +- proper packaging + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/LICENSE new/croniter-1.3.14/LICENSE --- old/croniter-1.3.7/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/croniter-1.3.14/LICENSE 2023-04-12 18:06:44.000000000 +0200 @@ -0,0 +1,7 @@ +Copyright (C) 2010-2012 Matsumoto Taichi + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/PKG-INFO new/croniter-1.3.14/PKG-INFO --- old/croniter-1.3.7/PKG-INFO 2022-09-06 18:47:21.874700800 +0200 +++ new/croniter-1.3.14/PKG-INFO 2023-04-12 18:06:44.632668700 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: croniter -Version: 1.3.7 +Version: 1.3.14 Summary: croniter provides iteration for datetime object with cron like format Home-page: http://github.com/kiorky/croniter Author: Matsumoto Taichi, kiorky @@ -24,8 +24,10 @@ Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 Classifier: Topic :: Software Development :: Libraries :: Python Modules Requires-Python: >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* +License-File: LICENSE Introduction ============ @@ -46,10 +48,10 @@ Website: https://github.com/kiorky/croniter -Travis badge -============= -.. image:: https://travis-ci.org/kiorky/croniter.svg?branch=master - :target: https://travis-ci.org/kiorky/croniter +Build Badge +=========== +.. image:: https://github.com/kiorky/croniter/actions/workflows/cicd.yml/badge.svg + :target: https://github.com/kiorky/croniter/actions/workflows/cicd.yml Usage @@ -321,6 +323,43 @@ Changelog ============== +1.3.14 (2023-04-12) +------------------- + +- Lint + + +1.3.13 (2023-04-12) +------------------- + +- Add check for range begin/end + + + +1.3.12 (2023-04-12) +------------------- + +- restore py2 compat + + +1.3.11 (2023-04-12) +------------------- + +- Do not expose `i` into global namespace + + +1.3.10 (2023-04-07) +------------------- + +- Fix DOW hash parsing [kiorky] +- better error handling on py3 [kiorky] + +1.3.8 (2022-11-22) +------------------ + +- Add Python 3.11 support and move docs files to main folder [rafsaf] + + 1.3.7 (2022-09-06) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/README.rst new/croniter-1.3.14/README.rst --- old/croniter-1.3.7/README.rst 2022-09-06 18:47:21.000000000 +0200 +++ new/croniter-1.3.14/README.rst 2023-04-12 18:06:44.000000000 +0200 @@ -17,10 +17,10 @@ Website: https://github.com/kiorky/croniter -Travis badge -============= -.. image:: https://travis-ci.org/kiorky/croniter.svg?branch=master - :target: https://travis-ci.org/kiorky/croniter +Build Badge +=========== +.. image:: https://github.com/kiorky/croniter/actions/workflows/cicd.yml/badge.svg + :target: https://github.com/kiorky/croniter/actions/workflows/cicd.yml Usage diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/docs/CHANGES.rst new/croniter-1.3.14/docs/CHANGES.rst --- old/croniter-1.3.7/docs/CHANGES.rst 2022-09-06 18:47:21.000000000 +0200 +++ new/croniter-1.3.14/docs/CHANGES.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,417 +0,0 @@ -Changelog -============== - -1.3.7 (2022-09-06) ------------------- - -- fix tests -- Fix croniter_range infinite loop [Shachar Snapiri <ssnap...@paloaltonetworks.com>] - - -1.3.5 (2022-05-14) ------------------- - -- Add Python 3.10 support [eelkevdbos] - - -1.3.4 (2022-02-18) ------------------- - -- Really fix compat for tests under py27 - [kiorky] - - -1.3.3 (2022-02-18) ------------------- - -- Fix compat for tests under py27 - [kiorky] - - -1.3.2 (2022-02-18) ------------------- - -- Fix #12: regressions with set_current - [kiorky, agateblue] - - -1.3.1 (2022-02-15) ------------------- - -- Restore compat with python2 - [kiorky] - - -1.3.0 (2022-02-15) ------------------- - -- Add a way to make next() easier to use. This fixes #11 - [kiorky] - - -1.2.0 (2022-01-14) ------------------- - -- Enforce validation for day=1. Before this release we used to support day=0 and it was silently glided to day=1 to support having both day in day in 4th field when it came to have 6fields cron forms (second repeat). It will now raises a CroniterBadDateError. See https://github.com/kiorky/croniter/issues/6 - [kiorky] - -1.1.0 (2021-12-03) ------------------- - -- Enforce validation for month=1. Before this release we used to support month=0 and it was silently glided to month=1 to support having both day in month in 4th field when it came to have 6fields cron forms (second repeat). It will now raises a CroniterBadDateError. See https://github.com/kiorky/croniter/issues/6 - [kiorky] - -1.0.15 (2021-06-25) -------------------- - -- restore py2 [kiorky] - - -1.0.14 (2021-06-25) -------------------- - -- better type checks [kiorky] - - -1.0.13 (2021-05-06) -------------------- - -- Fix ZeroDivisionError with ``* * R/0 * *`` - [cuu508] - -1.0.12 (2021-04-13) -------------------- - -- Add support for hashed/random/keyword expressions - Ryan Finnie (rfinnie) -- Review support support for hashed/random/keyword expression and add expanders reactor - [ kiorky ] - - -1.0.11 (2021-04-07) -------------------- - -- fix bug: bad case:``0 6 30 3 *`` - [zed2015(zhangchi)] -- Add support for ``L`` in the day_of_week component. This enable expressions like ``* * * * L4``, which means last Thursday of the month. This resolves #159. - [Kintyre] -- Create ``CroniterUnsupportedSyntaxError`` exception for situations where CRON syntax may be valid but some combinations of features is not supported. - Currently, this is used when the ``day_of_week`` component has a combination of literal values and nth/last syntax at the same time. - For example, ``0 0 * * 1,L6`` or ``0 0 * * 15,sat#1`` will both raise this exception because of mixing literal days of the week with nth-weekday or last-weekday syntax. - This *may* impact existing cron expressions in prior releases, because ``0 0 * * 15,sat#1`` was previously allowed but incorrectly handled. - [Kintyre] - -- Update ``croniter_range()`` to allow an alternate ``croniter`` class to be used. Helpful when using a custom class derived from croniter. - [Kintyre] - - -1.0.10 (2021-03-25) -------------------- - -- Remove external library ``natsort``. - Sorting of cron expression components now handled with ``sorted()`` with a custom ``key`` function. - [Kintyre] - - - -1.0.9 (2021-03-23) ------------------- - -- Remove futures dependency - [kiorky] - - -1.0.8 (2021-03-06) ------------------- - -- Update `_expand` to lowercase each component of the expression. - This is in relation to #157. With this change, croniter accepts and correctly handles `* * 10-L * *`. - [cuu508] - - -1.0.7 (2021-03-02) ------------------- - -- Fix _expand to reject int literals with underscores - [cuu508] -- Remove a debug statement to make flake8 happy - [cuu508] - -1.0.6 (2021-02-01) ------------------- - -- Fix combination of star and invalid expression bugs - [kiorky] - - -1.0.5 (2021-01-29) ------------------- - -- Security fix: fix overflow when using cron ranges - [kiorky] - -1.0.4 (2021-01-29) ------------------- - -- Spelling fix release - - -1.0.3 (2021-01-29) ------------------- - -- Fix #155: raise CroniterBadCronError when error syntax - [kiorky] - - -1.0.2 (2021-01-19) ------------------- - -- Fix match when datetime has microseconds - [kiorky] - -1.0.1 (2021-01-06) ------------------- -- no changes, just to make sense with new semver2 (making croniter on a stable state) - [kiorky] - - -0.3.37 (2020-12-31) -------------------- - -- Added Python 3.8 and 3.9 support - [eumiro] - - -0.3.36 (2020-11-02) -------------------- - -- Updated docs section regarding ``max_years_between_matches`` to be more shorter and hopefully more relevant. - [Kintyre] -- Don't install tests - [scop] - - -0.3.35 (2020-10-11) -------------------- - -- Handle L in ranges. This fixes #142. - [kiorky] -- Add a new initialization parameter ``max_years_between_matches`` to support finding the next/previous date beyond the default 1 year window, if so desired. Updated README to include additional notes and example of this usage. Fixes #145. - [Kintyre] -- The ``croniter_range()`` function was updated to automatically determines the appropriate ``max_years_between_matches`` value, this preventing handling of the ``CroniterBadDateError`` exception. - [Kintyre] -- Updated exception handling classes: ``CroniterBadDateError`` now only - applies during date finding operations (next/prev), and all parsing errors can now be caught using ``CroniterBadCronError``. The ``CroniterNotAlphaError`` exception is now a subclass of ``CroniterBadCronError``. A brief description of each exception class was added as an inline docstring. - [Kintyre] -- Updated iterable interfaces to replace the ``CroniterBadDateError`` with ``StopIteration`` if (and only if) the ``max_years_between_matches`` argument is provided. The rationale here is that if the user has specified the max tolerance between matches, then there's no need to further inform them of no additional matches. Just stop the iteration. This also keeps backwards compatibility. - [Kintyre] -- Minor docs update - [Kintyre] - - -0.3.34 (2020-06-19) -------------------- - -- Feat ``croniter_range(start, stop, cron)`` - [Kintyre] -- Optimization for poorly written cron expression - [Kintyre] - -0.3.33 (2020-06-15) -------------------- - -- Make dateutil tz support more official - [Kintyre] -- Feat/support for day or - [ç°å£ä¿¡å ] - -0.3.32 (2020-05-27) -------------------- - -- document seconds repeats, fixes #122 - [kiorky] -- Implement match method, fixes #54 - [kiorky] -- Adding tests for #127 (test more DSTs and croniter behavior around) - [kiorky] -- Changed lag_hours comparison to absolute to manage dst boundary when getting previous - [Sokkka] - -0.3.31 (2020-01-02) -------------------- - -- Fix get_next() when start_time less then 1s before next instant - [AlexHill] - - -0.3.30 (2019-04-20) -------------------- - -- credits - - -0.3.29 (2019-03-26) -------------------- - -- credits -- history stripping (security) -- Handle -Sun notation, This fixes `#119 <https://github.com/taichino/croniter/issues/119>`_. - [kiorky] -- Handle invalid ranges correctly, This fixes `#114 <https://github.com/taichino/croniter/issues/114>`_. - [kiorky] - -0.3.25 (2018-08-07) -------------------- -- Pypi hygiene - [hugovk] - - -0.3.24 (2018-06-20) -------------------- -- fix `#107 <https://github.com/taichino/croniter/issues/107>`_: microsecond threshold - [kiorky] - - -0.3.23 (2018-05-23) -------------------- - -- fix ``get_next`` while preserving the fix of ``get_prev`` in 7661c2aaa - [Avikam Agur <avi...@pagaya-inv.com>] - - -0.3.22 (2018-05-16) -------------------- -- Don't count previous minute if now is dynamic - If the code is triggered from 5-asterisk based cron - ``get_prev`` based on ``datetime.now()`` is expected to return - current cron iteration and not previous execution. - [Igor Khrol <igor.kh...@toptal.com>] - -0.3.20 (2017-11-06) -------------------- - -- More DST fixes - [Kevin Rose <kbrose@github>] - - -0.3.19 (2017-08-31) -------------------- - -- fix #87: backward dst changes - [kiorky] - - -0.3.18 (2017-08-31) -------------------- - -- Add is valid method, refactor errors - [otherpirate, Mauro Murari <mauro_mur...@hotmail.com>] - - -0.3.17 (2017-05-22) -------------------- -- DOW occurrence sharp style support. - [kiorky, Kengo Seki <sek...@apache.org>] - - -0.3.16 (2017-03-15) -------------------- - -- Better test suite [mrcrilly@github] -- DST support [kiorky] - -0.3.15 (2017-02-16) -------------------- - -- fix bug around multiple conditions and range_val in - _get_prev_nearest_diff. - [abeja-yuki@github] - -0.3.14 (2017-01-25) -------------------- - -- issue #69: added day_or option to change behavior when day-of-month and - day-of-week is given - [Andreas Vogl <a.v...@hackner-security.com>] - - - -0.3.13 (2016-11-01) -------------------- - -- `Real fix for #34 <https://github.com/taichino/croniter/pull/73>`_ - [kiorky@github] -- `Modernize test infra <https://github.com/taichino/croniter/pull/72>`_ - [kiorky@github] -- `Release as a universal wheel <https://github.com/kiorky/croniter/pull/16>`_ - [adamchainz@github] -- `Raise ValueError on negative numbers <https://github.com/taichino/croniter/pull/63>`_ - [josegonzalez@github] -- `Compare types using "issubclass" instead of exact match <https://github.com/taichino/croniter/pull/70>`_ - [darkk@github] -- `Implement step cron with a variable base <https://github.com/taichino/croniter/pull/60>`_ - [josegonzalez@github] - -0.3.12 (2016-03-10) -------------------- -- support setting ret_type in __init__ [Brent Tubbs <brent.tu...@gmail.com>] - -0.3.11 (2016-01-13) -------------------- - -- Bug fix: The get_prev API crashed when last day of month token was used. Some - essential logic was missing. - [Iddo Aviram <iddo.avi...@similarweb.com>] - - -0.3.10 (2015-11-29) -------------------- - -- The functionality of 'l' as day of month was broken, since the month variable - was not properly updated - [Iddo Aviram <iddo.avi...@similarweb.com>] - -0.3.9 (2015-11-19) ------------------- - -- Don't use datetime functions python 2.6 doesn't support - [petervtzand] - -0.3.8 (2015-06-23) ------------------- -- Truncate microseconds by setting to 0 - [Corey Wright] - - -0.3.7 (2015-06-01) ------------------- - -- converting sun in range sun-thu transforms to int 0 which is - recognized as empty string; the solution was to convert sun to string "0" - -0.3.6 (2015-05-29) ------------------- - -- Fix default behavior when no start_time given - Default value for ``start_time`` parameter is calculated at module init time rather than call time. -- Fix timezone support and stop depending on the system time zone - - - -0.3.5 (2014-08-01) ------------------- - -- support for 'l' (last day of month) - - -0.3.4 (2014-01-30) ------------------- - -- Python 3 compat -- QA Release - - -0.3.3 (2012-09-29) ------------------- -- proper packaging - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/docs/LICENSE new/croniter-1.3.14/docs/LICENSE --- old/croniter-1.3.7/docs/LICENSE 2022-09-06 18:47:21.000000000 +0200 +++ new/croniter-1.3.14/docs/LICENSE 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -Copyright (C) 2010-2012 Matsumoto Taichi - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/setup.py new/croniter-1.3.14/setup.py --- old/croniter-1.3.7/setup.py 2022-09-06 18:47:21.000000000 +0200 +++ new/croniter-1.3.14/setup.py 2023-04-12 18:06:44.000000000 +0200 @@ -18,13 +18,13 @@ long_description = "\n\n".join( [ read('README.rst'), - read('docs', 'CHANGES.rst'), + read('CHANGELOG.rst'), ] ) setup( name='croniter', - version='1.3.7', + version='1.3.14', py_modules=['croniter', ], description=( 'croniter provides iteration for datetime ' @@ -55,6 +55,7 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Software Development :: Libraries :: Python Modules"], packages=find_packages('src', exclude=['tests*', '*.tests*']), package_dir={'': 'src'}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/src/croniter/croniter.py new/croniter-1.3.14/src/croniter/croniter.py --- old/croniter-1.3.7/src/croniter/croniter.py 2022-09-06 18:47:21.000000000 +0200 +++ new/croniter-1.3.14/src/croniter/croniter.py 2023-04-12 18:06:44.000000000 +0200 @@ -3,6 +3,8 @@ from __future__ import absolute_import, print_function, division +import traceback as _traceback +import copy import math import re import sys @@ -21,10 +23,23 @@ OrderedDict = dict # py26 degraded mode, expanders order will not be immutable +M_ALPHAS = {'jan': 1, 'feb': 2, 'mar': 3, 'apr': 4, 'may': 5, 'jun': 6, + 'jul': 7, 'aug': 8, 'sep': 9, 'oct': 10, 'nov': 11, 'dec': 12} +DOW_ALPHAS = {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3, 'thu': 4, 'fri': 5, 'sat': 6} +ALPHAS = {} +for i in M_ALPHAS, DOW_ALPHAS: + ALPHAS.update(i) +del i step_search_re = re.compile(r'^([^-]+)-([^-/]+)(/(\d+))?$') only_int_re = re.compile(r'^\d+$') + +WEEKDAYS = '|'.join(DOW_ALPHAS.keys()) +MONTHS = '|'.join(M_ALPHAS.keys()) star_or_int_re = re.compile(r'^(\d+|\*)$') -special_weekday_re = re.compile(r'^(\w+)#(\d+)|l(\d+)$') +special_dow_re = re.compile( + (r'^(?P<pre>((?P<he>(({WEEKDAYS})(-({WEEKDAYS}))?)').format(WEEKDAYS=WEEKDAYS) + + (r'|(({MONTHS})(-({MONTHS}))?)|\w+)#)|l)(?P<last>\d+)$').format(MONTHS=MONTHS) +) hash_expression_re = re.compile( r'^(?P<hash_type>h|r)(\((?P<range_begin>\d+)-(?P<range_end>\d+)\))?(\/(?P<divisor>\d+))?$' ) @@ -106,10 +121,9 @@ {}, # 1: hour {"l": "l"}, # 2: dom # 3: mon - {'jan': 1, 'feb': 2, 'mar': 3, 'apr': 4, 'may': 5, 'jun': 6, - 'jul': 7, 'aug': 8, 'sep': 9, 'oct': 10, 'nov': 11, 'dec': 12}, + copy.deepcopy(M_ALPHAS), # 4: dow - {'sun': 0, 'mon': 1, 'tue': 2, 'wed': 3, 'thu': 4, 'fri': 5, 'sat': 6}, + copy.deepcopy(DOW_ALPHAS), # command/user {} ) @@ -635,27 +649,26 @@ while len(e_list) > 0: e = e_list.pop() + nth = None if i == 4: - # Handle special case in the day-of-week expression - m = special_weekday_re.match(str(e)) - if m: - orig_e = e - e, nth, last = m.groups() - if nth: + # Handle special case in the dow expression: 2#3, l3 + special_dow_rem = special_dow_re.match(str(e)) + if special_dow_rem: + g = special_dow_rem.groupdict() + he, last = g.get('he', ''), g.get('last', '') + if he: + e = he try: - nth = int(nth) + nth = int(last) assert (nth >= 1 and nth <= 5) - except (ValueError, AssertionError): + except (KeyError, ValueError, AssertionError): raise CroniterBadCronError( "[{0}] is not acceptable. Invalid day_of_week " - "value: '{1}'".format(expr_format, orig_e)) + "value: '{1}'".format(expr_format, nth)) elif last: - nth = "l" e = last - del last, orig_e - else: - nth = None + nth = g['pre'] # 'l' # Before matching step_search_re, normalize "*" to "{min}-{max}". # Example: in the minute field, "*/5" normalizes to "0-59/5" @@ -776,13 +789,14 @@ """Shallow non Croniter ValueError inside a nice CroniterBadCronError""" try: return cls._expand(expr_format, hash_id=hash_id) - except ValueError as exc: + except (ValueError,) as exc: error_type, error_instance, traceback = sys.exc_info() if isinstance(exc, CroniterError): raise if int(sys.version[0]) >= 3: + trace = _traceback.format_exc() globs, locs = _get_caller_globals_and_locals() - exec("raise CroniterBadCronError from exc", globs, locs) + raise CroniterBadCronError(trace) else: raise CroniterBadCronError("{0}".format(exc)) @@ -896,6 +910,10 @@ if m['hash_type'] == 'h' and hash_id is None: raise CroniterBadCronError('Hashed definitions must include hash_id') + if m['range_begin'] and m['range_end']: + if int(m['range_begin']) >= int(m['range_end']): + raise CroniterBadCronError('Range end must be greater than range begin') + if m['range_begin'] and m['range_end'] and m['divisor']: # Example: H(30-59)/10 -> 34-59/10 (i.e. 34,44,54) if int(m["divisor"]) == 0: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/src/croniter/tests/test_croniter.py new/croniter-1.3.14/src/croniter/tests/test_croniter.py --- old/croniter-1.3.7/src/croniter/tests/test_croniter.py 2022-09-06 18:47:21.000000000 +0200 +++ new/croniter-1.3.14/src/croniter/tests/test_croniter.py 2023-04-12 18:06:44.000000000 +0200 @@ -1473,6 +1473,72 @@ self.assertEqual(n1, datetime_to_timestamp(base) + 60) + def test_issue_k34(self): + # invalid cron, but should throw appropriate exception + self.assertRaises(CroniterBadCronError, croniter, "4 0 L/2 2 0") + + def test_issue_k33(self): + y = 2018 + # At 11:30 PM, between day 1 and 7 of the month, Monday through Friday, only in January + ret = [] + for i in range(10): + cron = croniter("30 23 1-7 JAN MON-FRI#1", datetime(y+i, 1, 1), ret_type=datetime) + for j in range(7): + d = cron.get_next() + if d.year == y + i: + ret.append(d) + rets = [datetime(2018, 1, 1, 23, 30), + datetime(2018, 1, 2, 23, 30), + datetime(2018, 1, 3, 23, 30), + datetime(2018, 1, 4, 23, 30), + datetime(2018, 1, 5, 23, 30), + datetime(2019, 1, 1, 23, 30), + datetime(2019, 1, 2, 23, 30), + datetime(2019, 1, 3, 23, 30), + datetime(2019, 1, 4, 23, 30), + datetime(2019, 1, 7, 23, 30), + datetime(2020, 1, 1, 23, 30), + datetime(2020, 1, 2, 23, 30), + datetime(2020, 1, 3, 23, 30), + datetime(2020, 1, 6, 23, 30), + datetime(2020, 1, 7, 23, 30), + datetime(2021, 1, 1, 23, 30), + datetime(2021, 1, 4, 23, 30), + datetime(2021, 1, 5, 23, 30), + datetime(2021, 1, 6, 23, 30), + datetime(2021, 1, 7, 23, 30), + datetime(2022, 1, 3, 23, 30), + datetime(2022, 1, 4, 23, 30), + datetime(2022, 1, 5, 23, 30), + datetime(2022, 1, 6, 23, 30), + datetime(2022, 1, 7, 23, 30), + datetime(2023, 1, 2, 23, 30), + datetime(2023, 1, 3, 23, 30), + datetime(2023, 1, 4, 23, 30), + datetime(2023, 1, 5, 23, 30), + datetime(2023, 1, 6, 23, 30), + datetime(2024, 1, 1, 23, 30), + datetime(2024, 1, 2, 23, 30), + datetime(2024, 1, 3, 23, 30), + datetime(2024, 1, 4, 23, 30), + datetime(2024, 1, 5, 23, 30), + datetime(2025, 1, 1, 23, 30), + datetime(2025, 1, 2, 23, 30), + datetime(2025, 1, 3, 23, 30), + datetime(2025, 1, 6, 23, 30), + datetime(2025, 1, 7, 23, 30), + datetime(2026, 1, 1, 23, 30), + datetime(2026, 1, 2, 23, 30), + datetime(2026, 1, 5, 23, 30), + datetime(2026, 1, 6, 23, 30), + datetime(2026, 1, 7, 23, 30), + datetime(2027, 1, 1, 23, 30), + datetime(2027, 1, 4, 23, 30), + datetime(2027, 1, 5, 23, 30), + datetime(2027, 1, 6, 23, 30), + datetime(2027, 1, 7, 23, 30)] + self.assertEqual(ret, rets) + croniter.expand("30 6 1-7 MAY MON#1") if __name__ == '__main__': unittest.main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/src/croniter/tests/test_croniter_hash.py new/croniter-1.3.14/src/croniter/tests/test_croniter_hash.py --- old/croniter-1.3.7/src/croniter/tests/test_croniter_hash.py 2022-09-06 18:47:21.000000000 +0200 +++ new/croniter-1.3.14/src/croniter/tests/test_croniter_hash.py 2023-04-12 18:06:44.000000000 +0200 @@ -99,6 +99,16 @@ 'H(30-59)/10 H * * *', datetime(2020, 1, 1, 11, 31), timedelta(minutes=10) ) + def test_hash_invalid_range(self): + """Test validation logic for range_begin and range_end values""" + try: + self._test_iter( + 'H(11-10) H * * *', datetime(2020, 1, 1, 11, 31), timedelta(minutes=10) + ) + except (CroniterBadCronError) as ex: + self.assertEqual("{0}".format(ex), + 'Range end must be greater than range begin') + def test_hash_id_bytes(self): """Test hash_id as a bytes object""" self._test_iter( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/src/croniter.egg-info/PKG-INFO new/croniter-1.3.14/src/croniter.egg-info/PKG-INFO --- old/croniter-1.3.7/src/croniter.egg-info/PKG-INFO 2022-09-06 18:47:21.000000000 +0200 +++ new/croniter-1.3.14/src/croniter.egg-info/PKG-INFO 2023-04-12 18:06:44.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: croniter -Version: 1.3.7 +Version: 1.3.14 Summary: croniter provides iteration for datetime object with cron like format Home-page: http://github.com/kiorky/croniter Author: Matsumoto Taichi, kiorky @@ -24,8 +24,10 @@ Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 Classifier: Topic :: Software Development :: Libraries :: Python Modules Requires-Python: >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* +License-File: LICENSE Introduction ============ @@ -46,10 +48,10 @@ Website: https://github.com/kiorky/croniter -Travis badge -============= -.. image:: https://travis-ci.org/kiorky/croniter.svg?branch=master - :target: https://travis-ci.org/kiorky/croniter +Build Badge +=========== +.. image:: https://github.com/kiorky/croniter/actions/workflows/cicd.yml/badge.svg + :target: https://github.com/kiorky/croniter/actions/workflows/cicd.yml Usage @@ -321,6 +323,43 @@ Changelog ============== +1.3.14 (2023-04-12) +------------------- + +- Lint + + +1.3.13 (2023-04-12) +------------------- + +- Add check for range begin/end + + + +1.3.12 (2023-04-12) +------------------- + +- restore py2 compat + + +1.3.11 (2023-04-12) +------------------- + +- Do not expose `i` into global namespace + + +1.3.10 (2023-04-07) +------------------- + +- Fix DOW hash parsing [kiorky] +- better error handling on py3 [kiorky] + +1.3.8 (2022-11-22) +------------------ + +- Add Python 3.11 support and move docs files to main folder [rafsaf] + + 1.3.7 (2022-09-06) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/src/croniter.egg-info/SOURCES.txt new/croniter-1.3.14/src/croniter.egg-info/SOURCES.txt --- old/croniter-1.3.7/src/croniter.egg-info/SOURCES.txt 2022-09-06 18:47:21.000000000 +0200 +++ new/croniter-1.3.14/src/croniter.egg-info/SOURCES.txt 2023-04-12 18:06:44.000000000 +0200 @@ -1,10 +1,10 @@ +CHANGELOG.rst +LICENSE MANIFEST.in README.rst setup.cfg setup.py tox.ini -docs/CHANGES.rst -docs/LICENSE requirements/base.txt requirements/release.txt requirements/test.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/croniter-1.3.7/tox.ini new/croniter-1.3.14/tox.ini --- old/croniter-1.3.7/tox.ini 2022-09-06 18:47:21.000000000 +0200 +++ new/croniter-1.3.14/tox.ini 2023-04-12 18:06:44.000000000 +0200 @@ -1,7 +1,7 @@ [tox] minversion = 2.3 envlist = - {py26,py27,py34,py35,py36,py37,py38,py39,py310}-std + {py26,py27,py34,py35,py36,py37,py38,py39,py310,py311}-std py27-coverage skipsdist = true @@ -14,8 +14,8 @@ COVERAGE_FILE={envdir}/coverage_report changedir = src commands = - {py26,py27,py34,py35,py36,py37,py38,py39,py310}-std: py.test -v . - {py27,py34,py35,py36,py37,py38,py39,py310}-std: flake8 croniter/croniter.py + {py26,py27,py34,py35,py36,py37,py38,py39,py310,py311}-std: py.test -v . + {py27,py34,py35,py36,py37,py38,py39,py310,py311}-std: flake8 croniter/croniter.py py27-coverage: coverage erase py27-coverage: sh -c 'cd .. && coverage run $(which py.test) -v src' py27-coverage: coverage report