Repository navigation
Restore order_by_precedence from 3.18.1 to fix broken return value - #10066
Merged
browniebroke merged 1 commit intoOct 6, 2026
Merged
browniebroke merged 1 commit into
browniebroke merged 1 commit into
Conversation
order_by_precedence from 3.18.1order_by_precedence from 3.18.1 to fix broken return value
auvipy
reviewed
Oct 7, 2026
| """ | ||
| media_types_gen = (_MediaType(mt) for mt in media_type_lst) | ||
| return order_parsed_by_precedence(media_types_gen) | ||
| ret = [set(), set(), set(), set()] |
Collaborator
There was a problem hiding this comment.
are the change covered by tests already?
Member
Author
There was a problem hiding this comment.
No, and this function isn't used anymore in our codebase, so we need to add a deprecation for it, not sure it's worth writing tests. This is a partial revert of 148ab65#diff-82fcd731ec72549bfb31e9ea159677c198bc8996b39b514db4fe0c9b6a5a0914 btw
HosseinSayyedMousavi
pushed a commit
to HosseinSayyedMousavi/django-rest-framework
that referenced
this pull request
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In 148ab65 we inadvertently broke the return value of
order_by_precedencefrom alist[set[str]]to alist[set[_MediaType]]by trying to reuse some logic. This function is actually no longer used hence why it went unnoticed. Restoring the old function as it was before.