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

Add PEP abstract to the RSS feed #1679

Merged
merged 3 commits into from
Jul 12, 2021
Merged

Add PEP abstract to the RSS feed #1679

merged 3 commits into from
Jul 12, 2021

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 23, 2020

Fixes #1085.

This uses docutils to fetch the first paragraph of the PEP abstract and uses that as the <description>, and move the PEP author to <author>.

Also run the script on the CI to make sure it runs without errors, fix some Flake8 things, and corrects the usage comment.

Check individual commits to see Flake8 stuff separate from new stuff.

Demo

Here's for before and after peps.rss, including a pair put through an XML tidy to ease comparison.

before, raw
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Newest Python PEPs</title><link>http://www.python.org/dev/peps</link><description>Newest Python Enhancement Proposals (PEPs) - Information on new
language features, and some meta-information like release
procedure and schedules</description><lastBuildDate>Fri, 23 Oct 2020 16:19:36 GMT</lastBuildDate><generator>PyRSS2Gen-1.1.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>PEP 640: Unused variable syntax</title><link>http://www.python.org/dev/peps/pep-0640</link><description>Author: Thomas Wouters &lt;[email protected]&gt;</description><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0640</guid><pubDate>Sun, 04 Oct 2020 00:00:00 GMT</pubDate></item><item><title>PEP 638: Syntactic Macros</title><link>http://www.python.org/dev/peps/pep-0638</link><description>Author: Mark Shannon &lt;[email protected]&gt;</description><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0638</guid><pubDate>Thu, 24 Sep 2020 00:00:00 GMT</pubDate></item><item><title>PEP 636: Structural Pattern Matching: Tutorial</title><link>http://www.python.org/dev/peps/pep-0636</link><description>Author: Daniel F Moisset &lt;[email protected]&gt;</description><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0636</guid><pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate></item><item><title>PEP 635: Structural Pattern Matching: Motivation and Rationale</title><link>http://www.python.org/dev/peps/pep-0635</link><description>Author: Tobias Kohn &lt;[email protected]&gt;,</description><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0635</guid><pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate></item><item><title>PEP 634: Structural Pattern Matching: Specification</title><link>http://www.python.org/dev/peps/pep-0634</link><description>Author: Brandt Bucher &lt;[email protected]&gt;,</description><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0634</guid><pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate></item><item><title>PEP 632: Deprecate distutils module</title><link>http://www.python.org/dev/peps/pep-0632</link><description>Author: Steve Dower &lt;[email protected]&gt;</description><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0632</guid><pubDate>Thu, 03 Sep 2020 00:00:00 GMT</pubDate></item><item><title>PEP 630: Isolating Extension Modules</title><link>http://www.python.org/dev/peps/pep-0630</link><description>Author: Petr Viktorin &lt;[email protected]&gt;</description><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0630</guid><pubDate>Tue, 25 Aug 2020 00:00:00 GMT</pubDate></item><item><title>PEP 637: Support for indexing with keyword arguments</title><link>http://www.python.org/dev/peps/pep-0637</link><description>Author: Stefano Borini</description><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0637</guid><pubDate>Mon, 24 Aug 2020 00:00:00 GMT</pubDate></item><item><title>PEP 631: Dependency specification in pyproject.toml based on PEP 508</title><link>http://www.python.org/dev/peps/pep-0631</link><description>Author: Ofek Lev &lt;[email protected]&gt;</description><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0631</guid><pubDate>Thu, 20 Aug 2020 00:00:00 GMT</pubDate></item><item><title>PEP 629: Versioning PyPI's Simple API</title><link>http://www.python.org/dev/peps/pep-0629</link><description>Author: Donald Stufft &lt;[email protected]&gt;</description><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0629</guid><pubDate>Thu, 16 Jul 2020 00:00:00 GMT</pubDate></item></channel></rss>
after, raw
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Newest Python PEPs</title><link>http://www.python.org/dev/peps</link><description>Newest Python Enhancement Proposals (PEPs) - Information on new
language features, and some meta-information like release
procedure and schedules</description><lastBuildDate>Fri, 23 Oct 2020 16:19:08 GMT</lastBuildDate><generator>PyRSS2Gen-1.1.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>PEP 640: Unused variable syntax</title><link>http://www.python.org/dev/peps/pep-0640</link><description>This PEP proposes new syntax for unused variables, providing a pseudo-name
that can be assigned to but not otherwise used. The assignment doesn't
actually happen, and the value is discarded instead.</description><author>Thomas Wouters &lt;[email protected]&gt;</author><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0640</guid><pubDate>Sun, 04 Oct 2020 00:00:00 GMT</pubDate></item><item><title>PEP 638: Syntactic Macros</title><link>http://www.python.org/dev/peps/pep-0638</link><description>This PEP adds support for syntactic macros to Python.
A macro is a compile-time function that transforms
a part of the program to allow functionality that cannot be
expressed cleanly in normal library code.</description><author>Mark Shannon &lt;[email protected]&gt;</author><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0638</guid><pubDate>Thu, 24 Sep 2020 00:00:00 GMT</pubDate></item><item><title>PEP 636: Structural Pattern Matching: Tutorial</title><link>http://www.python.org/dev/peps/pep-0636</link><description>This PEP is a tutorial for the pattern matching introduced by PEP 634.</description><author>Daniel F Moisset &lt;[email protected]&gt;</author><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0636</guid><pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate></item><item><title>PEP 635: Structural Pattern Matching: Motivation and Rationale</title><link>http://www.python.org/dev/peps/pep-0635</link><description>This PEP provides the motivation and rationale for PEP 634
("Structural Pattern Matching: Specification").  First-time readers
are encouraged to start with PEP 636, which provides a gentler
introduction to the concepts, syntax and semantics of patterns.</description><author>Tobias Kohn &lt;[email protected]&gt;,</author><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0635</guid><pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate></item><item><title>PEP 634: Structural Pattern Matching: Specification</title><link>http://www.python.org/dev/peps/pep-0634</link><description>This PEP provides the technical specification for the match
statement.  It replaces PEP 622, which is hereby split in three parts:</description><author>Brandt Bucher &lt;[email protected]&gt;,</author><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0634</guid><pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate></item><item><title>PEP 632: Deprecate distutils module</title><link>http://www.python.org/dev/peps/pep-0632</link><description>The distutils module 1 has for a long time recommended using the
setuptools package 2 instead. Setuptools has recently integrated a
complete copy of distutils and is no longer dependent on the standard
library 3. Pip has been silently replacing distutils with
setuptools when installing packages for a long time already, and the
distutils documentation has stated that it is being phased out since
2014 (or earlier). It is time to remove it from the standard library.</description><author>Steve Dower &lt;[email protected]&gt;</author><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0632</guid><pubDate>Thu, 03 Sep 2020 00:00:00 GMT</pubDate></item><item><title>PEP 630: Isolating Extension Modules</title><link>http://www.python.org/dev/peps/pep-0630</link><author>Petr Viktorin &lt;[email protected]&gt;</author><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0630</guid><pubDate>Tue, 25 Aug 2020 00:00:00 GMT</pubDate></item><item><title>PEP 637: Support for indexing with keyword arguments</title><link>http://www.python.org/dev/peps/pep-0637</link><description>At present keyword arguments are allowed in function calls, but not in
item access. This PEP proposes that Python be extended to allow keyword
arguments in item access.</description><author>Stefano Borini</author><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0637</guid><pubDate>Mon, 24 Aug 2020 00:00:00 GMT</pubDate></item><item><title>PEP 631: Dependency specification in pyproject.toml based on PEP 508</title><link>http://www.python.org/dev/peps/pep-0631</link><description>This PEP specifies how to write a project's dependencies in a
pyproject.toml file for packaging-related tools to consume
using the fields defined in PEP 621.</description><author>Ofek Lev &lt;[email protected]&gt;</author><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0631</guid><pubDate>Thu, 20 Aug 2020 00:00:00 GMT</pubDate></item><item><title>PEP 629: Versioning PyPI's Simple API</title><link>http://www.python.org/dev/peps/pep-0629</link><description>This PEP proposes adding a method for versioning the simple API so
that clients can determine which features of the simple API that a
specific repository supports.</description><author>Donald Stufft &lt;[email protected]&gt;</author><guid isPermaLink="true">http://www.python.org/dev/peps/pep-0629</guid><pubDate>Thu, 16 Jul 2020 00:00:00 GMT</pubDate></item></channel></rss>
before, tidied
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>Newest Python PEPs</title>
		<link>http://www.python.org/dev/peps</link>
		<description>Newest Python Enhancement Proposals (PEPs) - Information on new
language features, and some meta-information like release
procedure and schedules</description>
		<lastBuildDate>Fri, 23 Oct 2020 16:19:36 GMT</lastBuildDate>
		<generator>PyRSS2Gen-1.1.0</generator>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<item>
			<title>PEP 640: Unused variable syntax</title>
			<link>http://www.python.org/dev/peps/pep-0640</link>
			<description>Author: Thomas Wouters &lt;[email protected]&gt;</description>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0640</guid>
			<pubDate>Sun, 04 Oct 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 638: Syntactic Macros</title>
			<link>http://www.python.org/dev/peps/pep-0638</link>
			<description>Author: Mark Shannon &lt;[email protected]&gt;</description>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0638</guid>
			<pubDate>Thu, 24 Sep 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 636: Structural Pattern Matching: Tutorial</title>
			<link>http://www.python.org/dev/peps/pep-0636</link>
			<description>Author: Daniel F Moisset &lt;[email protected]&gt;</description>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0636</guid>
			<pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 635: Structural Pattern Matching: Motivation and Rationale</title>
			<link>http://www.python.org/dev/peps/pep-0635</link>
			<description>Author: Tobias Kohn &lt;[email protected]&gt;,</description>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0635</guid>
			<pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 634: Structural Pattern Matching: Specification</title>
			<link>http://www.python.org/dev/peps/pep-0634</link>
			<description>Author: Brandt Bucher &lt;[email protected]&gt;,</description>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0634</guid>
			<pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 632: Deprecate distutils module</title>
			<link>http://www.python.org/dev/peps/pep-0632</link>
			<description>Author: Steve Dower &lt;[email protected]&gt;</description>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0632</guid>
			<pubDate>Thu, 03 Sep 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 630: Isolating Extension Modules</title>
			<link>http://www.python.org/dev/peps/pep-0630</link>
			<description>Author: Petr Viktorin &lt;[email protected]&gt;</description>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0630</guid>
			<pubDate>Tue, 25 Aug 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 637: Support for indexing with keyword arguments</title>
			<link>http://www.python.org/dev/peps/pep-0637</link>
			<description>Author: Stefano Borini</description>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0637</guid>
			<pubDate>Mon, 24 Aug 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 631: Dependency specification in pyproject.toml based on PEP 508</title>
			<link>http://www.python.org/dev/peps/pep-0631</link>
			<description>Author: Ofek Lev &lt;[email protected]&gt;</description>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0631</guid>
			<pubDate>Thu, 20 Aug 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 629: Versioning PyPI's Simple API</title>
			<link>http://www.python.org/dev/peps/pep-0629</link>
			<description>Author: Donald Stufft &lt;[email protected]&gt;</description>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0629</guid>
			<pubDate>Thu, 16 Jul 2020 00:00:00 GMT</pubDate>
		</item>
	</channel>
</rss>
after, tidied
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>Newest Python PEPs</title>
		<link>http://www.python.org/dev/peps</link>
		<description>Newest Python Enhancement Proposals (PEPs) - Information on new
language features, and some meta-information like release
procedure and schedules</description>
		<lastBuildDate>Fri, 23 Oct 2020 16:19:08 GMT</lastBuildDate>
		<generator>PyRSS2Gen-1.1.0</generator>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<item>
			<title>PEP 640: Unused variable syntax</title>
			<link>http://www.python.org/dev/peps/pep-0640</link>
			<description>This PEP proposes new syntax for unused variables, providing a pseudo-name
that can be assigned to but not otherwise used. The assignment doesn't
actually happen, and the value is discarded instead.</description>
			<author>Thomas Wouters &lt;[email protected]&gt;</author>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0640</guid>
			<pubDate>Sun, 04 Oct 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 638: Syntactic Macros</title>
			<link>http://www.python.org/dev/peps/pep-0638</link>
			<description>This PEP adds support for syntactic macros to Python.
A macro is a compile-time function that transforms
a part of the program to allow functionality that cannot be
expressed cleanly in normal library code.</description>
			<author>Mark Shannon &lt;[email protected]&gt;</author>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0638</guid>
			<pubDate>Thu, 24 Sep 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 636: Structural Pattern Matching: Tutorial</title>
			<link>http://www.python.org/dev/peps/pep-0636</link>
			<description>This PEP is a tutorial for the pattern matching introduced by PEP 634.</description>
			<author>Daniel F Moisset &lt;[email protected]&gt;</author>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0636</guid>
			<pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 635: Structural Pattern Matching: Motivation and Rationale</title>
			<link>http://www.python.org/dev/peps/pep-0635</link>
			<description>This PEP provides the motivation and rationale for PEP 634
("Structural Pattern Matching: Specification").  First-time readers
are encouraged to start with PEP 636, which provides a gentler
introduction to the concepts, syntax and semantics of patterns.</description>
			<author>Tobias Kohn &lt;[email protected]&gt;,</author>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0635</guid>
			<pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 634: Structural Pattern Matching: Specification</title>
			<link>http://www.python.org/dev/peps/pep-0634</link>
			<description>This PEP provides the technical specification for the match
statement.  It replaces PEP 622, which is hereby split in three parts:</description>
			<author>Brandt Bucher &lt;[email protected]&gt;,</author>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0634</guid>
			<pubDate>Sat, 12 Sep 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 632: Deprecate distutils module</title>
			<link>http://www.python.org/dev/peps/pep-0632</link>
			<description>The distutils module 1 has for a long time recommended using the
setuptools package 2 instead. Setuptools has recently integrated a
complete copy of distutils and is no longer dependent on the standard
library 3. Pip has been silently replacing distutils with
setuptools when installing packages for a long time already, and the
distutils documentation has stated that it is being phased out since
2014 (or earlier). It is time to remove it from the standard library.</description>
			<author>Steve Dower &lt;[email protected]&gt;</author>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0632</guid>
			<pubDate>Thu, 03 Sep 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 630: Isolating Extension Modules</title>
			<link>http://www.python.org/dev/peps/pep-0630</link>
			<author>Petr Viktorin &lt;[email protected]&gt;</author>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0630</guid>
			<pubDate>Tue, 25 Aug 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 637: Support for indexing with keyword arguments</title>
			<link>http://www.python.org/dev/peps/pep-0637</link>
			<description>At present keyword arguments are allowed in function calls, but not in
item access. This PEP proposes that Python be extended to allow keyword
arguments in item access.</description>
			<author>Stefano Borini</author>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0637</guid>
			<pubDate>Mon, 24 Aug 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 631: Dependency specification in pyproject.toml based on PEP 508</title>
			<link>http://www.python.org/dev/peps/pep-0631</link>
			<description>This PEP specifies how to write a project's dependencies in a
pyproject.toml file for packaging-related tools to consume
using the fields defined in PEP 621.</description>
			<author>Ofek Lev &lt;[email protected]&gt;</author>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0631</guid>
			<pubDate>Thu, 20 Aug 2020 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>PEP 629: Versioning PyPI's Simple API</title>
			<link>http://www.python.org/dev/peps/pep-0629</link>
			<description>This PEP proposes adding a method for versioning the simple API so
that clients can determine which features of the simple API that a
specific repository supports.</description>
			<author>Donald Stufft &lt;[email protected]&gt;</author>
			<guid isPermaLink="true">http://www.python.org/dev/peps/pep-0629</guid>
			<pubDate>Thu, 16 Jul 2020 00:00:00 GMT</pubDate>
		</item>
	</channel>
</rss>

@brettcannon
Copy link
Member

@hugovk FYI there are no conflicts with this PR.

@hugovk
Copy link
Member Author

hugovk commented Oct 23, 2020

The conflicts were caused by my other PRs :) Now rebased and resolved!

@matrixise matrixise mentioned this pull request May 5, 2021
@ambv ambv merged commit e61ca95 into python:master Jul 12, 2021
@hugovk hugovk deleted the rss-abstract branch July 12, 2021 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding PEP abstract to the RSS feed?
4 participants