GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Decouple and unify PEP header processing for rendering, PEP 0, JSON, RSS and linting · Issue #2587 · python/peps

Decouple and unify PEP header processing for rendering, PEP 0, JSON, RSS and linting #2587

New issue
Copy link
New issue
Copy link
Open
Open
Decouple and unify PEP header processing for rendering, PEP 0, JSON, RSS and linting#2587
Copy link
Labels
infraCore infrastructure for building and rendering PEPsCore infrastructure for building and rendering PEPs

Description

@CAM-Gerlach
CAM-Gerlach
opened on May 8, 2022
Issue body actions

As a followup to #2584 and #2585 and as I've already been thinking about lately and discussed with @JelleZijlstra and @warsaw at PyCon, right now we parse the headers three different places with three different sets of logic:

  • pep_zero_generator.parser for PEP 0, the JSON and the RSS with some additional sub-parsing in those callers
  • pep_processor.transforms.header_transform for the PEP rendering
  • The .pre-commit-config.yaml pygrep hooks for linting),

Instead, we should just use the structured format I suggest in #2584 (with the parsing presumably in the PEP class) for all of them (starting with PEP rendering initially), for several reasons:

  • Simpler, more DRY, reliable and maintainable in the long run
  • Easier to add new headers in one central place, as in Sub-index pages for specific categories of PEPs (Packaging, etc) #2572
  • Enables simplifying/loosening the allowed input syntax for authors without fear of breaking anything
  • Simplifies adding requested features in the various outputs (e.g. :abbr: from Waste less vertical space at top of rendered PEP #2514 )
  • Decouples the header format from reST/Sphinx and ensures the format-independence @AA-Turner originally wanted in PEP 1 & 12: Have Post-History link posts to preserve Discussions-To history #2358
  • Avoids cryptic regexes for linting (as @hugovk requested on Lint: Update headers and checks per current guidance & provide helpful feedback #2484)

Of course, we should decide on and implement the structured format proposed in #2584 first, as it is a perquisite for this (alongside the changes in #2585 and #2579 needing to be merged before work on this begins), but I've opened this to keep track of it.

Activity

  1. CAM-Gerlach
    added
    infraCore infrastructure for building and rendering PEPsCore infrastructure for building and rendering PEPs
    on May 8, 2022
  2. python
    deleted a comment from on Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infraCore infrastructure for building and rendering PEPsCore infrastructure for building and rendering PEPs

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.