python-schedule: bump to 1.2.2
authorAlexandru Ardelean <redacted>
Sat, 28 Mar 2026 19:07:29 +0000 (19:07 +0000)
committerAlexandru Ardelean <redacted>
Wed, 1 Apr 2026 07:29:21 +0000 (10:29 +0300)
Changes since 1.2.0:
- Fix compatibility with Python 3.12 deprecation of datetime.utcnow()
- Various minor bug fixes and improvements

Also add test.sh to verify version and core scheduling API.

Link: https://github.com/dbader/schedule/blob/master/CHANGELOG.rst
Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-schedule/Makefile
lang/python/python-schedule/test.sh [new file with mode: 0755]

index 134a2c5763cc861ad1e1998dd12cb19d8b225573..10cb8bd4648110b043e69565fc4d9e60df676059 100644 (file)
@@ -8,16 +8,18 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-schedule
-PKG_VERSION:=1.2.0
+PKG_VERSION:=1.2.2
 PKG_RELEASE:=1
 
 PYPI_NAME:=schedule
-PKG_HASH:=b4ad697aafba7184c9eb6a1e2ebc41f781547242acde8ceae9a0a25b04c0922d
+PKG_HASH:=15fe9c75fe5fd9b9627f3f19cc0ef1420508f9f9a46f45cd0769ef75ede5f0b7
 
 PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
 
+PKG_BUILD_DEPENDS:=python-setuptools/host
+
 include ../pypi.mk
 include $(INCLUDE_DIR)/package.mk
 include ../python3-package.mk
diff --git a/lang/python/python-schedule/test.sh b/lang/python/python-schedule/test.sh
new file mode 100755 (executable)
index 0000000..90d42eb
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+[ "$1" = "python3-schedule" ] || exit 0
+
+python3 - << EOF
+import sys
+import schedule
+
+# Verify core scheduling API
+results = []
+
+def job():
+    results.append(1)
+
+# Schedule a job and verify it is registered
+schedule.every(1).hours.do(job)
+assert len(schedule.jobs) == 1, "expected 1 job"
+
+# run_pending should not call the job (not yet due)
+schedule.run_pending()
+assert len(results) == 0, "job should not have run yet"
+
+# run_all forces all jobs to run regardless of schedule
+schedule.run_all()
+assert len(results) == 1, "job should have run via run_all"
+
+schedule.clear()
+assert len(schedule.jobs) == 0, "jobs should be cleared"
+
+sys.exit(0)
+EOF
git clone https://git.99rst.org/PROJECT