# HG changeset patch # User Matthias Bussonnier # Date 1442779671 25200 # Sun Sep 20 13:07:51 2015 -0700 # Node ID 24df8728f092493f64392f40ce9008dccd7e42e9 # Parent 31301b84ac8d62cdce64119b6aaa0c4377dbc4e6 Allow to use the version doc changer to link to stable and dev URL The current switcher did not allow to get back to the `python.org/3/..` and `python.org/dev/...` url who permanently track the stable/developpent release of Python this should allow in the long term less link on the internet to be out of date. Also un-match py3k in the regex, as the server issue a redirect to /3/ so will never match diff -r 31301b84ac8d -r 24df8728f092 Doc/tools/static/version_switch.js --- a/Doc/tools/static/version_switch.js Wed Jun 03 11:05:57 2015 -0700 +++ b/Doc/tools/static/version_switch.js Sun Sep 20 13:07:51 2015 -0700 @@ -2,7 +2,9 @@ 'use strict'; var all_versions = { - '3.6': 'dev (3.6)', + 'dev': 'developpement', + '3' : 'stable', + '3.6': '3.6 (dev)', '3.5': '3.5', '3.4': '3.4', '3.3': '3.3', @@ -27,7 +29,7 @@ } function patch_url(url, new_version) { - var url_re = /\.org\/(\d|py3k|dev|((release\/)?\d\.\d[\w\d\.]*))\//, + var url_re = /\.org\/(\d|dev|((release\/)?\d\.\d[\w\d\.]*))\//, new_url = url.replace(url_re, '.org/' + new_version + '/'); if (new_url == url && !new_url.match(url_re)) {