New submission from Julien Palard <[email protected]>:
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
----------
assignee: mdk
components: Documentation
messages: 318210
nosy: mdk
priority: low
severity: normal
stage: needs patch
status: open
title: [doc] Old version picker don't understand language tags in URL
versions: Python 3.5
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33700>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com