Skip to content

Conversation

rh0dium
Copy link
Contributor

@rh0dium rh0dium commented Aug 25, 2025

@rh0dium rh0dium changed the title Update import handling for cron_descriptor > 2.0.x compatibility Update import handling for cron_descriptor > 2.0.x compatibility # 934 Real Fix Aug 25, 2025
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.25%. Comparing base (66b4434) to head (2b55fef).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
django_celery_beat/models.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #936      +/-   ##
==========================================
- Coverage   88.18%   87.25%   -0.93%     
==========================================
  Files          32       32              
  Lines        1007     1012       +5     
  Branches      105       81      -24     
==========================================
- Hits          888      883       -5     
- Misses        101      111      +10     
  Partials       18       18              

☔ 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.

from cron_descriptor import (FormatException, MissingFieldException,
WrongArgumentException, get_description)

try:
Copy link
Contributor

@cclauss cclauss Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
try:
try: # Python >= 3.11 can use cron_descriptor >= 2.0 which uses *Error exceptions.

We need a comment here explaining why.

Or perhaps in #935 we should just pin the dependency to >= 2.0 and just use *Error instead of try / except.

EDIT: #938 proves that the above suggestion will not work. We need try / except because cron_descriptor v2 only supports Python >= v3.11.

@Salamek

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cron_descriptor 2.0.5 supports Python 3.9 - 3.13...

Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the test failures please

@auvipy auvipy closed this in #935 Aug 26, 2025
@auvipy auvipy reopened this Aug 26, 2025
Add comment per request

Co-authored-by: Christian Clauss <cclauss@me.com>
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.

Issue with the cron-descriptor cron_descriptor needs to be locked down as the new release changes the signature.
4 participants