-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
PEP 712: Adding a "converter" parameter to dataclasses.field #3095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Just a reminder, before making further changes locally, I suggest you directly apply all the suggestions you want in one go by going to Also, all of the checklist items should be addressed by either suggestions or at least review comments, except for the three suggested sections that are not present. My recommendations for them:
|
|
@thejcannon Hi! Suggestion: as you're a new contributor to this repo, would you like to pick one file that has a typo from here and make a PR to fix it? We can then merge it right away, and then we won't need to click "Approve and run" for the CI here each time as we iterate through review rounds :) |
|
@CAM-Gerlach thanks for your time and the thorough review, especially with suggestions. 🙌 |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Various followup fixes, thanks. This is starting to look pretty good from a PEP editor point of view, (though it'll need further review on the technical merits by your sponsor before merging of course).
Just FYI, as mentioned previously, you can directly apply all the suggestions you want in one go automatically by going to Files changed -> Clicking Add to batch on each suggestion -> When done, clicking Commit. This saves you time manually replicating them yourself, and us time reviewing that they were applied correctly.
CAM-Gerlach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple minor suggestions on the followup changes, and re-iterating one previous suggestion that was not applied, mistakenly manually resolved and is still resulting in a build warning.
Also, not sure where my checklist went; my entire initial review comment seems to have completely disappeared (and its not even possible for to delete such even intentionally, as far as I can tell).
Reminder: You can directly apply all the suggestions you want in one go by going to Files changed -> Clicking Add to batch on each suggestion -> When done, clicking Commit
CAM-Gerlach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny nit, otherwise LGTM from a PEP editor perspective bar the things your sponsor (and anyone else concerned) should review (and of course any other comments they have).
Since somehow it seems GitHub mysteriously deleted the original checklist after I'd posted and updated at some length, here it is for the record:
Basic requirements (all PEP Types)
- Read and followed PEP 1 & PEP 12
- File created from the latest PEP template
- PEP has next available number, & set in filename (
pep-NNNN.rst), PR title (PEP 123: <Title of PEP>) andPEPheader - Title clearly, accurately and concisely describes the content in 79 characters or less
- Core dev/PEP editor listed as
AuthororSponsor, and formally confirmed their approval -
Author,Status(Draft),TypeandCreatedheaders filled out correctly -
PEP-Delegate,Topic,RequiresandReplacesheaders completed if appropriate - Required sections included
- Abstract (first section)
- Copyright (last section; exact wording from template required)
- Code is well-formatted (PEP 7/PEP 8) and is in code blocks, with the right lexer names if non-Python
- PEP builds with no warnings, pre-commit checks pass and content displays as intended in the rendered HTML
- Authors/sponsor added to
.github/CODEOWNERSfor the PEP
Standards Track requirements
- PEP topic discussed in a suitable venue with general agreement that a PEP is appropriate
- Suggested sections included (unless not applicable)
- Motivation
- Rationale
- Specification
- Backwards Compatibility
- Security Implications
- How to Teach This
- Reference Implementation
- Rejected Ideas
-
Python-Versionset to valid (pre-beta) future Python version, if relevant -
Any project stated in the PEP as supporting/endorsing/benefiting from the PEP formally confirmed such - Right before or after initial merging, PEP discussion thread created and linked to in
Discussions-ToandPost-History
|
I'm traveling and using my phone, so it's much easier for me if this shows up on peps.python.org before I review it, so I'll wait until it shows up there. |
|
If you wanted to, you could use the documentation preview: (direct link) https://pep-previews--3095.org.readthedocs.build/pep-0712/ |
|
@thejcannon : that's good to know, thanks! |
|
No worries. Looks like CI updates the PR description with a link to the preview docs containing the changes. That's how I found it |
|
Also, Thanks again @CAM-Gerlach for your feedback and patience. It is very much appreciated. |
JelleZijlstra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments.
Also, this introduces some fairly subtle behavior around typing, so it would be good to submit the PEP to the typing-sig email list for typing-specific feedback.
|
Thanks for your work on this @thejcannon! @erictraut may want to review this as well. |
Co-authored-by: Erik De Bonte <erikd@microsoft.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
Thank you sincerely @debonte and @erictraut , the suggested wording and feedback has made this look MUCH nicer and simpler. ...and sorry for what this means for type-checkers 😂 |
|
@thejcannon I’d just open a new one. |
FYI @ericvsmith
📚 Documentation preview 📚: https://pep-previews--3095.org.readthedocs.build/