#34135: Add async interface to ManyRelatedManager & RelatedManager
-------------------------------------+-------------------------------------
     Reporter:  Jon Janzen           |                    Owner:  Jon
                                     |  Janzen
         Type:  New feature          |                   Status:  assigned
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  async                |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Jon Janzen:

Old description:

> 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

New description:

 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`

 (1)
 
https://docs.djangoproject.com/en/dev/ref/models/relations/#django.db.models.fields.related.RelatedManager

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34135#comment:5>
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/010701843ed464a7-d8be5e1f-eb53-4dbd-a003-8a92f4ec4d3e-000000%40eu-central-1.amazonses.com.

Reply via email to