Skip to content

Drop deprecated interval decorator from public API#58

Merged
codingjoe merged 2 commits into
mainfrom
copilot/drop-deprecated-interval-function
May 27, 2026
Merged

Drop deprecated interval decorator from public API#58
codingjoe merged 2 commits into
mainfrom
copilot/drop-deprecated-interval-function

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 27, 2026

This change removes the deprecated interval decorator ahead of the major release, completing the planned API cleanup. Consumers should schedule interval-based jobs via cron(...) with APScheduler IntervalTrigger instead.

  • Public API

    • Removed interval from crontask.__all__.
    • Removed the interval(*, seconds) decorator implementation from crontask/__init__.py.
  • Code cleanup

    • Removed now-unused imports tied to the deprecated path (warnings, IntervalTrigger in crontask/__init__.py).
  • Tests

    • Removed interval import usage in tests/test_tasks.py.
    • Removed the legacy test_interval__seconds test that validated deprecated behavior.
from apscheduler.triggers.interval import IntervalTrigger
from django.utils import timezone
from crontask import cron

@cron(IntervalTrigger(seconds=30, timezone=timezone.get_default_timezone()))
@task
def my_task():
    ...

Copilot AI changed the title [WIP] Remove deprecated interval function for major release Drop deprecated interval decorator from public API May 27, 2026
Copilot AI requested a review from codingjoe May 27, 2026 10:20
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.81%. Comparing base (64b2891) to head (2eabb18).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #58      +/-   ##
==========================================
- Coverage   98.85%   98.81%   -0.04%     
==========================================
  Files           6        6              
  Lines         174      169       -5     
==========================================
- Hits          172      167       -5     
  Misses          2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codingjoe codingjoe marked this pull request as ready for review May 27, 2026 10:31
Copilot AI review requested due to automatic review settings May 27, 2026 10:31
@codingjoe codingjoe merged commit 0e3e6b0 into main May 27, 2026
15 of 16 checks passed
@codingjoe codingjoe deleted the copilot/drop-deprecated-interval-function branch May 27, 2026 10:31
Copilot AI review requested due to automatic review settings May 27, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop deprecated interval function for major release

2 participants