This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Two links point to same place
Type: behavior Stage: needs patch
Components: Documentation Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: docs@python, georg.brandl, ocean-city, terry.reedy
Priority: normal Keywords: patch

Created on 2010-10-01 18:45 by ocean-city, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
search_pydoc.py ocean-city, 2010-10-10 06:22
Messages (11)
msg117824 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-10-01 18:45
Please see http://docs.python.org/genindex-T.html

  Thread (class in threading), [1]

This two links point to same place. I think latter should point
http://docs.python.org/library/threading.html#thread-objects
or
class threading.Thread(group=None, target=None, name=None, args=(), kwargs={})
bellow.

# Latter doesn't have perma link.
msg118228 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-10-08 21:59
You initial link 
I only see one entry, Thread (class in threading), which points to
http://docs.python.org/library/threading.html#threading.Thread
as it should. I do not see a duplicate link nearby.

I have no idea what ', [1]' is supposed to mean.

What does puzzle me is that

Thread [neader, no link]
   module

points to http://docs.python.org/c-api/init.html#index-64
it seems like the entry should have more. This entry is gone in 3.1.
msg118241 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-10-09 01:38
> You initial link 
> I only see one entry, Thread (class in threading), which points to
> http://docs.python.org/library/threading.html#threading.Thread
> as it should. I do not see a duplicate link nearby.

It used to be there. Please see
http://docs.python.org/release/2.7/genindex-T.html
But ZipFile seems to have same issue, and still there.
Please see
http://docs.python.org/genindex-Z.html

>Thread [neader, no link]
>  module

Hmm, I cannot see this.
msg118280 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-10-09 17:56
*Your initial post* only lists one index entry, and *does not* describe a problem.

Thread
   module

is in the file you have pointed to twice, in its alphabetical position.

I have no idea what you think is wrong with the z section.
msg118295 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-10-10 00:06
Well, please see r85262 (10/6). This issue seems to be
recently solved in release27-maint. And http://docs.python.org/
was updated after that, so when I posted this issue, the issue was
actually there, but when you saw that site, (probably after
10/6, the issue was gone)

http://docs.python.org/release/2.7/
was created when officially Python2.7 was released,
so we can see this issue still there. Like time machine. ;-)
msg118303 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-10-10 05:12
If I understand, the issue you were concerned about has been fixed. If so, please close this.
msg118308 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-10-10 06:22
Yes, but http://docs.python.org/genindex-Z.html

  ZipFile (class in zipfile), [1]

still has same issue, no? [1] (and [2], [3], if exist)
should suggest alternatives, but it doesn't now.

I'll attach the patch to detect this kind of duplication.

I you say, probably this happens when same directive appears
in rst file. For example, 

.. module:: zipfile

.. class:: ZipFile

.. class:: ZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=False)

Maybe I should have posted this issue to Sphinx tracker.
msg118312 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-10-10 06:44
Umm, I tried, but I couldn't post new issue with error.
I believe Sphinx guys also look at this tracker.
msg118345 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-10-10 19:55
When I initially wrote "I have no idea what ', [1]' is supposed to mean.
", you should have believed that and explained ;-). I now understand that most index entries have one link, which we might call the [0] link. When the entry should have more than one link, the index entry text is followed by '[1]' and, if needed, '[2]', '[3]', and so on. These place-holder labels should each have different links, or should not be there at all.

So "ZipFile (class in zipfile" and "[1]" are two separate texts that should have two different links, but the two links are the same, and that, I agree, is wrong. Another example with duplicate links:
  tracer() (in module turtle), [1]

3.1.2 and 3.2a2 indexes have Zipfile error but not tracer error (because '[1]' is not present).

Doc people: the attached patch is a diagnostic patch rather than a fixup patch. I do not know whether the problem is in .rst sources or Sphinx.
msg121016 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-11-12 03:08
Georg, do you have any idea what the source of the index glitch is?
msg121025 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-11-12 06:20
It is indeed what Hirokazu suggested: there were two ".. class:: ZipFile" entries in the docs.  I've added ":noindex:" now to one of them in r86425.
History
Date User Action Args
2022-04-11 14:57:07adminsetgithub: 54217
2010-11-12 06:20:56georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg121025
2010-11-12 03:08:42terry.reedysetmessages: + msg121016
2010-10-10 19:55:17terry.reedysetassignee: docs@python ->
type: behavior
versions: + Python 3.1, Python 3.2
keywords: + patch
nosy: + georg.brandl

messages: + msg118345
stage: needs patch
2010-10-10 06:44:57ocean-citysetmessages: + msg118312
2010-10-10 06:22:19ocean-citysetfiles: + search_pydoc.py

messages: + msg118308
2010-10-10 05:12:15terry.reedysetmessages: + msg118303
2010-10-10 00:06:28ocean-citysetmessages: + msg118295
2010-10-09 17:56:07terry.reedysetmessages: + msg118280
2010-10-09 01:38:09ocean-citysetmessages: + msg118241
2010-10-08 21:59:46terry.reedysetnosy: + terry.reedy
messages: + msg118228
2010-10-01 18:45:07ocean-citycreate