Opened 4 days ago

Closed 3 days ago

Last modified 3 days ago

#36194 closed New feature (wontfix)

add async support to ManyToManyField

Reported by: amirreza Owned by: amirreza
Component: Forms Version: 5.1
Severity: Normal Keywords:
Cc: amirreza, Jon Janzen, Andrew Godwin Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by amirreza)

hi
i'm working on an async version of ModelForm on a third party package
a problem that occurs is the lack of async support in mant to many fields
in particular, _save_m2m calls save_form_data, but there is no async equivalent to this method
even tho save_form_data is basically calling ManyRelatedManage.set() which has an async equivalent

so i think adding an async version is a feasible option, ofc this means adding async version of other methods of ManyToManyField that need one
so i'm volunteering for this

Change History (6)

comment:1 by amirreza, 4 days ago

Description: modified (diff)

comment:2 by amirreza, 4 days ago

Description: modified (diff)

comment:3 by amirreza, 4 days ago

Description: modified (diff)

comment:4 by Sarah Boyce, 3 days ago

Resolution: wontfix
Status: assignedclosed

Thank you for the ticket!

So, we haven't built-out async support for forms (yet).
According to DEP-9, we want to add async support for forms, and ModelForm in particular.

The more recent conversation around whether DEP-9 is still relevant discoraged async support being added to "everything".
However, the components that were suggested as not worth the extra maintenance cost were Templates, and base admin views, the syndication framework, …

So I believe we could change this ticket title to "Async support for forms" and then can do multiple PRs to achieve this with Refs #36194

I know that you are only talking about ManyToManyField here, however adding/updating the API to allow partial form support without discussing the wider goal for Django (to me) is not ideal.


With all new features, we want to discuss with the community as to whether the change is desirable.

In this case, I will add a message to the existing discussion and if we get a positive response (this can take a couple of weeks to assess), we can then accept the ticket.
While we are understanding the ticket, it will be in the status "wontfix" and will stay this way unless/until we come to an agreement to action it.

For more information, see the documented guidelines for requesting features.

comment:5 by Sarah Boyce, 3 days ago

Cc: Jon Janzen Andrew Godwin added
Easy pickings: unset

Related #34135

comment:6 by amirreza, 3 days ago

hi there👋
thanks for the response 🙏

ofc it needs to be discussed in the wider area of Fields
i mostly meant that i can promise a work on many to many field for now, maybe i get a chance to work on more related subjects, but i don't want to throw empty promises out there

i would also like to clarify that the mentioned AsyncModelForm is a thrid party package, so this ticket is only about Fileds

so I'll wait until you reach a conclusion🙌

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