Author mdk
Recipients mdk
Date 2018-05-30.21:44:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527716663.86.0.682650639539.issue33700@psf.upfronthosting.co.za>
In-reply-to
Content
In the old version picker used back in 3.5 [1], the function patch_url was patching using the following regex:

    var url_re = /\.org\/(\d|py3k|dev|((release\/)?\d\.\d[\w\d\.]*))\//,

which does not expects a language tag.

This means, for example, that being on https://docs.python.org/fr/3.5/library/__main__.html and switching to 3.6 will fail (but the reverse will succeed as the implementation of the switcher in 3.6 understands the language tag).

I see two potential fixes:

- Fix in the 3.5 branch which is not allowed as the branch is in "security only" mode.
- Add a rule, nginx-side, to fix the misconstructed URLS (looking like /3.6/fr/3.5/library/...) redirectin g them to the right place.

Other ideas and feedback welcome.


[1]: https://docs.python.org/fr/3.5/_static/version_switch.js
History
Date User Action Args
2018-05-30 21:44:23mdksetrecipients: + mdk
2018-05-30 21:44:23mdksetmessageid: <1527716663.86.0.682650639539.issue33700@psf.upfronthosting.co.za>
2018-05-30 21:44:23mdklinkissue33700 messages
2018-05-30 21:44:23mdkcreate