django-rest-framework
django-rest-framework copied to clipboard
fix: MultipleChoiceField use ordered sort
This modification has the following advantages:
- Maintain the input order.
- Prevent the output from being a set, which would cause issues with JSON serialization (e.g., when passing parameters to certain third-party SDKs that may internally use json.dumps, and I cannot modify the third party's encoder).
please also add unit tests to verify this and make the CI green
I’ve added the tests and the CI is green now.
Seems sensible to me 👍🏻
However, it will have to wait for 3.17 as I see this as potentially disruptive for some downstream users. Left a small suggestion
Good point — waiting for 3.17 sounds like the right call. Appreciate the suggestion!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.