Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two links point to same place #54217

Closed
ocean-city mannequin opened this issue Oct 1, 2010 · 11 comments
Closed

Two links point to same place #54217

ocean-city mannequin opened this issue Oct 1, 2010 · 11 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@ocean-city
Copy link
Mannequin

ocean-city mannequin commented Oct 1, 2010

BPO 10008
Nosy @birkenfeld, @terryjreedy
Files
  • search_pydoc.py
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2010-11-12.06:20:56.229>
    created_at = <Date 2010-10-01.18:45:07.270>
    labels = ['type-bug', 'docs']
    title = 'Two links point to same place'
    updated_at = <Date 2010-11-12.06:20:56.228>
    user = 'https://bugs.python.org/ocean-city'

    bugs.python.org fields:

    activity = <Date 2010-11-12.06:20:56.228>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-11-12.06:20:56.229>
    closer = 'georg.brandl'
    components = ['Documentation']
    creation = <Date 2010-10-01.18:45:07.270>
    creator = 'ocean-city'
    dependencies = []
    files = ['19181']
    hgrepos = []
    issue_num = 10008
    keywords = ['patch']
    message_count = 11.0
    messages = ['117824', '118228', '118241', '118280', '118295', '118303', '118308', '118312', '118345', '121016', '121025']
    nosy_count = 4.0
    nosy_names = ['georg.brandl', 'terry.reedy', 'ocean-city', 'docs@python']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'needs patch'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue10008'
    versions = ['Python 3.1', 'Python 2.7', 'Python 3.2']

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Oct 1, 2010

    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.

    @ocean-city ocean-city mannequin assigned docspython Oct 1, 2010
    @ocean-city ocean-city mannequin added the docs Documentation in the Doc dir label Oct 1, 2010
    @terryjreedy
    Copy link
    Member

    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.

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Oct 9, 2010

    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.

    @terryjreedy
    Copy link
    Member

    *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.

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Oct 10, 2010

    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. ;-)

    @terryjreedy
    Copy link
    Member

    If I understand, the issue you were concerned about has been fixed. If so, please close this.

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Oct 10, 2010

    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.

    @ocean-city
    Copy link
    Mannequin Author

    ocean-city mannequin commented Oct 10, 2010

    Umm, I tried, but I couldn't post new issue with error.
    I believe Sphinx guys also look at this tracker.

    @terryjreedy
    Copy link
    Member

    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.

    @terryjreedy terryjreedy added the type-bug An unexpected behavior, bug, or error label Oct 10, 2010
    @terryjreedy
    Copy link
    Member

    Georg, do you have any idea what the source of the index glitch is?

    @birkenfeld
    Copy link
    Member

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants