steering-council
steering-council copied to clipboard
PEP 712 -- Adding a “converter” parameter to dataclasses.field
Pretty pretty please consider PEP 712 -- Adding a “converter” parameter to dataclasses.field https://peps.python.org/pep-0712/
- [x] The PEP has been discussed in threads listed in its
Post-Historyheader - [x] The PEP was announced on Discuss (link in
Post-History) - [x] The PEP includes all relevant Suggested Sections
- [x] The PEP includes endorsements from the projects/groups/people it helps
- [x] The PEP has a CODEOWNERS entry
- [x] The PEP author is really excited to simply be making a PEP, and is extremely grateful and honored by the Steering Council's time and effort put into this PEP and beyond :heart:
Hope everyone is having a good time.
Here's a gif from one of my favorite movies, Clue. I think it's representative of how I imagine the SC discusses, and then announces decisisons :smile:

Thanks for the nice PEP! We've posted our initial reply: https://discuss.python.org/t/pep-712-adding-a-converter-parameter-to-dataclasses-field/26126/57
This SC is not leaning towards accepting this PEP as is, but we are open to being convinced by the community to change our minds (realistically: letting the next elected SC change their minds). Thus, keeping this issue open.
@gpshead I guess that makes you Tim Curry :smile:
In keeping the comments mirrored between here and Discourse: https://discuss.python.org/t/pep-712-adding-a-converter-parameter-to-dataclasses-field/26126/58?u=thejcannon
Specifically, what's the gut-feel on rejection of this, but approval of a scoped-down version only to dataclass_transform. Currently typecheckers either don't handle or special-case attrs's conversion semantics, which means any other library (first or third party) is un-typecheckable.
My personal gut feel is that there is still a way forward to the ultimate feature people are wanting behind all of this (without the existing "just override dunder methods" approach or a "just go use attrs" disappointment). I haven't had time to settle on my thoughts. I'll follow up on the Discuss thread once I do. I suggest we keep all conversation there on Discuss. Scoping it to dataclass_transform might make sense - see what others say on thread. (I haven't caught up with and re-read the current discussion)
Like I tried to have our SC response say: This isn't rejected yet, we just weren't convinced yet and our default response is not a presumed "yes" in that scenario.
Our goal is for more collective consensus on why, one way or another. There is clearly user support for the conversion concept. So future 2024-SC after more public discussion (and probably updates to the PEP to record whatever comes of that) still has time to consider it for 3.13, and if future-SC does ultimately reject it, we should better explain why (ideally in unsurprising ways that should already be reflected somewhere within the discussion thread by that point).
We’re not always ready for it or upon inspection find that the PEP could use more discussion, and by the time we make ourselves time to come to this realization that can mean a delayed reply that doesn’t please anyone (like our PEP-712 response and the feeling of limbo you I suspect some feel we left that in).
(quoting from gpshead's SC nomination)
Just wanted to chime in and say that I actually really appreciated the SC's approach to this PEP. I thought the feedback was very concrete and allowed for an element of clearly constrained dialogue that I think is healthy and hopefully will help us all make decisions with more clarity.
As the PEP author, I like the candor. I like the SC wanting to participate in the discussion, and the earlier the better. That certainly feels more like "steering". And honesty is great.
However, I think this particular messaging might've been a little too honest. Divulging that as-is it's unlikely to go in, turned it from conversation to convincing. That's reflected in the tone of the replies.
So I love the direction, not so much the execution of this one 🥲
(If anyone wants to continue this discussion, let's start a thread on Discourse, I'll copy my reply there)
However, I think this particular messaging might've been a little too honest. Divulging that as-is it's unlikely to go in, turned it from conversation to convincing. That's reflected in the tone of the replies.
Unfortunately the alternative is outright rejection. The SC basically accepts, rejects, or sends PEPs back for changes; we don't really have other options here when it comes to PEPs sent to us.
If you would prefer to not deal with the replies on Discourse you can withdraw the PEP yourself or tell us you do not want to change the PEP, in which case we can reject it. Otherwise this is part of the overall PEP process.
The SC basically accepts, rejects, or sends PEPs back for changes; we don't really have other options here when it comes to PEPs sent to us.
Perhaps I'm just really dense (it's a real possibility), but the decision post on Discourse didn't scream "this PEP was sent back for changes".
To quote:
Q: Is there a compelling reason for dataclass field converters to be in the standard library that we’re just missing?
It is good to see people piping up on this thread who do want the feature. It would be interesting to know how important that is and if you already do, or why you don’t, use something like attrs today just to have it.
The answer, to me, felt like "we want to see more discussion before we're convinced", which my impression was that, divulging it's on the path to rejection, set the tone for the discussion.
Now, it could also be that I just completely missed the "we're sending your PEP back for revision" in the message. In which case, as feedback from a first-time PEPer, that should ideally be stated clearly :sweat_smile: and I'll try and aggregate the discussion into a more convincing argument.
Perhaps I'm just really dense (it's a real possibility), but the decision post on Discourse didn't scream "this PEP was sent back for changes".
To quote:
Q: Is there a compelling reason for dataclass field converters to be in the standard library that we’re just missing? It is good to see people piping up on this thread who do want the feature. It would be interesting to know how important that is and if you already do, or why you don’t, use something like attrs today just to have it.
The answer, to me, felt like "we want to see more discussion before we're convinced", which my impression was that, divulging it's on the path to rejection, set the tone for the discussion.
It's our job to be honest, not to win support for your PEP. I'm sorry if you didn't like that honesty, but it was either that or rejection. We prefer to be open about why we are sending a PEP back for more consideration instead of accepting it or rejecting it, else people ask. Otherwise the other option was rejecting it outright and we assumed you would have preferred not for that to happen.
Official rejection notice for PEP 712 just posted. Thank you to all who contributed.