#37206 new Cleanup/optimization

Drop tasks' is_module_level_function in favor of the established deconstructable paradigm

Reported by: Johannes Maron Owned by:
Component: Tasks Version: 6.0
Severity: Normal Keywords:
Cc: Johannes Maron Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The task framework introduces a new is_module_level_function inspection function instead of relying on the established deconstructible paradigm.

Django's task functions (Task.func) need to be serializable. However, Django has an established paradigm for how to do this since the introduction of migrations: deconstructible classes that need to either implement deconstruct or use the @deconstructalbe decorator.

Yes, it will also add support for callables, but more importantly, we don't introduce too many serialization paradigms internally and provide integrators a familiar interface.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top