Releases: simonl65/scheduler
Releases · simonl65/scheduler
Release list
mpy-scheduler v1.2.3
mpy-scheduler 1.2.3 — 2026-08-26
Suggested version: 1.2.3 — no breaking changes, no new features; purely a packaging fix, so a patch bump is appropriate.
Major (breaking changes)
- None.
Minor (functionality added in a backward compatible manner)
- None.
Patch (backward compatible bug fixes)
- Added readme = "README.md" to pyproject.toml so the project description renders correctly on PyPI.
mpy-scheduler v1.2.2
mpy-scheduler 1.2.2 — 2026-08-26
Major (breaking changes)
- None.
Minor (functionality added in a backward compatible manner)
- None.
Patch (backward compatible bug fixes)
- Optimized
run()'s per-round hot loop:ticks_ms/ticks_diffare now hoisted to locals instead of looked up via module attribute access every task every round, and each task'sinterval_msis read once per round instead of twice. Measured +5.76% loop rate on RP2040/armv6m hardware, with no change torun()'s signature, yielded value, orTask's public surface. - Documented and enforced that
interval_msis read once per task per round: a callback that mutates its owntask.interval_msmid-round can no longer affect that same round's due check or its contribution to the yielded periodic-fire count — only later rounds. This was already the intended contract (intervals are meant to be fixed at construction); it is now explicit and covered by a regression test. - Fixed an issue where release testing caught a CPython import error: "ModuleNotFoundError: No module named 'utime'", now shimmed in a try/catch.
mpy-scheduler v1.2.0
Major (breaking changes)
- None.
Minor (functionality added in a backward compatible manner)
run()now yields the number of tasks that fired this round withinterval_ms > 0, letting callers ask "was anything actually due this round" without a timing-threshold proxy. Tasks withinterval_ms == 0are excluded from the count since they fire unconditionally every round and carry no signal about whether the round was busy. Existing callers that callnext(scheduler)and ignore the return value are unaffected.
Patch (backward compatible bug fixes)
- None.
Release 1.1.0
Major (breaking changes)
- None.
Minor (functionality added in a backward compatible manner)
Tasknow accepts anisolate_errorsparameter (defaultTrue). When enabled, exceptions thrown by a task's callback are caught and stashed ontask.last_exceptioninstead of propagating — one failing task no longer halts the round or prevents subsequent tasks from running. Passisolate_errors=Falseto restore the old raise-on-error behaviour for critical tasks.Task.last_msnow defaults toticks_ms()at construction time rather than0. A task created after uptime has advanced is no longer treated as overdue since boot, preventing an immediate burst of callbacks on startup.light_sleepmode now sleeps for exactly the soonest task's remaining time each round (via_ms_until_next_due) rather than a fixed per-call minimum, improving power savings and scheduling accuracy.__init__.pyexports updated to use explicitasre-exports (Task as Task,run as run) for better static analysis and type-checker compatibility.
Patch (backward compatible bug fixes)
- Generator-based example corrected to build the scheduler once outside the loop rather than once per iteration.
- Improved test suite with real
ticks_diffwraparound math and per-behaviour test cases.
Release 1.0.0
Enables simple, lightweight, cooperative task running, designed for MicroPython.