Repository navigation
Lint: Update headers and checks per current guidance & provide helpful feedback #2484
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
Merged
CAM-Gerlach
merged 17 commits into
python:main
from
CAM-Gerlach:lint-update-header-checks
Apr 20, 2022
Merged
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 e03b73c
Lint: Refine regex for existing Content-Type and PEP references checks
CAM-Gerlach 8df4c4d
Lint: Refine regex for Python-Version check and fix a couple deviations
CAM-Gerlach 2c98989
Lint: Refine regex for Created check and fix a couple deviations
CAM-Gerlach e75643e
Lint: Refine regex for Resolution check and fix a few deviations
CAM-Gerlach 7abaaf3
Lint: Add new check for Post-History header
CAM-Gerlach ad6ba56
Lint: Add check for Discussions-To header link
CAM-Gerlach dd30fff
Lint: Add basic check for PEP title presense & excessive length
CAM-Gerlach 309ec3c
Lint: Add check for PEP/BDFL-Delegate header
CAM-Gerlach b3fef66
Lint: Add check for Sponsor header
CAM-Gerlach eff7423
Lint: Add check for legacy Author field format
CAM-Gerlach a829dff
Lint: Add check for RST Author field
CAM-Gerlach 90add11
Lint: Use more helpful, user-oriented descriptions for header checks
CAM-Gerlach 3712bba
PEP 245: Add historical note and archive links to wiki page/email lsit
CAM-Gerlach afd0a40
PEP 628: Add direct link to resolution in acceptance message
CAM-Gerlach b51cde8
Lint: Explictly allow all valid RFC 2822 line continuations in headers
CAM-Gerlach a894d22
Lint: Tweak Post-History and Resolution checks to accept fragments
CAM-Gerlach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Lint: Refine regex for Resolution check and fix a few deviations
- Loading branch information
commit e75643e776b289cf5f6883e539715bca7c836197
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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 Acceptancenotice just below it.In any case, thanks to your feedback, I went ahead and linked
acceptedin that block directly to the message above, while retaining the existing link to the issue itself.There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.