Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c826909
Lint: Disable a couple potentially problematic/unneeded hooks
CAM-Gerlach Mar 29, 2022
e03b73c
Lint: Refine regex for existing Content-Type and PEP references checks
CAM-Gerlach Mar 29, 2022
8df4c4d
Lint: Refine regex for Python-Version check and fix a couple deviations
CAM-Gerlach Mar 29, 2022
2c98989
Lint: Refine regex for Created check and fix a couple deviations
CAM-Gerlach Mar 29, 2022
e75643e
Lint: Refine regex for Resolution check and fix a few deviations
CAM-Gerlach Mar 29, 2022
7abaaf3
Lint: Add new check for Post-History header
CAM-Gerlach Mar 29, 2022
ad6ba56
Lint: Add check for Discussions-To header link
CAM-Gerlach Mar 29, 2022
dd30fff
Lint: Add basic check for PEP title presense & excessive length
CAM-Gerlach Mar 29, 2022
309ec3c
Lint: Add check for PEP/BDFL-Delegate header
CAM-Gerlach Mar 30, 2022
b3fef66
Lint: Add check for Sponsor header
CAM-Gerlach Mar 30, 2022
eff7423
Lint: Add check for legacy Author field format
CAM-Gerlach Mar 30, 2022
a829dff
Lint: Add check for RST Author field
CAM-Gerlach Mar 30, 2022
90add11
Lint: Use more helpful, user-oriented descriptions for header checks
CAM-Gerlach Mar 30, 2022
3712bba
PEP 245: Add historical note and archive links to wiki page/email lsit
CAM-Gerlach Mar 31, 2022
afd0a40
PEP 628: Add direct link to resolution in acceptance message
CAM-Gerlach Mar 31, 2022
b51cde8
Lint: Explictly allow all valid RFC 2822 line continuations in headers
CAM-Gerlach Apr 1, 2022
a894d22
Lint: Tweak Post-History and Resolution checks to accept fragments
CAM-Gerlach Apr 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Lint: Refine regex for Resolution check and fix a few deviations
  • Loading branch information
CAM-Gerlach committed Apr 20, 2022
commit e75643e776b289cf5f6883e539715bca7c836197
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ repos:
- id: validate-resolution
name: "Validate PEP 'Resolution' field"
language: pygrep
entry: '(?<!\n\n)^Resolution: (?:(?!(https:\/\/\S*|:pep:`[a-zA-Z\d \-<>#]*?`)\n))'
entry: '(?<!\n\n)(?<=\n)Resolution: (?:(?!https://((discuss\.python\.org/t/([\w\-]+/)?\d+(/\d+)?/?)|(mail\.python\.org/pipermail/[\w\-]+/\d{4}-[A-Za-z]+/[A-Za-z0-9]+\.html)|(mail\.python\.org/archives/list/[\w\-]+@python\.org/(message|thread)/[A-Za-z0-9]+/?))\n(?=\n)))'
args: ['--multiline']
files: '^pep-\d+\.(rst|txt)$'
types: [text]
Expand Down
7 changes: 4 additions & 3 deletions pep-0042.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ Title: Feature Requests
Version: $Revision$
Last-Modified: $Date$
Author: Jeremy Hylton <jeremy@alum.mit.edu>
Status: Rejected
Status: Withdrawn
Type: Process
Content-Type: text/x-rst
Created: 12-Sep-2000
Post-History:
Resolution: https://github.com/python/peps/pull/108#issuecomment-249603204


.. note:: This PEP has been rejected as obsolete.
.. note:: This PEP has been `withdrawn as obsolete`_.
All new feature requests should either go to the `Python bug tracker`_
for very simple requests or the `python-ideas`_ mailing list for
everything else. The rest of this document is retained for historical
Expand Down Expand Up @@ -335,6 +334,8 @@ Building and Installing

.. _`Python bug tracker`: https://bugs.python.org
.. _`python-ideas`: https://mail.python.org/mailman/listinfo/python-ideas
.. _`withdrawn as obsolete`: https://github.com/python/peps/pull/108#issuecomment-249603204


..
Local Variables:
Expand Down
9 changes: 8 additions & 1 deletion pep-0211.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ Content-Type: text/x-rst
Created: 15-Jul-2000
Python-Version: 2.1
Post-History:
Resolution: :pep:`PEP 465 -- Rejected alternatives to adding a new operator <465#rejected-alternatives-to-adding-a-new-operator>`


.. note::

The approach in the later :pep:`465` was eventually accepted
in lieu of this PEP. The :pep:`Rejected Ideas
<465#rejected-alternatives-to-adding-a-new-operator>`
of that PEP explains the rationale in more detail.


Introduction
Expand Down
9 changes: 8 additions & 1 deletion pep-0225.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ Content-Type: text/x-rst
Created: 19-Sep-2000
Python-Version: 2.1
Post-History:
Resolution: :pep:`PEP 465 -- Rejected alternatives to adding a new operator <465#rejected-alternatives-to-adding-a-new-operator>`


.. note::

The approach in the later :pep:`465` was eventually accepted
in lieu of this PEP. The :pep:`Rejected Ideas
<465#rejected-alternatives-to-adding-a-new-operator>`
of that PEP explains the rationale in more detail.


Introduction
Expand Down
2 changes: 2 additions & 0 deletions pep-0465.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Content-Type: text/x-rst
Created: 20-Feb-2014
Python-Version: 3.5
Post-History: 13-Mar-2014
Resolution: https://mail.python.org/archives/list/python-dev@python.org/message/D63NDWHPF7OC2Z455MPHOW6QLLSNQUJ5/


Abstract
========
Expand Down
1 change: 0 additions & 1 deletion pep-0628.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Content-Type: text/x-rst
Created: 28-Jun-2011
Python-Version: 3.6
Post-History: 28-Jun-2011
Resolution: https://bugs.python.org/issue12345

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.

Looks like this thread does include the resolution, Guido's "I'm just going to do this" at https://bugs.python.org/issue12345#msg272287 ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I see; I'd elided the link from here since it didn't link directly to any resolution message, just a BPO issue, was the one remaining special-case for both the rendering and validation logic for this field, and was already mentioned and linked in the PEP Acceptance notice just below it.

In any case, thanks to your feedback, I went ahead and linked accepted in that block directly to the message above, while retaining the existing link to the issue itself.

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.

Worth noting that BPO will move to GitHub soon (expected next weekend). There will be redirects provided, but not sure they'll work for individual messages.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

My understanding from following that is that redirects will be available, but they won't be the current URLs, and BPO won't be shut down, it will only become read-only. So this URL should continue to work, like the many others in PEPs. If per-message linking stopped working, that would be a pretty significant breakage. See @hugovk 's reply to my question in the thread, quoting psf/gh-migration#17 ,

However, I understand its not 100% clear from either the Discourse thread or the devguide documentation (which took quite a bit of digging in the PR preview to even find). I can ask @ambv to confirm there.

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.

Maybe while we wait for GitHub to allow the migration we could update the PEP for the migration with details like which urls will redirect where?

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.

If you want to link to the message directly you basically have two options:

  • keep the current bpo link, that will continue to work for the foreseeable future (bpo will be around in read-only mode);
  • wait until the migration is complete, and replace the bpo link with a link to the corresponding GitHub comment.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

keep the current bpo link, that will continue to work for the foreseeable future (bpo will be around in read-only mode)

Given PEPs are historical documents, I don't see a problem with retaining the BPO links for existing, non-Draft/Active PEPs.

On a related note, I was thinking of adding :bpo: and :gh; roles, based on the current :issue: and :gh: in the CPython documentation, much like we do for :pep: and :rfc:. This would make linking to BPO and GitHub issues and PRs easier (just enter the number and it does the rest), while allowing us to make the render nicely and consistently, and most importantly easily update where the links point and how they render without having to touch any individual PEP or require authors to do anything extra. For example, we could (if we wanted/needed) switch :bpo: to point to the BPO redirect service to automatically redirect to the corresponding GitHub issue.



Abstract
Expand Down
4 changes: 2 additions & 2 deletions pep-0644.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Content-Type: text/x-rst
Created: 27-Oct-2020
Python-Version: 3.10
Post-History: 27-Oct-2020, 03-Mar-2021, 17-Mar-2021, 17-Apr-2021
Resolution: https://mail.python.org/archives/list/python-dev@python.org/message/INLCO2EZVQW7R7J2OL6HWVLVU3TQRAZV/,
https://bugs.python.org/issue43669
Resolution: https://mail.python.org/archives/list/python-dev@python.org/message/INLCO2EZVQW7R7J2OL6HWVLVU3TQRAZV/


Abstract
========
Expand Down
3 changes: 2 additions & 1 deletion pep-0660.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Type: Standards Track
Content-Type: text/x-rst
Created: 30-Mar-2021
Post-History:
Resolution: https://discuss.python.org/t/pronouncement-on-peps-660-and-662-editable-installs
Resolution: https://discuss.python.org/t/pronouncement-on-peps-660-and-662-editable-installs/9450


Abstract
========
Expand Down
3 changes: 2 additions & 1 deletion pep-0662.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Type: Standards Track
Content-Type: text/x-rst
Created: 28-May-2021
Post-History:
Resolution: https://discuss.python.org/t/pronouncement-on-peps-660-and-662-editable-installs
Resolution: https://discuss.python.org/t/pronouncement-on-peps-660-and-662-editable-installs/9450


Abstract
========
Expand Down