#34135: Add async interface to ManyRelatedManager & RelatedManager
-------------------------------------+-------------------------------------
Reporter: Jon | Owner: nobody
Janzen |
Type: | Status: new
Uncategorized |
Component: Database | Version: dev
layer (models, ORM) |
Severity: Normal | Keywords: async
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
With #34112 and #33646 combined, there is now an async interface for
reading/writing Models in a lot of cases. One of the obvious places where
that isn't true is in `RelatedManager` instances. `RelatedManager`
instances are missing async versions of:
* `add`
* `remove`
* `clear`
* `set`
And this might be a separate ticket but the docs [1] are missing a
reference to `acreate` which according to `dir()` exists on
`ManyRelatedManager` (I assume as a consequence of inheriting from some
superclass `Manager` type) but I didn't actually try and see if it works.
I'm suspicious that it might not be fully correct as
`related_descriptors.py` includes a possibly custom version of the
synchronous `create` function (see [2] & [3]).
[1]
https://docs.djangoproject.com/en/dev/ref/models/relations/#django.db.models.fields.related.RelatedManager
[2]
https://github.com/django/django/blob/main/django/db/models/fields/related_descriptors.py#L788-L792
[3]
https://github.com/django/django/blob/main/django/db/models/fields/related_descriptors.py#L1186-L1190
--
Ticket URL: <https://code.djangoproject.com/ticket/34135>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/010701843a39112b-f22bad2b-795d-403d-928a-d9daaf398c5f-000000%40eu-central-1.amazonses.com.