-
-
Notifications
You must be signed in to change notification settings - Fork 528
Django 6.0: Add Django Tasks framework #2967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
3474fed to
91cba97
Compare
91cba97 to
2cb03af
Compare
e2ea18b to
2371f7e
Compare
2371f7e to
971fd1c
Compare
fb0abd4 to
2ed6b32
Compare
9a4ca9c to
4acc512
Compare
2b1559e to
3ab5de5
Compare
| django.tasks.checks | ||
| django.tasks.exceptions | ||
| django.tasks.signals | ||
| django.tasks.default_task_backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: why are these items in todo.txt?
- If these are expected errors, move them to regular
allowlist.txt(withouttodo) and comment why they are here - If they are just not fixed yet, what is blocking us from fixing them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly because I wasn't aware of how to use each list, so I just threw those items back to where they came from.
django.tasks.default_task_backendcould be moved to allowlist_todo.txt with the other ConnectionProxy instances, like django.core.cache.cache and django.db.connection.django.tasks.task decoratoremits an error because one of the overloads expects a non-None function value when the decorator accepts None at runtime (for the other overload). Could move it to allowlist.txtdjango.tasks.backends.base.BaseTaskBackend.enqueueshould be typed as an abstract method but not sure if that's going to be problematic since default_task_backend is typed as BaseTaskBackend. Can move it to allowlist.txt but not sure.
I wrote stubs for the Django Task framework introduced in Django 6.0. They still need some polish but feedback is very welcome.
If you are reviewing this, pay special attention to the Task class generic parameters which have an influence in how many other methods are typed.
Update: this now passes all tests, I had to put some items in the allowlist and conditionally monkeypatch the tasks classes based on the Django version. There are some rough edges there, but things are looking good.