fix: remap dead hg.python.org release-notes URLs to GitHub equivalents by nagasrisai · Pull Request #2965 · python/pythondotorg
added 3 commits
March 18, 2026 17:40Adds a corrected_release_notes_url property to the Release model that converts old Mercurial-hosted URLs (hg.python.org, now unreachable) to their equivalent paths on GitHub, so legacy release pages still have working changelog links. Closes python#2865
Use the new corrected_release_notes_url property so that legacy hg.python.org links are converted to GitHub URLs before rendering. Also guard the anchor so it degrades gracefully when the URL is empty.
Per review suggestion from hugovk: - Replace re.match with str.startswith for clarity (re.match anchors start but not end, which can be confusing) - Also handle hg.python.org/cpython/raw-file/ URLs, mapping them to raw.githubusercontent.com (e.g. Python 2.7.3 release notes use this form)
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