Fix #2685: Redirect Latest News links to blog.python.org#2933
Open
iampujan wants to merge 2 commits intopython:mainfrom
Open
Fix #2685: Redirect Latest News links to blog.python.org#2933iampujan wants to merge 2 commits intopython:mainfrom
iampujan wants to merge 2 commits intopython:mainfrom
Conversation
- Updates python.org RSS parser to rewrite pythoninsider.blogspot.com URLs over to the canonical blog.python.org host. - Adds data migration to fix existing BlogEntry links previously imported from the old blogger domain. - Covers URL domain replacement inside test_parser.py.
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #2685 by rewriting legacy pythoninsider.blogspot.com URLs to the canonical blog.python.org domain. The fix ensures that "Latest News" links on the Python homepage direct users to blog.python.org instead of the outdated blogspot subdomain.
Changes:
- Added URL rewriting logic in the RSS parser to transform blogspot URLs during feed processing
- Implemented a data migration to update existing database entries with the new URLs
- Added unit test with mocked feed data to verify URL transformation behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| apps/blogs/parser.py | Adds string replacement logic to rewrite pythoninsider.blogspot.com to blog.python.org during RSS feed parsing |
| apps/blogs/tests/test_parser.py | Adds new test with mocked feedparser to verify URL rewriting functionality |
| apps/blogs/migrations/0004_auto_20260222_0834.py | Data migration to update existing BlogEntry URLs in the database from blogspot to blog.python.org |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2685. Adds URL manipulation logic during RSS parsing to rewrite legacy pythoninsider.blogspot.com URLs up to the canonical python.org domains. Also includes a data migration to process any preexisting database entries and a new mock unit test.