Skip to content
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

PEPs API: handle name with commas in CSV author list #4211

Open
hugovk opened this issue Jan 18, 2025 · 2 comments · May be fixed by #4226
Open

PEPs API: handle name with commas in CSV author list #4211

hugovk opened this issue Jan 18, 2025 · 2 comments · May be fixed by #4226
Labels
bug infra Core infrastructure for building and rendering PEPs

Comments

@hugovk
Copy link
Member

hugovk commented Jan 18, 2025

The authors field in the API is a comma-separated list:

https://peps.python.org/api/peps.json

For example: "authors": "Barry Warsaw, Jeremy Hylton, David Goodger, Alyssa Coghlan"

However, there's at least one name with a comma: "authors": "Fred L. Drake, Jr."

Let's handle this properly, perhaps using the csv module?

Thanks to @davep for finding this.

@hugovk hugovk added bug infra Core infrastructure for building and rendering PEPs labels Jan 18, 2025
@davep
Copy link
Contributor

davep commented Jan 18, 2025

Given any change could inevitably have an impact on any tools out there using this data, which probably handle this anyway, might it not make sense to add a parallel property that is an actual JSON list of authors? This way no additional handling is needed by a client (they're already parsing JSON) and the format remains backward-compatible.

@hugovk
Copy link
Member Author

hugovk commented Jan 18, 2025

Yes, that sounds sensible.

This will likely need an update to the source PEPs as well:

Author: Barry Warsaw, Jeremy Hylton, David Goodger, Alyssa Coghlan
Author: Fred L. Drake, Jr. <fred@fdrake.net>

PEP 1 defines this as part of a "RFC 2822 style header preamble":

Author: <list of authors' names and optionally, email addrs>

@AA-Turner AA-Turner linked a pull request Jan 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug infra Core infrastructure for building and rendering PEPs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants