-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
reddit: fix matching twice for reddit.com without www. #2208
Conversation
Addresses a regression introduced by #2202, which added `reddit.com` to the `short_post_url` pattern and made it possible for a post or comment URL to match BOTH that and `post_or_comment_url`. Since URLs match individually, and not as part of the line, all we need to make sure a shortlink really is one is to ensure that the link ends after the submission ID and optional trailing slash.
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 say you tested it well... 😁
The system works. |
OK, this py3.9 CI failure that magically appeared in #2209 definitely isn't related to that patch. @Exirel help, what could have possibly changed in the last two days to break ONLY this version of Python? Edit: This bug tracker entry linked from the Python 3.9.8 changelog seems related. It touches Edit the 2nd: Confirmed that the last successful py3.9 job was on 3.9.7, and the failing jobs for these two PRs are using 3.9.8. That's our scope for examining changes. |
CI failure discussion has its own issue now: #2210 |
reddit: fix matching twice for reddit.com without www.
This comment has been minimized.
This comment has been minimized.
reddit: fix matching twice for reddit.com without www. Modified new test file from master to contain the required header lines (future imports & coding comment) for 7.1.x branch.
Description
Addresses a regression introduced by #2202 (itself a regression fix, ironically), which added
reddit.com
to theshort_post_url
pattern and made it possible for a post or comment URL to match BOTH that andpost_or_comment_url
.Since URLs match individually, and not as part of the line, all we need to make sure a shortlink really is one is to ensure that the link ends after the submission ID and optional trailing slash.
Checklist
make qa
(runsmake quality
andmake test
)reddit.py
's URL matching invites madness.Notes
To the PR template's question: This does not resolve any GitHub issues, because @xnaas doesn't "submit GitHub issues while naked in bed" and reported the bug on IRC instead.