[Django] #36446: Django 5.2.2 incompatibly removed q from MediaType.params

13 views
Skip to first unread message

Django

unread,
Jun 6, 2025, 3:43:36 PMJun 6
to django-...@googlegroups.com
#36446: Django 5.2.2 incompatibly removed q from MediaType.params
--------------------------------+-----------------------------------------
Reporter: Anders Kaseorg | Type: Bug
Status: new | Component: HTTP handling
Version: 5.2 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+-----------------------------------------
https://github.com/django/django/pull/19507#discussion_r2130422564

Between Django 5.2.1 and 5.2.2, the `q` entry was removed from the
`MediaType.params` dict. Even though `MediaType` is not documented as a
public API, it does have users (such as Zulip). This seems like an
unnecessary breaking change, especially for a stable patch release. I was
asked to file a ticket for this, so here it is.
--
Ticket URL: <https://code.djangoproject.com/ticket/36446>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 9, 2025, 8:50:37 AMJun 9
to django-...@googlegroups.com
#36446: Django 5.2.2 incompatibly removed q from MediaType.params
---------------------------------+------------------------------------
Reporter: Anders Kaseorg | Owner: (none)
Type: Bug | Status: new
Component: HTTP handling | Version: 5.2
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Natalia Bidart):

* severity: Normal => Release blocker
* stage: Unreviewed => Accepted

Comment:

Hello Anders, thank you for creating this ticket. Accepting based on the
PR conversation.

Regression in c075508b4de8edf9db553b409f8a8ed2f26ecead.
--
Ticket URL: <https://code.djangoproject.com/ticket/36446#comment:1>

Django

unread,
Jun 9, 2025, 8:59:27 AMJun 9
to django-...@googlegroups.com
#36446: Django 5.2.2 incompatibly removed q from MediaType.params
-------------------------------------+-------------------------------------
Reporter: Anders Kaseorg | Owner: Natalia
| Bidart
Type: Bug | Status: assigned
Component: HTTP handling | Version: 5.2
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* owner: (none) => Natalia Bidart
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36446#comment:2>

Django

unread,
Jun 9, 2025, 11:15:16 AMJun 9
to django-...@googlegroups.com
#36446: Django 5.2.2 incompatibly removed q from MediaType.params
-------------------------------------+-------------------------------------
Reporter: Anders Kaseorg | Owner: Natalia
| Bidart
Type: Bug | Status: assigned
Component: HTTP handling | Version: 5.2
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36446#comment:3>

Django

unread,
Jun 9, 2025, 4:37:50 PMJun 9
to django-...@googlegroups.com
#36446: Django 5.2.2 incompatibly removed q from MediaType.params
-------------------------------------+-------------------------------------
Reporter: Anders Kaseorg | Owner: Natalia
| Bidart
Type: Bug | Status: closed
Component: HTTP handling | Version: 5.2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by nessita <124304+nessita@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"cf5f36bf903a2854f5e395149cee707115b83744" cf5f36b]:
{{{#!CommitTicketReference repository=""
revision="cf5f36bf903a2854f5e395149cee707115b83744"
Fixed #36446 -- Restored "q" in internal MediaType.params property.

The "q" key was removed while addressing ticket #36411. Despite
`MediaType.params` is undocumented and considered internal, it was used
in third-party projects (Zulip reported breakage), so this work restored
the `q` key in `params`.

Thanks Anders Kaseorg for the report.

Regression in c075508b4de8edf9db553b409f8a8ed2f26ecead.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36446#comment:4>

Django

unread,
Jun 9, 2025, 4:39:12 PMJun 9
to django-...@googlegroups.com
#36446: Django 5.2.2 incompatibly removed q from MediaType.params
-------------------------------------+-------------------------------------
Reporter: Anders Kaseorg | Owner: Natalia
| Bidart
Type: Bug | Status: closed
Component: HTTP handling | Version: 5.2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/36446#comment:5>

Django

unread,
Jun 9, 2025, 4:39:56 PMJun 9
to django-...@googlegroups.com
#36446: Django 5.2.2 incompatibly removed q from MediaType.params
-------------------------------------+-------------------------------------
Reporter: Anders Kaseorg | Owner: Natalia
| Bidart
Type: Bug | Status: closed
Component: HTTP handling | Version: 5.2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia <124304+nessita@…>):

In [changeset:"cc5079730a50e77590d465563807871b8f230ff5" cc50797]:
{{{#!CommitTicketReference repository=""
revision="cc5079730a50e77590d465563807871b8f230ff5"
[5.2.x] Fixed #36446 -- Restored "q" in internal MediaType.params
property.

The "q" key was removed while addressing ticket #36411. Despite
`MediaType.params` is undocumented and considered internal, it was used
in third-party projects (Zulip reported breakage), so this work restored
the `q` key in `params`.

Thanks Anders Kaseorg for the report.

Regression in c075508b4de8edf9db553b409f8a8ed2f26ecead.

Backport of cf5f36bf903a2854f5e395149cee707115b83744 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36446#comment:6>
Reply all
Reply to author
Forward
0 new messages