Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-django-celery-beat for openSUSE:Factory checked in at 2024-07-01 11:20:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-django-celery-beat (Old) and /work/SRC/openSUSE:Factory/.python-django-celery-beat.new.18349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-celery-beat" Mon Jul 1 11:20:14 2024 rev:3 rq:1184021 version:2.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-django-celery-beat/python-django-celery-beat.changes 2024-02-13 22:43:51.723468554 +0100 +++ /work/SRC/openSUSE:Factory/.python-django-celery-beat.new.18349/python-django-celery-beat.changes 2024-07-01 11:20:50.972107908 +0200 @@ -1,0 +2,33 @@ +Sat Jun 29 17:21:30 UTC 2024 - Dirk Müller <dmuel...@suse.com> + +- update to 2.6.0: + * Avoid crash when can not get human readable description + * Update codeql-analysis.yml (#653). + * Fix CI: Change assert self.app.timezone.zone to assert + self.app.timezone.key (#664). + * Drop Django 4.0 from CI to avoid security issues (#662). + * Fix Issue #388: Celery Beat scheduled tasks may be executed + repeatedly (#660). + * Update README.rst (#670). + * Update runtime.txt to include Django 5.0 (#681). + * Replace case.patching fixture with mockeypatch + MagicMock + * Update README.rst - Crontab effect description (#689). + * Update supported Python & Django version in setup.py (#672). + * Add Python 3.12 to test matrix and add classifier (#690). + * Django v5.0: django.utils.timezone.utc alias --> + datetime.timezone.utc (#703). + * Upgrade GitHub Actions and PyPy 3.10 and Django 5.0 (#699). + * Testing Django v5.0 on pypy-3.10-v7.3.14 passes (#705). + * Prepare for release v2.6.0 to support Py3.12 and Dj5.0 + * GitHub Actions: Do not hardcode an out-of-date version of + PyPy (#715). + * Use the same order in the admin as in the cron schedule + expression (#716). + * Upgrade pip and GitHub Actions dependencies with dependabot + * Update pytest requirement from <8.0,>=6.2.5 to >=6.2.5,<9.0 + * Remove requirements/test-djangoXY.txt (#728). + * Remove code for unsupported django.VERSION < (3, 2) (#729). + * Added sphinxcontrib-django to extensions (#736). +- drop support-zoneinfo.patch (upstream) + +------------------------------------------------------------------- Old: ---- django-celery-beat-2.5.0.tar.gz support-zoneinfo.patch New: ---- django-celery-beat-2.6.0.tar.gz BETA DEBUG BEGIN: Old: * Added sphinxcontrib-django to extensions (#736). - drop support-zoneinfo.patch (upstream) BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-django-celery-beat.spec ++++++ --- /var/tmp/diff_new_pack.IdesRr/_old 2024-07-01 11:20:51.412123938 +0200 +++ /var/tmp/diff_new_pack.IdesRr/_new 2024-07-01 11:20:51.416124083 +0200 @@ -17,14 +17,12 @@ Name: python-django-celery-beat -Version: 2.5.0 +Version: 2.6.0 Release: 0 Summary: Database-backed Periodic Tasks License: BSD-3-Clause URL: https://github.com/celery/django-celery-beat Source: https://files.pythonhosted.org/packages/source/d/django-celery-beat/django-celery-beat-%{version}.tar.gz -# PATCH-FIX-UPSTREAM gh#celery/django-celery-beat#664 -Patch0: support-zoneinfo.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} ++++++ django-celery-beat-2.5.0.tar.gz -> django-celery-beat-2.6.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/Changelog new/django-celery-beat-2.6.0/Changelog --- old/django-celery-beat-2.5.0/Changelog 2023-03-14 10:54:42.000000000 +0100 +++ new/django-celery-beat-2.6.0/Changelog 2024-03-03 18:06:27.000000000 +0100 @@ -4,6 +4,43 @@ Change history ================ +Next +==== + + +.. _version-2.6.0: + +2.6.0 +===== +:release-date: 2024-03-03 +:release-by: Christian Clauss + +- Avoid crash when can not get human readable description (#648). +- Update codeql-analysis.yml (#653). +- Fix CI: Change assert self.app.timezone.zone to assert self.app.timezone.key (#664). +- Drop Django 4.0 from CI to avoid security issues (#662). +- Fix Issue #388: Celery Beat scheduled tasks may be executed repeatedly (#660). +- Update README.rst (#670). +- Update runtime.txt to include Django 5.0 (#681). +- Replace case.patching fixture with mockeypatch + MagicMock (#692). +- Update README.rst - Crontab effect description (#689). +- Update supported Python & Django version in setup.py (#672). +- Add Python 3.12 to test matrix and add classifier (#690). +- Django v5.0: django.utils.timezone.utc alias --> datetime.timezone.utc (#703). +- Upgrade GitHub Actions and PyPy 3.10 and Django 5.0 (#699). +- Testing Django v5.0 on pypy-3.10-v7.3.14 passes (#705). +- Prepare for release v2.6.0 to support Py3.12 and Dj5.0 (#712). +- GitHub Actions: Do not hardcode an out-of-date version of PyPy (#715). +- Use the same order in the admin as in the cron schedule expression (#716). +- Upgrade pip and GitHub Actions dependencies with dependabot (#721). +- Bump github/codeql-action from 2 to 3 (#722). +- Bump actions/checkout from 3 to 4 (#723). +- Update pytest requirement from <8.0,>=6.2.5 to >=6.2.5,<9.0 (#724). +- Remove requirements/test-djangoXY.txt (#728). +- Remove code for unsupported django.VERSION < (3, 2) (#729). +- Added sphinxcontrib-django to extensions (#736). + + .. _version-2.5.0: 2.5.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/PKG-INFO new/django-celery-beat-2.6.0/PKG-INFO --- old/django-celery-beat-2.5.0/PKG-INFO 2023-03-14 11:01:21.075267600 +0100 +++ new/django-celery-beat-2.6.0/PKG-INFO 2024-03-03 18:06:49.625830700 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: django-celery-beat -Version: 2.5.0 +Version: 2.6.0 Summary: Database-backed Periodic Tasks. Home-page: https://github.com/celery/django-celery-beat Author: Asif Saif Uddin, Ask Solem @@ -12,18 +12,18 @@ Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.7 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: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Framework :: Django Classifier: Framework :: Django :: 3.2 -Classifier: Framework :: Django :: 4.0 Classifier: Framework :: Django :: 4.1 Classifier: Framework :: Django :: 4.2 +Classifier: Framework :: Django :: 5.0 Classifier: Operating System :: OS Independent Classifier: Topic :: Communications Classifier: Topic :: System :: Distributed Computing @@ -31,6 +31,14 @@ Description-Content-Type: text/x-rst License-File: LICENSE License-File: AUTHORS +Requires-Dist: celery<6.0,>=5.2.3 +Requires-Dist: importlib-metadata<5.0; python_version < "3.8" +Requires-Dist: django-timezone-field>=5.0 +Requires-Dist: backports.zoneinfo; python_version < "3.9" +Requires-Dist: tzdata +Requires-Dist: python-crontab>=2.3.4 +Requires-Dist: cron-descriptor>=1.2.32 +Requires-Dist: Django<5.1,>=2.2 ===================================================================== Database-backed Periodic Tasks @@ -38,7 +46,7 @@ |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| -:Version: 2.5.0 +:Version: 2.6.0 :Web: http://django-celery-beat.readthedocs.io/ :Download: http://pypi.python.org/pypi/django-celery-beat :Source: http://github.com/celery/django-celery-beat @@ -204,7 +212,7 @@ A crontab schedule has the fields: ``minute``, ``hour``, ``day_of_week``, ``day_of_month`` and ``month_of_year``, so if you want the equivalent -of a ``30 * * * *`` (execute every 30 minutes) crontab entry you specify: +of a ``30 * * * *`` (execute 30 minutes past every hour) crontab entry you specify: .. code-block:: Python @@ -332,12 +340,12 @@ With pip ~~~~~~~~ -You can install the latest snapshot of django-celery-beat using the following +You can install the latest main version of django-celery-beat using the following pip command: .. code-block:: bash - $ pip install https://github.com/celery/django-celery-beat/zipball/master#egg=django-celery-beat + $ pip install git+https://github.com/celery/django-celery-beat#egg=django-celery-beat Developing django-celery-beat @@ -387,5 +395,3 @@ The maintainers of django-celery-beat and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more`_. .. _Learn more: https://tidelift.com/subscription/pkg/pypi-django-celery-beat?utm_source=pypi-django-celery-beat&utm_medium=referral&utm_campaign=readme&utm_term=repo - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/README.rst new/django-celery-beat-2.6.0/README.rst --- old/django-celery-beat-2.5.0/README.rst 2023-03-14 10:59:06.000000000 +0100 +++ new/django-celery-beat-2.6.0/README.rst 2024-03-03 18:06:27.000000000 +0100 @@ -4,7 +4,7 @@ |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| -:Version: 2.5.0 +:Version: 2.6.0 :Web: http://django-celery-beat.readthedocs.io/ :Download: http://pypi.python.org/pypi/django-celery-beat :Source: http://github.com/celery/django-celery-beat @@ -170,7 +170,7 @@ A crontab schedule has the fields: ``minute``, ``hour``, ``day_of_week``, ``day_of_month`` and ``month_of_year``, so if you want the equivalent -of a ``30 * * * *`` (execute every 30 minutes) crontab entry you specify: +of a ``30 * * * *`` (execute 30 minutes past every hour) crontab entry you specify: .. code-block:: Python @@ -298,12 +298,12 @@ With pip ~~~~~~~~ -You can install the latest snapshot of django-celery-beat using the following +You can install the latest main version of django-celery-beat using the following pip command: .. code-block:: bash - $ pip install https://github.com/celery/django-celery-beat/zipball/master#egg=django-celery-beat + $ pip install git+https://github.com/celery/django-celery-beat#egg=django-celery-beat Developing django-celery-beat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/django_celery_beat/__init__.py new/django-celery-beat-2.6.0/django_celery_beat/__init__.py --- old/django-celery-beat-2.5.0/django_celery_beat/__init__.py 2023-03-14 10:56:49.000000000 +0100 +++ new/django-celery-beat-2.6.0/django_celery_beat/__init__.py 2024-03-03 18:06:27.000000000 +0100 @@ -5,9 +5,7 @@ import re from collections import namedtuple -import django - -__version__ = '2.5.0' +__version__ = '2.6.0' __author__ = 'Asif Saif Uddin, Ask Solem' __contact__ = 'auv...@gmail.com, a...@celeryproject.org' __homepage__ = 'https://github.com/celery/django-celery-beat' @@ -29,6 +27,3 @@ del re __all__ = [] - -if django.VERSION < (3, 2): - default_app_config = 'django_celery_beat.apps.BeatConfig' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/django_celery_beat/admin.py new/django-celery-beat-2.6.0/django_celery_beat/admin.py --- old/django-celery-beat-2.5.0/django_celery_beat/admin.py 2023-03-14 09:11:44.000000000 +0100 +++ new/django-celery-beat-2.6.0/django_celery_beat/admin.py 2024-03-03 18:06:27.000000000 +0100 @@ -105,6 +105,7 @@ return self._clean_json('kwargs') +@admin.register(PeriodicTask) class PeriodicTaskAdmin(admin.ModelAdmin): """Admin-interface for periodic tasks.""" @@ -184,17 +185,21 @@ ), ) + @admin.action( + description=_('Enable selected tasks') + ) def enable_tasks(self, request, queryset): rows_updated = queryset.update(enabled=True) PeriodicTasks.update_changed() self._message_user_about_update(request, rows_updated, 'enabled') - enable_tasks.short_description = _('Enable selected tasks') + @admin.action( + description=_('Disable selected tasks') + ) def disable_tasks(self, request, queryset): rows_updated = queryset.update(enabled=False, last_run_at=None) PeriodicTasks.update_changed() self._message_user_about_update(request, rows_updated, 'disabled') - disable_tasks.short_description = _('Disable selected tasks') def _toggle_tasks_activity(self, queryset): return queryset.update(enabled=Case( @@ -202,12 +207,17 @@ default=Value(True), )) + @admin.action( + description=_('Toggle activity of selected tasks') + ) def toggle_tasks(self, request, queryset): rows_updated = self._toggle_tasks_activity(queryset) PeriodicTasks.update_changed() self._message_user_about_update(request, rows_updated, 'toggled') - toggle_tasks.short_description = _('Toggle activity of selected tasks') + @admin.action( + description=_('Run selected tasks') + ) def run_tasks(self, request, queryset): self.celery_app.loader.import_default_modules() tasks = [(self.celery_app.tasks.get(task.task), @@ -249,9 +259,9 @@ pluralize(tasks_run, _('was,were')), ), ) - run_tasks.short_description = _('Run selected tasks') +@admin.register(ClockedSchedule) class ClockedScheduleAdmin(admin.ModelAdmin): """Admin-interface for clocked schedules.""" @@ -263,12 +273,12 @@ ) +@admin.register(CrontabSchedule) class CrontabScheduleAdmin(admin.ModelAdmin): + """Admin class for CrontabSchedule.""" + list_display = ('__str__', 'human_readable') admin.site.register(IntervalSchedule) -admin.site.register(CrontabSchedule, CrontabScheduleAdmin) admin.site.register(SolarSchedule) -admin.site.register(ClockedSchedule, ClockedScheduleAdmin) -admin.site.register(PeriodicTask, PeriodicTaskAdmin) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/django_celery_beat/models.py new/django-celery-beat-2.6.0/django_celery_beat/models.py --- old/django-celery-beat-2.5.0/django_celery_beat/models.py 2023-03-14 09:11:44.000000000 +0100 +++ new/django-celery-beat-2.6.0/django_celery_beat/models.py 2024-03-03 18:06:27.000000000 +0100 @@ -8,7 +8,8 @@ import timezone_field from celery import current_app, schedules -from cron_descriptor import get_description +from cron_descriptor import (FormatException, MissingFieldException, + WrongArgumentException, get_description) from django.conf import settings from django.core.exceptions import MultipleObjectsReturned, ValidationError from django.core.validators import MaxValueValidator, MinValueValidator @@ -273,14 +274,6 @@ 'Cron Hours to Run. Use "*" for "all". (Example: "8,20")'), validators=[validators.hour_validator], ) - day_of_week = models.CharField( - max_length=64, default='*', - verbose_name=_('Day(s) Of The Week'), - help_text=_( - 'Cron Days Of The Week to Run. Use "*" for "all", Sunday ' - 'is 0 or 7, Monday is 1. (Example: "0,5")'), - validators=[validators.day_of_week_validator], - ) day_of_month = models.CharField( max_length=31 * 4, default='*', verbose_name=_('Day(s) Of The Month'), @@ -297,6 +290,14 @@ '(Example: "1,12")'), validators=[validators.month_of_year_validator], ) + day_of_week = models.CharField( + max_length=64, default='*', + verbose_name=_('Day(s) Of The Week'), + help_text=_( + 'Cron Days Of The Week to Run. Use "*" for "all", Sunday ' + 'is 0 or 7, Monday is 1. (Example: "0,5")'), + validators=[validators.day_of_week_validator], + ) timezone = timezone_field.TimeZoneField( default=crontab_schedule_celery_timezone, @@ -316,11 +317,19 @@ @property def human_readable(self): - human_readable = get_description('{} {} {} {} {}'.format( + cron_expression = '{} {} {} {} {}'.format( cronexp(self.minute), cronexp(self.hour), cronexp(self.day_of_month), cronexp(self.month_of_year), cronexp(self.day_of_week) - )) + ) + try: + human_readable = get_description(cron_expression) + except ( + MissingFieldException, + FormatException, + WrongArgumentException + ): + return f'{cron_expression} {str(self.timezone)}' return f'{human_readable} {str(self.timezone)}' def __str__(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/django_celery_beat/schedulers.py new/django-celery-beat-2.6.0/django_celery_beat/schedulers.py --- old/django-celery-beat-2.5.0/django_celery_beat/schedulers.py 2023-03-14 09:11:44.000000000 +0100 +++ new/django-celery-beat-2.6.0/django_celery_beat/schedulers.py 2024-03-03 18:06:27.000000000 +0100 @@ -300,9 +300,9 @@ while self._dirty: name = self._dirty.pop() try: - self.schedule[name].save() + self._schedule[name].save() _tried.add(name) - except (KeyError, ObjectDoesNotExist): + except (KeyError, TypeError, ObjectDoesNotExist): _failed.add(name) except DatabaseError as exc: logger.exception('Database error while sync: %r', exc) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/django_celery_beat/utils.py new/django-celery-beat-2.6.0/django_celery_beat/utils.py --- old/django-celery-beat-2.5.0/django_celery_beat/utils.py 2022-10-19 14:20:27.000000000 +0200 +++ new/django-celery-beat-2.6.0/django_celery_beat/utils.py 2024-03-03 18:06:27.000000000 +0100 @@ -1,6 +1,8 @@ """Utilities.""" # -- XXX This module must not use translation as that causes # -- a recursive loader import! +from datetime import timezone as datetime_timezone + from django.conf import settings from django.utils import timezone @@ -17,7 +19,7 @@ if getattr(settings, 'USE_TZ', False): # naive datetimes are assumed to be in UTC. if timezone.is_naive(value): - value = timezone.make_aware(value, timezone.utc) + value = timezone.make_aware(value, datetime_timezone.utc) # then convert to the Django configured timezone. default_tz = timezone.get_default_timezone() value = timezone.localtime(value, default_tz) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/django_celery_beat.egg-info/PKG-INFO new/django-celery-beat-2.6.0/django_celery_beat.egg-info/PKG-INFO --- old/django-celery-beat-2.5.0/django_celery_beat.egg-info/PKG-INFO 2023-03-14 11:01:20.000000000 +0100 +++ new/django-celery-beat-2.6.0/django_celery_beat.egg-info/PKG-INFO 2024-03-03 18:06:49.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: django-celery-beat -Version: 2.5.0 +Version: 2.6.0 Summary: Database-backed Periodic Tasks. Home-page: https://github.com/celery/django-celery-beat Author: Asif Saif Uddin, Ask Solem @@ -12,18 +12,18 @@ Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.7 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: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Framework :: Django Classifier: Framework :: Django :: 3.2 -Classifier: Framework :: Django :: 4.0 Classifier: Framework :: Django :: 4.1 Classifier: Framework :: Django :: 4.2 +Classifier: Framework :: Django :: 5.0 Classifier: Operating System :: OS Independent Classifier: Topic :: Communications Classifier: Topic :: System :: Distributed Computing @@ -31,6 +31,14 @@ Description-Content-Type: text/x-rst License-File: LICENSE License-File: AUTHORS +Requires-Dist: celery<6.0,>=5.2.3 +Requires-Dist: importlib-metadata<5.0; python_version < "3.8" +Requires-Dist: django-timezone-field>=5.0 +Requires-Dist: backports.zoneinfo; python_version < "3.9" +Requires-Dist: tzdata +Requires-Dist: python-crontab>=2.3.4 +Requires-Dist: cron-descriptor>=1.2.32 +Requires-Dist: Django<5.1,>=2.2 ===================================================================== Database-backed Periodic Tasks @@ -38,7 +46,7 @@ |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| -:Version: 2.5.0 +:Version: 2.6.0 :Web: http://django-celery-beat.readthedocs.io/ :Download: http://pypi.python.org/pypi/django-celery-beat :Source: http://github.com/celery/django-celery-beat @@ -204,7 +212,7 @@ A crontab schedule has the fields: ``minute``, ``hour``, ``day_of_week``, ``day_of_month`` and ``month_of_year``, so if you want the equivalent -of a ``30 * * * *`` (execute every 30 minutes) crontab entry you specify: +of a ``30 * * * *`` (execute 30 minutes past every hour) crontab entry you specify: .. code-block:: Python @@ -332,12 +340,12 @@ With pip ~~~~~~~~ -You can install the latest snapshot of django-celery-beat using the following +You can install the latest main version of django-celery-beat using the following pip command: .. code-block:: bash - $ pip install https://github.com/celery/django-celery-beat/zipball/master#egg=django-celery-beat + $ pip install git+https://github.com/celery/django-celery-beat#egg=django-celery-beat Developing django-celery-beat @@ -387,5 +395,3 @@ The maintainers of django-celery-beat and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. `Learn more`_. .. _Learn more: https://tidelift.com/subscription/pkg/pypi-django-celery-beat?utm_source=pypi-django-celery-beat&utm_medium=referral&utm_campaign=readme&utm_term=repo - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/django_celery_beat.egg-info/SOURCES.txt new/django-celery-beat-2.6.0/django_celery_beat.egg-info/SOURCES.txt --- old/django-celery-beat-2.5.0/django_celery_beat.egg-info/SOURCES.txt 2023-03-14 11:01:20.000000000 +0100 +++ new/django-celery-beat-2.6.0/django_celery_beat.egg-info/SOURCES.txt 2024-03-03 18:06:49.000000000 +0100 @@ -90,10 +90,6 @@ requirements/runtime.txt requirements/test-ci.txt requirements/test-django.txt -requirements/test-django32.txt -requirements/test-django40.txt -requirements/test-django41.txt -requirements/test-django42.txt requirements/test.txt t/__init__.py t/proj/__init__.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/django_celery_beat.egg-info/entry_points.txt new/django-celery-beat-2.6.0/django_celery_beat.egg-info/entry_points.txt --- old/django-celery-beat-2.5.0/django_celery_beat.egg-info/entry_points.txt 2023-03-14 11:01:20.000000000 +0100 +++ new/django-celery-beat-2.6.0/django_celery_beat.egg-info/entry_points.txt 2024-03-03 18:06:49.000000000 +0100 @@ -1,3 +1,2 @@ [celery.beat_schedulers] django = django_celery_beat.schedulers:DatabaseScheduler - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/django_celery_beat.egg-info/requires.txt new/django-celery-beat-2.6.0/django_celery_beat.egg-info/requires.txt --- old/django-celery-beat-2.5.0/django_celery_beat.egg-info/requires.txt 2023-03-14 11:01:20.000000000 +0100 +++ new/django-celery-beat-2.6.0/django_celery_beat.egg-info/requires.txt 2024-03-03 18:06:49.000000000 +0100 @@ -1,9 +1,9 @@ -Django<5.0,>=2.2 celery<6.0,>=5.2.3 -cron-descriptor>=1.2.32 django-timezone-field>=5.0 -python-crontab>=2.3.4 tzdata +python-crontab>=2.3.4 +cron-descriptor>=1.2.32 +Django<5.1,>=2.2 [:python_version < "3.8"] importlib-metadata<5.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/docs/conf.py new/django-celery-beat-2.6.0/docs/conf.py --- old/django-celery-beat-2.5.0/docs/conf.py 2022-10-19 14:20:27.000000000 +0200 +++ new/django-celery-beat-2.6.0/docs/conf.py 2024-03-03 18:06:27.000000000 +0100 @@ -37,4 +37,10 @@ None ), }, + extensions=['sphinxcontrib_django'] )) + +intersphinx_mapping = globals().get('intersphinx_mapping', {}) +intersphinx_mapping['celery'] = ( + 'https://celery.readthedocs.io/en/main/', None) +globals().update({'intersphinx_mapping': intersphinx_mapping}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/docs/includes/introduction.txt new/django-celery-beat-2.6.0/docs/includes/introduction.txt --- old/django-celery-beat-2.5.0/docs/includes/introduction.txt 2023-03-14 10:57:52.000000000 +0100 +++ new/django-celery-beat-2.6.0/docs/includes/introduction.txt 2024-03-03 18:06:27.000000000 +0100 @@ -1,4 +1,4 @@ -:Version: 2.5.0 +:Version: 2.6.0 :Web: http://django-celery-beat.readthedocs.io/ :Download: http://pypi.python.org/pypi/django-celery-beat :Source: http://github.com/celery/django-celery-beat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/docs/reference/django-celery-beat.models.rst new/django-celery-beat-2.6.0/docs/reference/django-celery-beat.models.rst --- old/django-celery-beat-2.5.0/docs/reference/django-celery-beat.models.rst 2022-04-17 10:00:57.000000000 +0200 +++ new/django-celery-beat-2.6.0/docs/reference/django-celery-beat.models.rst 2024-03-03 18:06:27.000000000 +0100 @@ -8,4 +8,3 @@ .. automodule:: django_celery_beat.models :members: - :undoc-members: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/requirements/docs.txt new/django-celery-beat-2.6.0/requirements/docs.txt --- old/django-celery-beat-2.5.0/requirements/docs.txt 2023-03-14 10:22:19.000000000 +0100 +++ new/django-celery-beat-2.6.0/requirements/docs.txt 2024-03-03 18:06:27.000000000 +0100 @@ -1,4 +1,5 @@ Django>=2.2,<5.0 +sphinxcontrib-django https://github.com/celery/sphinx_celery/archive/master.zip https://github.com/celery/kombu/zipball/main#egg=kombu https://github.com/celery/celery/zipball/main#egg=celery diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/requirements/runtime.txt new/django-celery-beat-2.6.0/requirements/runtime.txt --- old/django-celery-beat-2.5.0/requirements/runtime.txt 2023-03-14 10:22:19.000000000 +0100 +++ new/django-celery-beat-2.6.0/requirements/runtime.txt 2024-03-03 18:06:27.000000000 +0100 @@ -1 +1 @@ -Django>=2.2,<5.0 +Django>=2.2,<5.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/requirements/test-django32.txt new/django-celery-beat-2.6.0/requirements/test-django32.txt --- old/django-celery-beat-2.5.0/requirements/test-django32.txt 2022-04-17 10:00:57.000000000 +0200 +++ new/django-celery-beat-2.6.0/requirements/test-django32.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -django>=3.2.13,<4.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/requirements/test-django40.txt new/django-celery-beat-2.6.0/requirements/test-django40.txt --- old/django-celery-beat-2.5.0/requirements/test-django40.txt 2022-04-17 10:00:57.000000000 +0200 +++ new/django-celery-beat-2.6.0/requirements/test-django40.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -django>=4.0.4,<4.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/requirements/test-django41.txt new/django-celery-beat-2.6.0/requirements/test-django41.txt --- old/django-celery-beat-2.5.0/requirements/test-django41.txt 2023-03-14 09:11:44.000000000 +0100 +++ new/django-celery-beat-2.6.0/requirements/test-django41.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -django>=4.1.4,<4.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/requirements/test-django42.txt new/django-celery-beat-2.6.0/requirements/test-django42.txt --- old/django-celery-beat-2.5.0/requirements/test-django42.txt 2023-03-14 10:22:19.000000000 +0100 +++ new/django-celery-beat-2.6.0/requirements/test-django42.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -django>=4.2b1,<5.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/requirements/test.txt new/django-celery-beat-2.6.0/requirements/test.txt --- old/django-celery-beat-2.5.0/requirements/test.txt 2023-03-14 10:22:19.000000000 +0100 +++ new/django-celery-beat-2.6.0/requirements/test.txt 2024-03-03 18:06:27.000000000 +0100 @@ -1,5 +1,4 @@ -case>=1.3.1 pytest-django>=4.5.2,<5.0 -pytest>=6.2.5,<8.0 +pytest>=6.2.5,<9.0 pytest-timeout ephem diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/setup.py new/django-celery-beat-2.6.0/setup.py --- old/django-celery-beat-2.5.0/setup.py 2023-03-14 09:36:29.000000000 +0100 +++ new/django-celery-beat-2.6.0/setup.py 2024-03-03 18:06:27.000000000 +0100 @@ -21,12 +21,12 @@ E_UNSUPPORTED_PYTHON = f'{NAME} 1.0 requires %s %s or later!' PYIMP = _pyimp() -PY37_OR_LESS = sys.version_info < (3, 7) +PY38_OR_LESS = sys.version_info < (3, 8) PYPY_VERSION = getattr(sys, 'pypy_version_info', None) PYPY24_ATLEAST = PYPY_VERSION and PYPY_VERSION >= (2, 4) -if PY37_OR_LESS and not PYPY24_ATLEAST: - raise Exception(E_UNSUPPORTED_PYTHON % (PYIMP, '3.7')) +if PY38_OR_LESS and not PYPY24_ATLEAST: + raise Exception(E_UNSUPPORTED_PYTHON % (PYIMP, '3.8')) # -*- Classifiers -*- @@ -35,18 +35,18 @@ License :: OSI Approved :: BSD License Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Framework :: Django Framework :: Django :: 3.2 - Framework :: Django :: 4.0 Framework :: Django :: 4.1 Framework :: Django :: 4.2 + Framework :: Django :: 5.0 Operating System :: OS Independent Topic :: Communications Topic :: System :: Distributed Computing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/t/unit/conftest.py new/django-celery-beat-2.6.0/t/unit/conftest.py --- old/django-celery-beat-2.5.0/t/unit/conftest.py 2022-10-19 14:20:27.000000000 +0200 +++ new/django-celery-beat-2.6.0/t/unit/conftest.py 2024-03-03 18:06:27.000000000 +0100 @@ -1,3 +1,5 @@ +from unittest.mock import MagicMock + import pytest # we have to import the pytest plugin fixtures here, # in case user did not do the `python setup.py develop` yet, @@ -40,3 +42,11 @@ yield if request.instance: request.instance.app = None + + +@pytest.fixture +def patching(monkeypatch): + def _patching(attr): + monkeypatch.setattr(attr, MagicMock()) + + return _patching diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/t/unit/test_models.py new/django-celery-beat-2.6.0/t/unit/test_models.py --- old/django-celery-beat-2.5.0/t/unit/test_models.py 2022-10-19 14:20:27.000000000 +0200 +++ new/django-celery-beat-2.6.0/t/unit/test_models.py 2024-03-03 18:06:27.000000000 +0100 @@ -207,3 +207,40 @@ 'The `PeriodicTasks.last_update` has not be update.' ) # Check the `PeriodicTasks` does be updated. + + +class HumanReadableTestCase(TestCase): + def test_good(self): + """Valid crontab display.""" + cron = CrontabSchedule.objects.create( + hour="2", + minute="0", + day_of_week="mon", + ) + self.assertNotEqual( + cron.human_readable, "0 2 * * mon UTC" + ) + + def test_invalid(self): + """Invalid crontab display.""" + cron = CrontabSchedule.objects.create( + hour="2", + minute="0", + day_of_week="monxxx", + ) + self.assertEqual( + cron.human_readable, "0 2 * * monxxx UTC" + ) + + def test_long_name(self): + """Long day name display.""" + # TODO: this should eventually work, but probably needs conversion + # before passing data to cron_description + cron = CrontabSchedule.objects.create( + hour="2", + minute="0", + day_of_week="monday", + ) + self.assertEqual( + cron.human_readable, "0 2 * * monday UTC" + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-celery-beat-2.5.0/t/unit/test_schedulers.py new/django-celery-beat-2.6.0/t/unit/test_schedulers.py --- old/django-celery-beat-2.5.0/t/unit/test_schedulers.py 2023-03-14 09:11:44.000000000 +0100 +++ new/django-celery-beat-2.6.0/t/unit/test_schedulers.py 2024-03-03 18:06:27.000000000 +0100 @@ -159,7 +159,7 @@ os.environ["TZ"] = "Europe/Berlin" if hasattr(time, "tzset"): time.tzset() - assert self.app.timezone.zone == 'Europe/Berlin' + assert self.app.timezone.key == 'Europe/Berlin' # simulate last_run_at from DB - not TZ aware but localtime right_now = datetime.utcnow() @@ -191,7 +191,7 @@ os.environ["TZ"] = "Europe/Berlin" if hasattr(time, "tzset"): time.tzset() - assert self.app.timezone.zone == 'Europe/Berlin' + assert self.app.timezone.key == 'Europe/Berlin' # simulate last_run_at from DB - not TZ aware but localtime right_now = datetime.utcnow() # make sure to use fixed date time @@ -227,7 +227,7 @@ os.environ["TZ"] = "Europe/Berlin" if hasattr(time, "tzset"): time.tzset() - assert self.app.timezone.zone == 'America/New_York' + assert self.app.timezone.key == 'America/New_York' # simulate last_run_at all none, doing the same thing that # _default_now() would do @@ -444,6 +444,28 @@ assert self.s.flushed == 1 assert self.m2.name in self.s._dirty + def test_sync_not_saves_last_run_at_while_schedule_changed(self): + # Update e1 last_run_at and add to dirty + e1 = self.s.schedule[self.m2.name] + time.sleep(3) + e1.model.last_run_at = e1._default_now() + self.s._dirty.add(e1.model.name) + + # Record e1 pre sync last_run_at + e1_pre_sync_last_run_at = e1.model.last_run_at + + # Set schedule_changed() == True + self.s._last_timestamp = monotonic() + # Do sync + self.s.sync() + + # Record e1 post sync last_run_at + e1_m = PeriodicTask.objects.get(pk=e1.model.pk) + e1_post_sync_last_run_at = e1_m.last_run_at + + # Check + assert e1_pre_sync_last_run_at == e1_post_sync_last_run_at + def test_sync_saves_last_run_at(self): e1 = self.s.schedule[self.m2.name] last_run = e1.last_run_at