diff -Nru python-django-celery-beat-2.2.1/debian/changelog python-django-celery-beat-2.2.1/debian/changelog --- python-django-celery-beat-2.2.1/debian/changelog 2021-09-14 18:53:33.000000000 +0000 +++ python-django-celery-beat-2.2.1/debian/changelog 2022-03-14 22:43:42.000000000 +0000 @@ -1,3 +1,18 @@ +python-django-celery-beat (2.2.1-2) unstable; urgency=medium + + * Refresh patches. + * Add patch to fix compatibility with django-timezone-field >=5 + (Closes: #1006659). + * Bump version requirement for python3-django-timezone-field to >= 5. + * Update year in d/copyright. + * Install testfiles using d/pybuild.testfiles. + * Remove use of importlib when running pytest, fixed by including + manage.py in testfiles. + * Enable pytest celery fixtures. + * Depend on python3-all for autopkgtests. + + -- Michael Fladischer Mon, 14 Mar 2022 22:43:42 +0000 + python-django-celery-beat (2.2.1-1) unstable; urgency=low [ Salman Mohammadi ] diff -Nru python-django-celery-beat-2.2.1/debian/control python-django-celery-beat-2.2.1/debian/control --- python-django-celery-beat-2.2.1/debian/control 2021-09-14 18:53:33.000000000 +0000 +++ python-django-celery-beat-2.2.1/debian/control 2022-03-14 22:43:42.000000000 +0000 @@ -12,7 +12,7 @@ python3-celery (>= 5.0.0), python3-crontab, python3-django, - python3-django-timezone-field (>= 4.1~), + python3-django-timezone-field (>= 5~), python3-djangorestframework, python3-pytest, python3-pytest-django, diff -Nru python-django-celery-beat-2.2.1/debian/copyright python-django-celery-beat-2.2.1/debian/copyright --- python-django-celery-beat-2.2.1/debian/copyright 2021-09-14 18:53:33.000000000 +0000 +++ python-django-celery-beat-2.2.1/debian/copyright 2022-03-14 22:43:42.000000000 +0000 @@ -24,7 +24,7 @@ License: CC0 Files: debian/* -Copyright: 2017, Michael Fladischer +Copyright: 2017-2022, Michael Fladischer License: BSD-3-clause License: BSD-3-clause diff -Nru python-django-celery-beat-2.2.1/debian/patches/0001-Fixed-test-to-not-expire-relative-to-current-date.-A.patch python-django-celery-beat-2.2.1/debian/patches/0001-Fixed-test-to-not-expire-relative-to-current-date.-A.patch --- python-django-celery-beat-2.2.1/debian/patches/0001-Fixed-test-to-not-expire-relative-to-current-date.-A.patch 2021-09-14 18:53:33.000000000 +0000 +++ python-django-celery-beat-2.2.1/debian/patches/0001-Fixed-test-to-not-expire-relative-to-current-date.-A.patch 2022-03-14 22:43:42.000000000 +0000 @@ -8,7 +8,7 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/unit/test_schedulers.py b/t/unit/test_schedulers.py -index 551e3fc..634d911 100644 +index 28a89b1..5d25f1a 100644 --- a/t/unit/test_schedulers.py +++ b/t/unit/test_schedulers.py @@ -706,7 +706,7 @@ class test_models(SchedulerCase): diff -Nru python-django-celery-beat-2.2.1/debian/patches/0002-Fix-compatibility-with-django-timezone-field-5-Close.patch python-django-celery-beat-2.2.1/debian/patches/0002-Fix-compatibility-with-django-timezone-field-5-Close.patch --- python-django-celery-beat-2.2.1/debian/patches/0002-Fix-compatibility-with-django-timezone-field-5-Close.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-django-celery-beat-2.2.1/debian/patches/0002-Fix-compatibility-with-django-timezone-field-5-Close.patch 2022-03-14 22:43:42.000000000 +0000 @@ -0,0 +1,49 @@ +From: Michael Fladischer +Date: Mon, 14 Mar 2022 21:40:07 +0000 +Subject: Fix compatibility with django-timezone-field >=5 (Closes: #1006659). + +--- + django_celery_beat/models.py | 6 ++---- + requirements/default.txt | 2 +- + t/unit/test_models.py | 2 +- + 3 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/django_celery_beat/models.py b/django_celery_beat/models.py +index 583d8b6..9f301e6 100644 +--- a/django_celery_beat/models.py ++++ b/django_celery_beat/models.py +@@ -66,10 +66,8 @@ def crontab_schedule_celery_timezone(): + settings, '%s_TIMEZONE' % current_app.namespace) + except AttributeError: + return 'UTC' +- return CELERY_TIMEZONE if CELERY_TIMEZONE in [ +- choice[0].zone for choice in timezone_field. +- TimeZoneField.default_choices +- ] else 'UTC' ++ return CELERY_TIMEZONE if CELERY_TIMEZONE in timezone_field.\ ++ TimeZoneField.default_pytz_tzs else 'UTC' + + + class SolarSchedule(models.Model): +diff --git a/requirements/default.txt b/requirements/default.txt +index 843db8c..7c6f91b 100644 +--- a/requirements/default.txt ++++ b/requirements/default.txt +@@ -1,3 +1,3 @@ + celery>=5.0,<6.0 +-django-timezone-field>=4.1.0,<5.0 ++django-timezone-field>=5 + python-crontab>=2.3.4 +diff --git a/t/unit/test_models.py b/t/unit/test_models.py +index 627e47b..b5c719b 100644 +--- a/t/unit/test_models.py ++++ b/t/unit/test_models.py +@@ -84,7 +84,7 @@ class TestDuplicatesMixin: + + class CrontabScheduleTestCase(TestCase, TestDuplicatesMixin): + FIRST_VALID_TIMEZONE = timezone_field.\ +- TimeZoneField.default_choices[0][0].zone ++ TimeZoneField.default_pytz_tzs[0] + + def test_default_timezone_without_settings_config(self): + assert crontab_schedule_celery_timezone() == "UTC" diff -Nru python-django-celery-beat-2.2.1/debian/patches/series python-django-celery-beat-2.2.1/debian/patches/series --- python-django-celery-beat-2.2.1/debian/patches/series 2021-09-14 18:53:33.000000000 +0000 +++ python-django-celery-beat-2.2.1/debian/patches/series 2022-03-14 22:43:42.000000000 +0000 @@ -1 +1,2 @@ 0001-Fixed-test-to-not-expire-relative-to-current-date.-A.patch +0002-Fix-compatibility-with-django-timezone-field-5-Close.patch diff -Nru python-django-celery-beat-2.2.1/debian/pybuild.testfiles python-django-celery-beat-2.2.1/debian/pybuild.testfiles --- python-django-celery-beat-2.2.1/debian/pybuild.testfiles 1970-01-01 00:00:00.000000000 +0000 +++ python-django-celery-beat-2.2.1/debian/pybuild.testfiles 2022-03-14 22:43:42.000000000 +0000 @@ -0,0 +1,3 @@ +t +setup.cfg +manage.py diff -Nru python-django-celery-beat-2.2.1/debian/rules python-django-celery-beat-2.2.1/debian/rules --- python-django-celery-beat-2.2.1/debian/rules 2021-09-14 18:53:33.000000000 +0000 +++ python-django-celery-beat-2.2.1/debian/rules 2022-03-14 22:43:42.000000000 +0000 @@ -4,9 +4,7 @@ #export DH_VERBOSE=1 export PYBUILD_NAME=django-celery-beat -export PYBUILD_BEFORE_TEST=cp -r {dir}/t {dir}/setup.cfg {build_dir} -export PYBUILD_AFTER_TEST=rm -rf {build_dir}/t {build_dir}/setup.cfg -export PYBUILD_TEST_ARGS=--import-mode=importlib -k "not test_heap_always_return_the_first_item and not test_run_task and not test_run_tasks" +export PYBUILD_TEST_ARGS=-p celery.contrib.pytest -k "not test_heap_always_return_the_first_item and not test_run_task and not test_run_tasks" %: dh $@ --with python3,sphinxdoc --buildsystem=pybuild diff -Nru python-django-celery-beat-2.2.1/debian/tests/control python-django-celery-beat-2.2.1/debian/tests/control --- python-django-celery-beat-2.2.1/debian/tests/control 2021-09-14 18:53:33.000000000 +0000 +++ python-django-celery-beat-2.2.1/debian/tests/control 2022-03-14 22:43:42.000000000 +0000 @@ -1,5 +1,6 @@ Tests: upstream Depends: + python3-all, @, @builddeps@, Restrictions: allow-stderr diff -Nru python-django-celery-beat-2.2.1/debian/tests/upstream python-django-celery-beat-2.2.1/debian/tests/upstream --- python-django-celery-beat-2.2.1/debian/tests/upstream 2021-09-14 18:53:33.000000000 +0000 +++ python-django-celery-beat-2.2.1/debian/tests/upstream 2022-03-14 22:43:42.000000000 +0000 @@ -2,8 +2,8 @@ set -e -cp -r t setup.cfg ${AUTOPKGTEST_TMP} +cp -r t setup.cfg manage.py ${AUTOPKGTEST_TMP} cd ${AUTOPKGTEST_TMP} for p in $(py3versions -s); do - $p -m pytest --import-mode=importlib -k "not test_heap_always_return_the_first_item and not test_run_task and not test_run_tasks" + $p -m pytest -p celery.contrib.pytest -k "not test_heap_always_return_the_first_item and not test_run_task and not test_run_tasks" done