Skip to content

Comments

Fix #2685: Redirect Latest News links to blog.python.org#2933

Open
iampujan wants to merge 2 commits intopython:mainfrom
iampujan:feature/issue-2685-rewrite-blog-urls
Open

Fix #2685: Redirect Latest News links to blog.python.org#2933
iampujan wants to merge 2 commits intopython:mainfrom
iampujan:feature/issue-2685-rewrite-blog-urls

Conversation

@iampujan
Copy link
Contributor

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.

- 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.
Copilot AI review requested due to automatic review settings February 22, 2026 08:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Latest news" should link to articles on blog.python.org not pythoninsider.blogspot.com

1 participant