Opened 2 years ago

Closed 2 years ago

#34135 closed New feature (fixed)

Add async interface to ManyRelatedManager & RelatedManager

Reported by: Jon Janzen Owned by: Jon Janzen
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords: async
Cc: Carlton Gibson Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Jon Janzen)

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

Change History (11)

comment:1 by Jon Janzen, 2 years ago

FWIW I'm also willing to work on a PR for this ticket, assuming a similar solution to #34112.

(apologies if this ticket is not well-formed or I missed another ticket that covers the same topics)

comment:2 by Jon Janzen, 2 years ago

Description: modified (diff)

comment:3 by Mariusz Felisiak, 2 years ago

Cc: Carlton Gibson added
Triage Stage: UnreviewedAccepted
Type: UncategorizedNew feature

Sounds reasonable.

comment:4 by Jon Janzen, 2 years ago

Owner: changed from nobody to Jon Janzen
Status: newassigned

comment:5 by Jon Janzen, 2 years ago

Description: modified (diff)

comment:6 by Jon Janzen, 2 years ago

Has patch: set

comment:7 by Mariusz Felisiak, 2 years ago

Patch needs improvement: set

comment:8 by Bhuvnesh, 2 years ago

I would like to submit an improvement patch if not jon.

in reply to:  8 comment:9 by Mariusz Felisiak, 2 years ago

Replying to Bhuvnesh:

I would like to submit an improvement patch if not jon.

There is no need for a new patch.

comment:10 by Mariusz Felisiak, 2 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In 321ecb40:

Fixed #34135 -- Added async-compatible interface to related managers.

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