Re: [Django] #36649: Add `|=` update operator support to `MultiValueDict` and `QueryDict`. (was: Add `|=` merge operator support to `MultiValueDict` and `QueryDict`.)

0 views
Skip to first unread message

Django

unread,
Oct 8, 2025, 7:02:08 AM10/8/25
to django-...@googlegroups.com
#36649: Add `|=` update operator support to `MultiValueDict` and `QueryDict`.
-------------------------------+----------------------------------------
Reporter: Adam Johnson | Owner: Adam Johnson
Type: New feature | Status: assigned
Component: HTTP handling | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+----------------------------------------
Changes (by Adam Johnson):

* summary: Add `|=` merge operator support to `MultiValueDict` and
`QueryDict`. => Add `|=` update operator support to `MultiValueDict`
and `QueryDict`.


Old description:

> Per [https://forum.djangoproject.com/t/add-merge-and-update-operator-
> support-to-multivaluedict-querydict/43123 forum discussion], add an
> `__ior__` method to these classes to make `|=` work, guarding for
> mutability in `QueryDict`.

New description:

Per [https://forum.djangoproject.com/t/add-merge-and-update-operator-
support-to-multivaluedict-querydict/43123 forum discussion], add an
`__ior__` method to these classes to make
[https://peps.python.org/pep-0584/ PEP 584's] `|=` union operator work,
guarding for mutability in `QueryDict`.

--
--
Ticket URL: <https://code.djangoproject.com/ticket/36649#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages