From 1aa35ebf3a4637102e7bd3552f9dcce42c3c8b6e Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Thu, 16 Nov 2023 15:33:01 +0100 Subject: [PATCH 01/15] Add version_update_mask to packit configuration --- .packit.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 1ce81a2..64fddd3 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -6,8 +6,10 @@ specfile_path: python-APScheduler.spec upstream_package_name: APScheduler downstream_package_name: python-APScheduler upstream_project_url: https://github.com/agronholm/apscheduler - +version_update_mask: '\d+\.\d+\.' upstream_tag_exclude: "^4.[0-9].[0-9]a" # exclude version 4 alpha releases + +packit_instances: ["stg"] jobs: - job: copr_build @@ -19,7 +21,6 @@ jobs: - job: pull_from_upstream trigger: release - packit_instances: ["prod", "stg"] dist_git_branches: - fedora-all From 8efa9a9f6bd4de1108293242a4f18314f1f0ec2d Mon Sep 17 00:00:00 2001 From: Packit Date: Mon, 20 Nov 2023 10:48:47 +0000 Subject: [PATCH 02/15] [packit] 3.10.4 upstream release Upstream tag: 3.10.4 Upstream commit: 2cd37918 --- README.packit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.packit b/README.packit index 14f9883..39d81cf 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.83.0.post1.dev4+g46d87465.d20231011. +The file was generated using packit 0.86.0.post1.dev2+g1bec2ea8. From 24464f016a2ac7e8ca8711d61fe7ee2e704064ca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 22:51:01 +0000 Subject: [PATCH 03/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From b5997cb342d74fb7b185371b9c31dbc4be2552ab Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 00:43:45 +0000 Subject: [PATCH 04/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From abf407bbfc9c7d305e8ae5d0a5f4c8d039d94b12 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 12:01:53 +0200 Subject: [PATCH 05/15] Rebuilt for Python 3.13 From d07cd02799ff10726520e64a6556b294af7f238e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 09:00:01 +0000 Subject: [PATCH 06/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From ae13079cc5e1be6b0016053d96875ed357572bd9 Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Mon, 18 Nov 2024 08:54:23 +0100 Subject: [PATCH 07/15] Fix test_executors when using python 3.14 --- 01-test-executors.patch | 102 ++++++++++++++++++++++++++++++++++++++++ python-APScheduler.spec | 2 + 2 files changed, 104 insertions(+) create mode 100644 01-test-executors.patch diff --git a/01-test-executors.patch b/01-test-executors.patch new file mode 100644 index 0000000..b3856b7 --- /dev/null +++ b/01-test-executors.patch @@ -0,0 +1,102 @@ +diff --git a/setup.cfg b/setup.cfg +index 002111f..012cff4 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -7,7 +7,7 @@ upload-dir = docs/_build/html + + [tool:pytest] + asyncio_mode = strict +-addopts = -rsx --cov --tb=short ++addopts = -rsx --tb=short + testpaths = tests + + [coverage:run] +diff --git a/setup.py b/setup.py +index cd93e10..59f5a80 100644 +--- a/setup.py ++++ b/setup.py +@@ -56,7 +56,6 @@ setup( + 'testing': [ + 'pytest', + 'pytest_asyncio', +- 'pytest-cov', + 'pytest-tornado5' + ], + 'doc': [ +diff --git a/tests/test_executors.py b/tests/test_executors.py +index d67e187..0140dbe 100644 +--- a/tests/test_executors.py ++++ b/tests/test_executors.py +@@ -5,6 +5,7 @@ import gc + import os + import signal + import time ++from time import sleep + + import pytest + from pytz import UTC +@@ -36,11 +37,11 @@ def executor(request, mock_scheduler): + executor_ = ThreadPoolExecutor() + else: + from apscheduler.executors.pool import ProcessPoolExecutor +- executor_ = ProcessPoolExecutor() ++ executor_ = ProcessPoolExecutor(4, {"max_tasks_per_child": 1}) + + executor_.start(mock_scheduler, 'dummy') + yield executor_ +- executor_.shutdown() ++ executor_.shutdown(True) + + + def wait_event(): +@@ -60,12 +61,12 @@ def test_max_instances(mock_scheduler, executor, create_job, freeze_time): + """Tests that the maximum instance limit on a job is respected.""" + events = [] + mock_scheduler._dispatch_event = lambda event: events.append(event) +- job = create_job(func=wait_event, max_instances=2, next_run_time=None) ++ job = create_job(func=wait_event, max_instances=2, next_run_time=None, misfire_grace_time = None) + executor.submit_job(job, [freeze_time.current]) + executor.submit_job(job, [freeze_time.current]) + + pytest.raises(MaxInstancesReachedError, executor.submit_job, job, [freeze_time.current]) +- executor.shutdown() ++ executor.shutdown(True) + assert len(events) == 2 + assert events[0].retval == 'test' + assert events[1].retval == 'test' +@@ -83,12 +84,13 @@ def test_submit_job(mock_scheduler, executor, create_job, freeze_time, timezone, + + """ + mock_scheduler._dispatch_event = MagicMock() +- job = create_job(func=func, id='foo') ++ misfire_grace_time = 1 if event_code == EVENT_JOB_MISSED else None ++ job = create_job(func=func, id='foo', misfire_grace_time=misfire_grace_time) + job._jobstore_alias = 'test_jobstore' + run_time = (timezone.localize(datetime(1970, 1, 1)) if event_code == EVENT_JOB_MISSED else + freeze_time.current) + executor.submit_job(job, [run_time]) +- executor.shutdown() ++ executor.shutdown(True) + + assert mock_scheduler._dispatch_event.call_count == 1 + event = mock_scheduler._dispatch_event.call_args[0][0] +@@ -157,18 +159,13 @@ def test_broken_pool(): + + pid = [None] + event = Event() +- scheduler = BackgroundScheduler(executors={'default': ProcessPoolExecutor(1)}) ++ scheduler = BackgroundScheduler(executors={'default': ProcessPoolExecutor(1, {"max_tasks_per_child": 1})}) + scheduler.add_listener(listener, EVENT_JOB_EXECUTED) + scheduler.add_job(os.getpid, 'date', run_date=datetime.now(UTC)) + scheduler.start() + + event.wait(3) + killed_pid = pid[0] +- os.kill(pid[0], signal.SIGTERM) +- try: +- os.waitpid(pid[0], 0) +- except OSError: +- pass + + event.clear() + scheduler.add_job(os.getpid, 'date', run_date=datetime.now(UTC)) diff --git a/python-APScheduler.spec b/python-APScheduler.spec index 0e3df0a..786bdb0 100644 --- a/python-APScheduler.spec +++ b/python-APScheduler.spec @@ -16,6 +16,8 @@ Summary: In-process task scheduler with Cron-like capabilities License: MIT URL: https://pypi.org/project/APScheduler/ Source0: %{pypi_source %{srcname}} +# wait for tasks to finish, adjust misfire_grace_time +Patch0: 01-test-executors.patch BuildArch: noarch %description %_description From 810a5c2dde6580e44bec4228c134ebff7ae70a7f Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Thu, 28 Nov 2024 14:47:19 +0100 Subject: [PATCH 08/15] Update srcname Starting from release 3.11.0 source name is referenced with lower cases. --- python-APScheduler.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-APScheduler.spec b/python-APScheduler.spec index 786bdb0..8953afa 100644 --- a/python-APScheduler.spec +++ b/python-APScheduler.spec @@ -1,4 +1,4 @@ -%global srcname APScheduler +%global srcname apscheduler %global _description %{expand: Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed later, either just once or From 52c2b70a3d51ad2f8af50b7bc5308162f3bb9f3b Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Thu, 28 Nov 2024 14:54:32 +0100 Subject: [PATCH 09/15] Relax version_update_mask Allows releasing 3.11.0 from 3.10.0. --- .packit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.packit.yaml b/.packit.yaml index 64fddd3..a9a2f42 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -6,7 +6,7 @@ specfile_path: python-APScheduler.spec upstream_package_name: APScheduler downstream_package_name: python-APScheduler upstream_project_url: https://github.com/agronholm/apscheduler -version_update_mask: '\d+\.\d+\.' +version_update_mask: '\d+\.' upstream_tag_exclude: "^4.[0-9].[0-9]a" # exclude version 4 alpha releases packit_instances: ["stg"] From a91ec8ec4b746710279106d1e0bf49e288c61e5b Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Thu, 28 Nov 2024 15:22:02 +0100 Subject: [PATCH 10/15] Update to 3.11.0 upstream release Upstream tag: 3.11.0 Upstream commit: 6c72a514 Commit authored by Packit automation (https://packit.dev/) --- .gitignore | 1 + README.packit | 2 +- python-APScheduler.spec | 15 +++++---------- sources | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 4cd5311..95ca13b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /APScheduler-3.7.0.tar.gz /APScheduler-3.8.0.tar.gz /APScheduler-3.10.4.tar.gz +/apscheduler-3.11.0.tar.gz diff --git a/README.packit b/README.packit index 14f9883..cfc44ec 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.83.0.post1.dev4+g46d87465.d20231011. +The file was generated using packit 0.104.1.post1.dev0+g23aec6b3.d20241128. diff --git a/python-APScheduler.spec b/python-APScheduler.spec index 8953afa..63dcfb1 100644 --- a/python-APScheduler.spec +++ b/python-APScheduler.spec @@ -9,15 +9,13 @@ restarted, it will then run all the jobs it should have run while it was offline.} Name: python-%{srcname} -Version: 3.10.4 +Version: 3.11.0 Release: %autorelease Summary: In-process task scheduler with Cron-like capabilities License: MIT URL: https://pypi.org/project/APScheduler/ Source0: %{pypi_source %{srcname}} -# wait for tasks to finish, adjust misfire_grace_time -Patch0: 01-test-executors.patch BuildArch: noarch %description %_description @@ -34,15 +32,12 @@ BuildRequires: python3-devel # up and running. Upstream provides a docker compose to spawn # services before running these tests. rm tests/test_jobstores.py -sed -i 's/pytest-tornado5/pytest-tornado/' setup.py -# Remove coverage -sed -i 's/addopts = -rsx --cov/addopts = -rsx/' setup.cfg -sed -i '/pytest-cov/d' setup.py -# It is in the tarball and is not used -rm -r APScheduler.egg-info +# Skip missing dependencies in Fedora 4 +sed -i 's/ "anyio >= 4.5.2",//' pyproject.toml +sed -i 's/,rethinkdb//' pyproject.toml %generate_buildrequires -%pyproject_buildrequires -x testing -x tornado +%pyproject_buildrequires -x test -x tornado %build %pyproject_wheel diff --git a/sources b/sources index 79b1eec..884733a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (APScheduler-3.10.4.tar.gz) = 44b78e60b7349437fb8d6e5ad3bbd764cfa653fdd65685b586119225e8daaff9b150871887812a1f3d4cd67b942c70e99d1606d38b83685953fb1bb1a82742fe +SHA512 (apscheduler-3.11.0.tar.gz) = c66d87773d3fe353e5f0bbc4bc9ba05337b555db0810e42e2e384fd9717438fda501d0c724cd7180010b11e5d8db901922b79a163aec3a420a6a65eafb6f39f6 From c0383cc86844939d8f88c14fed9a80141568536b Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Fri, 29 Nov 2024 14:54:48 +0100 Subject: [PATCH 11/15] Do not change package name --- python-APScheduler.spec | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/python-APScheduler.spec b/python-APScheduler.spec index 63dcfb1..dc4fca4 100644 --- a/python-APScheduler.spec +++ b/python-APScheduler.spec @@ -1,4 +1,3 @@ -%global srcname apscheduler %global _description %{expand: Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed later, either just once or @@ -8,31 +7,31 @@ scheduler restarts and maintain their state. When the scheduler is restarted, it will then run all the jobs it should have run while it was offline.} -Name: python-%{srcname} +Name: python-APScheduler Version: 3.11.0 Release: %autorelease Summary: In-process task scheduler with Cron-like capabilities License: MIT URL: https://pypi.org/project/APScheduler/ -Source0: %{pypi_source %{srcname}} +Source0: %{pypi_source apscheduler} BuildArch: noarch %description %_description -%package -n python3-%{srcname} +%package -n python3-APScheduler Summary: %{summary} BuildRequires: python3-devel -%description -n python3-%{srcname} %_description +%description -n python3-APScheduler %_description %prep -%autosetup -n %{srcname}-%{version} -p1 +%autosetup -n apscheduler-%{version} -p1 # Remove that test as it require services (redis, zookeeper, ...) # up and running. Upstream provides a docker compose to spawn # services before running these tests. rm tests/test_jobstores.py -# Skip missing dependencies in Fedora 4 +# Skip missing dependencies in Fedora 42 sed -i 's/ "anyio >= 4.5.2",//' pyproject.toml sed -i 's/,rethinkdb//' pyproject.toml @@ -51,7 +50,7 @@ sed -i 's/,rethinkdb//' pyproject.toml export TZ=UTC %pytest -%files -n python3-%{srcname} -f %{pyproject_files} +%files -n python3-APScheduler -f %{pyproject_files} %doc README.rst %changelog From 1db6d59dd295e8273d3c832ab08bff0afa0472ea Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 11:22:18 +0000 Subject: [PATCH 12/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From bbc55ec9b282ff3166c34794204593dc260f1a75 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 06:25:17 +0000 Subject: [PATCH 13/15] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From a6c56914a80163f480b326449fe9f98aab5ab4f7 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 13:14:17 +0200 Subject: [PATCH 14/15] Rebuilt for Python 3.14.0rc2 bytecode From b3afa94f5a76017523a3612cb97054f9ab2b4e2c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:45:19 +0200 Subject: [PATCH 15/15] Rebuilt for Python 3.14.0rc3 bytecode