FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Infra: Add Sponsor to the PEPs API by Secrus · Pull Request #4804 · python/peps · GitHub

/ peps Public

Infra: Add Sponsor to the PEPs API - #4804

Open
Secrus wants to merge 1 commit into
python:mainfrom
Secrus:add-sponsor-to-api
Open

Infra: Add Sponsor to the PEPs API#4804
Secrus wants to merge 1 commit into
python:mainfrom
Secrus:add-sponsor-to-api

Conversation

Secrus commented Feb 3, 2026
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Contributor

Adds Sponsor information to the PEP details, targeted mostly for API access


📚 Documentation preview 📚: https://pep-previews--4804.org.readthedocs.build/

Secrus requested a review from AA-Turner as a code owner February 3, 2026 13:20

python-cla-bot Bot commented Feb 3, 2026
edited
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

Secrus force-pushed the add-sponsor-to-api branch from 550a6c9 to 139ad22 Compare February 3, 2026 13:21
Secrus marked this pull request as draft February 3, 2026 13:22
Secrus force-pushed the add-sponsor-to-api branch 3 times, most recently from c794e17 to 2680d2c Compare February 3, 2026 13:34
hugovk added the infra Core infrastructure for building and rendering PEPs label Feb 3, 2026
hugovk changed the title Add Sponsor to the PEP API Infra: Add Sponsor to the PEPs API Feb 3, 2026
Secrus force-pushed the add-sponsor-to-api branch from 2680d2c to 8d14d70 Compare February 3, 2026 13:37
Secrus marked this pull request as ready for review February 3, 2026 13:40

johnslavik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks! Some thoughts.

Comment on lines +21 to +38
_frozen_ordered = dataclasses.dataclass(order=True, frozen=True)


@_frozen_ordered
class _Participant:
"""Represent PEP participant."""
full_name: str # The participant's name.
email: str # The participant's email address.


@_frozen_ordered
class _Author(_Participant):
"""Represent PEP authors."""
full_name: str # The author's name.
email: str # The author's email address.


@_frozen_ordered
class _Sponsor(_Participant):
"""Represent PEP sponsors."""

johnslavik Feb 8, 2026
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Consider not creating an alias here, obeying the locality of behavior rule (LoB) and keeping separate classes slightly more self-contained. Consider using dataclasses.field(doc=...).

Suggested change
_frozen_ordered = dataclasses.dataclass(order=True, frozen=True)
@_frozen_ordered
class _Participant:
"""Represent PEP participant."""
full_name: str # The participant's name.
email: str # The participant's email address.
@_frozen_ordered
class _Author(_Participant):
"""Represent PEP authors."""
full_name: str # The author's name.
email: str # The author's email address.
@_frozen_ordered
class _Sponsor(_Participant):
"""Represent PEP sponsors."""
@dataclasses.dataclass(order=True, frozen=True)
class _Participant:
"""Represent PEP participant."""
full_name: str = dataclasses.field(doc="The participant's name.")
email: str = dataclasses.field(doc="The participant's email address.")
@dataclasses.dataclass(order=True, frozen=True)
class _Author(_Participant):
"""Represent PEP authors."""
full_name: str = dataclasses.field(doc="The author's name.")
email: str = dataclasses.field(doc="The author's email address.")
@dataclasses.dataclass(order=True, frozen=True)
class _Sponsor(_Participant):
"""Represent PEP sponsors."""

Comment on lines +221 to +230



def _parse_author(data: str) -> list[_Author]:
"""Return a list of author names and emails."""
return [_Author(author, email) for author, email in _parse_participants(data)]

def _parse_sponsor(data: str) -> _Sponsor:
"""Return sponsor name and email"""
return _Sponsor(*_parse_participants(data)[0])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Formatting nits

Suggested change
def _parse_author(data: str) -> list[_Author]:
"""Return a list of author names and emails."""
return [_Author(author, email) for author, email in _parse_participants(data)]
def _parse_sponsor(data: str) -> _Sponsor:
"""Return sponsor name and email"""
return _Sponsor(*_parse_participants(data)[0])
def _parse_author(data: str) -> list[_Author]:
"""Return a list of author names and emails."""
return [_Author(author, email) for author, email in _parse_participants(data)]
def _parse_sponsor(data: str) -> _Sponsor:
"""Return sponsor name and email"""
return _Sponsor(*_parse_participants(data)[0])

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra Core infrastructure for building and rendering PEPs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL