Skip to content

RSS doesn't seem to work anymore? #2406

Closed

Description

@Jackenmen

I imagine that this is due to the recent change in PEPs infrastructure.
There is no information about specific PEPs here but lastBuildDate changes:
Screenshot_20220310-093645_Chrome.jpg

Activity

  1. hugovk commented on Mar 10, 2022

    @hugovk
    Member

    For reference https://peps.python.org/peps.rss shows only:

    <?xml version='1.0' encoding='UTF-8'?>
    <rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
      <channel>
        <title>Newest Python PEPs</title>
        <link>https://peps.python.org/peps.rss</link>
        <description>Newest Python Enhancement Proposals (PEPs) - Information on new language features, and some meta-information like release procedure and schedules.</description>
        <atom:link href="https://peps.python.org/peps.rss" rel="self"/>
        <docs>https://cyber.harvard.edu/rss/rss.html</docs>
        <language>en</language>
        <lastBuildDate>Thu, 10 Mar 2022 08:28:04 GMT</lastBuildDate>
      </channel>
    </rss>
  2. Jackenmen commented on Mar 10, 2022

    @Jackenmen
    ContributorAuthor

    Oh ye, this is what I've shown on the screenshot, I should have copied that instead, thanks!

  3. added
    infraCore infrastructure for building and rendering PEPs
    on Mar 10, 2022
  4. hugovk commented on Mar 10, 2022

    @hugovk
    Member

    I would prioritise fixing this in the new PEP build system.


    A quick look: the main problem is in generate_rss.py:

    def main():
        # get the directory with the PEP sources
        out_dir = Path(__file__).parent / "build"
    
        # get list of peps with creation time (from "Created:" string in pep source)
        peps_with_dt = sorted((pep_creation(path), path) for path in out_dir.glob("pep-????.*"))

    peps_with_dt is empty because there pep-????.*" matches no files in build/; it now contains directories of files like build/pep-0008/index.html.

    It's also expecting to run on source rst/txt files containing Created: lines, not target html files like:

    <dt class="field-even">Created</dt>
    <dd class="field-even">05-Jul-2001</dd>

    (Also, make pages runs make rss before generating the target html files, so build is actually empty, but it's expecting source rst/txt files.)

  5. CAM-Gerlach commented on Mar 10, 2022

    @CAM-Gerlach
    Member

    I've also been noticing a bunch of error messages (at least on the CI) when running it related to stuff it can't parse, but I'm not sure if those have anything to do with the problem reported here.

  6. hugovk commented on Mar 10, 2022

    @hugovk
    Member

    Please see PR #2407 for a fix.

    I've also been noticing a bunch of error messages (at least on the CI) when running it related to stuff it can't parse, but I'm not sure if those have anything to do with the problem reported here.

    Like this?

    $ python3 generate_rss.py
    <rst-doc>:556: (ERROR/3) PEP number must be a number from 0 to 9999; "PEP 586 mentions
    <586#backwards-compatibility>" is invalid.
    <rst-doc>:4: (ERROR/3) Unexpected indentation.
    <rst-doc>:5: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
    <rst-doc>:195: (ERROR/3) PEP number must be a number from 0 to 9999; "PEP 557 <557#id7>" is invalid.
    <rst-doc>:527: (ERROR/3) PEP number must be a number from 0 to 9999; "557 <557#inheritance>" is invalid.
    <rst-doc>:532: (ERROR/3) PEP number must be a number from 0 to 9999; "PEP 557 indicates <557#post-init-parameters>" is invalid.
    <rst-doc>:4: (ERROR/3) Unexpected indentation.
    <rst-doc>:5: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
    <rst-doc>:1202: (ERROR/3) PEP number must be a number from 0 to 9999; "PEP 484 specifies
    <484#suggested-syntax-for-python-2-7-and-straddling-code>" is invalid.

    Same stuff with the old one:

    $ python3 pep2rss.py .
    <rst-doc>:4: (ERROR/3) Unexpected indentation.
    <rst-doc>:5: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
    <rst-doc>:1202: (ERROR/3) PEP number must be a number from 0 to 9999; "PEP 484 specifies
    <484#suggested-syntax-for-python-2-7-and-straddling-code>" is invalid.
    <rst-doc>:4: (ERROR/3) Unexpected indentation.
    <rst-doc>:5: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
    <rst-doc>:195: (ERROR/3) PEP number must be a number from 0 to 9999; "PEP 557 <557#id7>" is invalid.
    <rst-doc>:527: (ERROR/3) PEP number must be a number from 0 to 9999; "557 <557#inheritance>" is invalid.
    <rst-doc>:532: (ERROR/3) PEP number must be a number from 0 to 9999; "PEP 557 indicates <557#post-init-parameters>" is invalid.
    <rst-doc>:556: (ERROR/3) PEP number must be a number from 0 to 9999; "PEP 586 mentions
    <586#backwards-compatibility>" is invalid.
  7. CAM-Gerlach commented on Mar 11, 2022

    @CAM-Gerlach
    Member

    I see, thanks, so its not a regression. Should we open another issue for that?

  8. hugovk commented on Mar 11, 2022

    @hugovk
    Member

    Sure! It's coming from the docutils RST parser; some warnings/errors may be invalid, but some might be things to fix in our code or the PEPs themselves. (I'm not sure if Sphinx uses the same parser.)

    Also, we're parsing the 10 most recent PEPs here, which will change over time.

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

    buginfraCore infrastructure for building and rendering PEPs

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions