-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Labels
metaRelated to the repo itself and its processesRelated to the repo itself and its processes
Description
Dear fellow @python/pep-editors,
This came up in #3618, the build failed because the PEP author has previously used his personal email address in other PEPs, but his work email in this new PEP:
Is it a hard requirement that authors must use the same email for all PEPs?
Or can we allow authors to use whichever they find most appropriate for each PEP?
Code-wise, we'd need at least need to modify _verify_email_addresses:
- not to raise if more than one email
- and in the PEP 0 table of names & emails:
- print just one email
- print all emails
- or even ditch that table altogether
peps/pep_sphinx_extensions/pep_zero_generator/writer.py
Lines 311 to 341 in 2cbb99c
| def _verify_email_addresses(peps: list[PEP]) -> dict[str, str]: | |
| authors_dict: dict[str, set[str]] = {} | |
| for pep in peps: | |
| for author in pep.authors: | |
| # If this is the first time we have come across an author, add them. | |
| if author.full_name not in authors_dict: | |
| authors_dict[author.full_name] = set() | |
| # If the new email is an empty string, move on. | |
| if not author.email: | |
| continue | |
| # If the email has not been seen, add it to the list. | |
| authors_dict[author.full_name].add(author.email) | |
| valid_authors_dict: dict[str, str] = {} | |
| too_many_emails: list[tuple[str, set[str]]] = [] | |
| for full_name, emails in authors_dict.items(): | |
| if len(emails) > 1: | |
| too_many_emails.append((full_name, emails)) | |
| else: | |
| valid_authors_dict[full_name] = next(iter(emails), "") | |
| if too_many_emails: | |
| err_output = [] | |
| for author, emails in too_many_emails: | |
| err_output.append(" " * 4 + f"{author}: {emails}") | |
| raise ValueError( | |
| "some authors have more than one email address listed:\n" | |
| + "\n".join(err_output) | |
| ) | |
| return valid_authors_dict |
Metadata
Metadata
Assignees
Labels
metaRelated to the repo itself and its processesRelated to the repo itself and its processes