Please revert the change to ListSerializer from #9837 and offer a deprecation path for the way responses come back #10018
Replies: 2 comments 3 replies
|
I had noticed a reply to this discussion, and I was set to respond to it in detail, but I'll reiterate my concern that this is a major breaking change, and should be handled in a more structured way to let us migrate to a better pattern:
Having this change in a minor or a patch version would throw off a lot of people who aren't expecting a breaking change to come up in this fashion. Not every project needs to adhere to SemVer, and I don't see anywhere that states that this one is, but given that our team was anticipating a compatibility fix for Django 6.1 in #9978, we could be seen as understandably confused and a bit frustrated about this. I'm hoping that we can get somewhere on this soon; a non-trivial amount of work would have to go in to ensure compatibility with the error formatting in this serializer that we didn't anticipate would be coming up. |
|
I've suspected that this change might be disruptive when we merged it but went ahead anyway as it felt like an improvement. I considered doing a deprecation but felt like it was a kind of change that would be difficult to support 2 behaviour, but maybe that was lazy on my part...
3.18 is NOT a minor change, we're never going to release a version 4 of DRF and when we bump the 2nd digit in the version, there ARE breaking changes, which are clearly outlined in the release notes, if these people would care to read it. Now, that begs the question whether our versioning scheme is worth revising, (especially as Django is moving to calendar versioning). I think we could communicate expectations better and avoid users confusion. When a project doesn't use SemVer, it's often better to not have version numbers that looks like SemVer, which avoid these kind of conversations entirely...
Adding a deprecation would delay the pain, and I'm a bit concerned that we would hit the same issue when we eventually remove the deprecation. What kind of compatibility layer would you expect? I get that you want to be able to opt-in the new shape, but how would you want to control this? A project setting? How is it different than updating DRF and fixing it as part of the upgrade? |
Uh oh!
There was an error while loading. Please reload this page.
I've been waiting a bit for the release of 3.18 to help allow us upgrade to Django 6.1, but we've encountered a potential breaking bug for how the response comes back. Notably, the change is in #9837.
In short, changing from lists to dicts makes perfect sense from a compatibility and alignment standpoint, but because these are different data structures, if we pass these along to an upstream UI on their own (and that UI then iterates over errors, for instance), then we have to update a lot of upstream APIs.
I recognize that this is still the right way to do it, but we need more time than a minor version to upgrade code. I'm maintaining a lot of repositories that leverage
ListSerializerwhich would be impacted by this, which would induce a lot of extra work on our end.Could this change be reverted or made at least opt-in until a major release instead?
All reactions