#37126: Make Task and TaskResult comparable
--------------------------------+---------------------------------------
     Reporter:  Johannes Maron  |                     Type:  New feature
       Status:  new             |                Component:  Tasks
      Version:  dev             |                 Severity:  Normal
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  1               |                    UI/UX:  0
--------------------------------+---------------------------------------
 [https://forum.djangoproject.com/t/tasks-framework-versatility-
 performance/45035/4 Jake and I have been discussing changes to the Task
 framework for 6.2 with a focus on performance and versatility.]

 Python's [https://docs.python.org/3/library/queue.html#queue.PriorityQueue
 queue.PriorityQueue] implementation requires objects to be comparable.

 Since the base implementation of a `Task` implements a priority, it only
 makes sense to provide basic comparability based on the priority and date.

 Dataclasses have a neat `order=True` attribute to make this stupidly
 simple.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37126>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019e6f2c16cf-5ef5e664-cf7c-47f0-8787-a3f70058a9cf-000000%40eu-central-1.amazonses.com.

Reply via email to