[issue8040] documentation pages should link to other versions of the same page

2013-02-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f306777e0b6d by Ezio Melotti in branch 'default':
#17175: remove outdated paragraph about issue #8040 from PEP 430.  Patch by 
Tshepang Lekhonkhobe.
http://hg.python.org/peps/rev/f306777e0b6d

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2013-02-10 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-28 Thread Georg Brandl

Georg Brandl added the comment:

Thanks Yury for the work!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-28 Thread Georg Brandl

Georg Brandl added the comment:

OK, with the latest patch it seems to work fine for me. I've run the autobuild 
for 2.7/3.3/3.4 and put custom built versions of 2.6/3.2 on dinsdale, so 
everything should look and work fine.

I've also added todo items to PEP 101, in order to make sure the version list 
in version_switcher.js is properly updated on new feature versions.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e02d49db3f5b by Georg Brandl in branch '3.2':
#8040: fix jQuery incompatibility
http://hg.python.org/cpython/rev/e02d49db3f5b

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4a17784f2fee by Georg Brandl in branch '2.6':
#8040: port versionswitcher patch to 2.6.
http://hg.python.org/cpython/rev/4a17784f2fee

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Yury Selivanov

Yury Selivanov added the comment:

(I'd fix it myself if I could ;)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Yury Selivanov

Yury Selivanov added the comment:

It seems that the docs site has old jquery - 1.4, and current JS script uses 
$.get, which got support for 'error' callbacks only in 1.5

So right now, if a URL doesn't exist for the version the user is about to 
switch to, it just fails with a JS error.

I'm attaching one more (hopefully last!) patch to fix that.

Thanks.

--
Added file: http://bugs.python.org/file27754/switcher_js.ajax.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Georg Brandl

Georg Brandl added the comment:

2.5 is neither supported anymore, nor should we make it look like it is :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Yury Selivanov

Yury Selivanov added the comment:

And if you guys can - please re-run the docs generation script manually... As 
it's showing an incorrect version everywhere.

Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com




[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Yury Selivanov

Yury Selivanov added the comment:

And last bit - are you sure we shouldn't add the switch for 2.5?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Yury Selivanov

Yury Selivanov added the comment:

I think we should also apply patch for 2.6, right?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Georg Brandl

Georg Brandl added the comment:

Indeed RELEASE is not defined anywhere.  I was confusing JS variables and Jinja 
template variables: DOCUMENTATION_OPTIONS.VERSION is in fact what Sphinx calls 
"release".

So the fix should be to use VERSION as release and VERSION[:3] as version.  
Thanks for catching that.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7ca30af90c11 by Ezio Melotti in branch '2.7':
#8040: fix the version.
http://hg.python.org/cpython/rev/7ca30af90c11

New changeset 36a35b86e3b0 by Ezio Melotti in branch '3.2':
#8040: fix the version.
http://hg.python.org/cpython/rev/36a35b86e3b0

New changeset 7cabdb58fb23 by Ezio Melotti in branch '3.3':
#8040: merge with 3.2.
http://hg.python.org/cpython/rev/7cabdb58fb23

New changeset 9a97b6d2e24a by Ezio Melotti in branch 'default':
#8040: merge with 3.3.
http://hg.python.org/cpython/rev/9a97b6d2e24a

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Ezio,

Georg's modification introduced one more bug:

1. Documentation for py2 seems to be missing DOCUMENTATION_OPTIONS.RELEASE 
2. DOCUMENTATION_OPTIONS.VERSION is in a wrong format for the rest of the 
script, i.e. 3.3.0 and not 3.3.  Before, in my version there was a code that 
worked around this.

Please apply attached patch that fixes all that.

--
Added file: http://bugs.python.org/file27751/switcher_js.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c3adbe20bb4b by Ezio Melotti in branch '2.7':
#8040: enable the versionswitcher for the autobuild-dev target.
http://hg.python.org/cpython/rev/c3adbe20bb4b

New changeset 740be7346c92 by Ezio Melotti in branch '3.2':
#8040: enable the versionswitcher for the autobuild-dev target.
http://hg.python.org/cpython/rev/740be7346c92

New changeset 5c30f8fdd896 by Ezio Melotti in branch '3.3':
#8040: merge with 3.2.
http://hg.python.org/cpython/rev/5c30f8fdd896

New changeset 75bff8c947d0 by Ezio Melotti in branch 'default':
#8040: merge with 3.3.
http://hg.python.org/cpython/rev/75bff8c947d0

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 006f9ade82f2 by Ezio Melotti in branch '2.7':
#8040: add a version switcher to the documentation.  Patch by Yury Selivanov.
http://hg.python.org/cpython/rev/006f9ade82f2

New changeset 35a2a0e166d0 by Ezio Melotti in branch '3.2':
#8040: add a version switcher to the documentation.  Patch by Yury Selivanov.
http://hg.python.org/cpython/rev/35a2a0e166d0

New changeset 9505a34b4484 by Ezio Melotti in branch '3.3':
#8040: merge with 3.2.
http://hg.python.org/cpython/rev/9505a34b4484

New changeset 9552d8b90683 by Ezio Melotti in branch 'default':
#8040: merge with 3.3.
http://hg.python.org/cpython/rev/9552d8b90683

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Maybe it's a good idea to modify `url_re` from

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

to

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

To be prepared for PEP 430.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Looks good, let's commit it? ;)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Georg Brandl

Georg Brandl added the comment:

Now it should be the right one.

--
Added file: http://bugs.python.org/file27746/versionswitcher.5.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Georg Brandl

Changes by Georg Brandl :


Removed file: http://bugs.python.org/file27745/versionswitcher.5.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Georg,

Are you sure you've attached the right one?  I don't see a change in the 
version_switch.js...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Georg Brandl

Georg Brandl added the comment:

My bad, you're right. Next try attached.

--
Added file: http://bugs.python.org/file27745/versionswitcher.5.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Yury Selivanov

Yury Selivanov added the comment:

> Attaching a simplified version of the patch.

I'm OK, but you actually reduced the functionality with saving those 500 bytes.

In 'py3_version_switch.3.patch', JS sets the current selected option text to 
show the the *full* release number.  I.e. if you are on the 3.3 doc site, 3.3.0 
will be selected and shown in the dropdown (and 3.4.0a1 for /dev/ etc)  I think 
that was a useful thing.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Georg Brandl

Georg Brandl added the comment:

Attaching a simplified version of the patch.

--
Added file: http://bugs.python.org/file27743/versionswitcher.4.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-27 Thread Georg Brandl

Georg Brandl added the comment:

> For future reference, it's okay (and perhaps preferable) to upload a
> patch just for the default branch when no substantive changes are
> needed for other branches.  This is especially true early in the
> review process when multiple iterations may be uploaded.

Definitely preferable.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Found a bug: documentation pages have two toolbars - top and bottom, and as I 
hadn't noticed the latter, I used a placeholder with #id.  This is now fixed.

I'm attaching a new version of patch: 'py3_version_switch.3.patch'.

I also have updated patches for 3.2 & 2.7, so if this iteration is OK, I'll 
upload them as well.

--
Added file: http://bugs.python.org/file27742/py3_version_switch.3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> Both patches (for 2.7 & 3.2) are almost the same as the original patch.  
> Conflicts were trivial.

For future reference, it's okay (and perhaps preferable) to upload a patch just 
for the default branch when no substantive changes are needed for other 
branches.  This is especially true early in the review process when multiple 
iterations may be uploaded.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Changes by Yury Selivanov :


--
versions: +Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

And 'py3_version_switch.2.patch' is for 3.3/master.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Adding 'py3_2_version_switch.patch'. Applies on 3.2

Both patches (for 2.7 & 3.2) are almost the same as the original patch.  
Conflicts were trivial.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Changes by Yury Selivanov :


Added file: http://bugs.python.org/file27739/py3_2_version_switch.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Adding 'py2_version_switch.patch' patch.  Applies on 2.7

--
Added file: http://bugs.python.org/file27738/py2_version_switch.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Attaching a new patch, with all previous issues resolved.

Version dropdown can be enabled by the new 'pydoc_versionswitcher' config 
property (False by default).

Please review and test (I've done lots of testing by injecting the JS on live 
python docs site, but maybe missed something.)

--
Added file: http://bugs.python.org/file27737/py3_version_switch.2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

> If the issue with patch is closed as duplicate, the patch should be attached 
> to the superseder.

Attached now.  Although, please don't use it.  I'll upload an updated version 
soon.

> The patch looks awfully long for such a simple option list. (e.g., 
> get_version() is just lambda x: x[:3], no need for a function to do that.)

Well, I've tried to make it readable.  I can uglify it, but it won't save too 
much.  Right now it's about ~2.5kb.

> Please make it configurable, as indicated. You can add an option recognized 
> by Sphinx in Doc/tools/sphinxext/pyspecific.py, with app.add_config_value.  I 
> will then set it properly in the script that rebuilds the docs on 
> docs.python.org.

Is it OK if I make it configurable via theme config property?
And if not - how to make a config option declared via 'app.add_config_value' 
accessible in templates?

--
keywords: +patch
Added file: http://bugs.python.org/file27736/py3_version_switch.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Georg Brandl

Georg Brandl added the comment:

A few comments:

* If the issue with patch is closed as duplicate, the patch should be attached 
to the superseder.

* The patch looks awfully long for such a simple option list. (e.g., 
get_version() is just lambda x: x[:3], no need for a function to do that.)

* Keep in mind that you can't easily support 2.5 and down anyway, since their 
URLs are completely different.  I call YAGNI on including anything older than 
2.6.

* Please make it configurable, as indicated. You can add an option recognized 
by Sphinx in Doc/tools/sphinxext/pyspecific.py, with app.add_config_value.  I 
will then set it properly in the script that rebuilds the docs on 
docs.python.org.

That said, the result looks nice.  If we can work out the specifics, +1 for 
something like it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Yury Selivanov

Yury Selivanov added the comment:

Eric, Ezio,

I'd like to make the version dropdown to be configurable.  The question is--I 
can add an option (set to False by default) to conf.py.  Will you have a way to 
override it on the 'docs.python.org'?

--
nosy: +yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Martin v . Löwis

Martin v. Löwis added the comment:

[on yselivanov's patch]

I think the menu should drop versions that are not maintained anymore, i.e. 
anything older than 2.5 (including). If that sounds too harsh, a single item 
"older" could be added that always navigates to the version selection page.

With that, navigating to non-existing pages becomes mostly a non-issue, except 
for the renaming from 2.x to 3.x.

If the list is trimmed in that way, I propose to add the links to the side 
menu, rather than as a separate drop-down menu.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Ezio Melotti

Ezio Melotti added the comment:

As I said on #16331, it would be nice to have it, but it shouldn't block a 
patch that works for the website only (having it there is still better than not 
having it at all).
What I meant to say is that taking this into account while writing the code is 
a good idea, and having configurable paths might also turn out to be useful in 
case we change the configuration of docs.python.org.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Éric Araujo

Éric Araujo added the comment:

> If you want to work on this you should also consider that the URLs used on 
> docs.python.org don't necessary
> match the directory structure present when building the doc locally.
I think this is irrelevant; this feature is intended for the web site, not for 
developers building the docs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8040] documentation pages should link to other versions of the same page

2012-10-26 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
nosy: +chris.jerdonek
title: It would be nice if documentation pages linked to other versions of the 
same document -> documentation pages should link to other versions of the same 
page

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com