Skip to content

cookielib documentation references Cookie module, not cookielib.Cookie class #66017

Closed

Description

@Ajtag
mannequin
BPO 21818
Nosy @birkenfeld, @bitdancer, @serhiy-storchaka, @demianbrecht, @csabella
Files
  • docs_class_links-2.7.patch
  • 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 2017-09-07.12:22:16.266>
    created_at = <Date 2014-06-20.23:28:07.969>
    labels = ['type-bug', '3.7', 'docs']
    title = 'cookielib documentation references Cookie module, not cookielib.Cookie class'
    updated_at = <Date 2017-09-07.12:22:16.256>
    user = 'https://bugs.python.org/Ajtag'

    bugs.python.org fields:

    activity = <Date 2017-09-07.12:22:16.256>
    actor = 'berker.peksag'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2017-09-07.12:22:16.266>
    closer = 'berker.peksag'
    components = ['Documentation']
    creation = <Date 2014-06-20.23:28:07.969>
    creator = 'Ajtag'
    dependencies = []
    files = ['38485']
    hgrepos = []
    issue_num = 21818
    keywords = ['patch']
    message_count = 9.0
    messages = ['221133', '238094', '238098', '238100', '254374', '254396', '282034', '282257', '301196']
    nosy_count = 8.0
    nosy_names = ['georg.brandl', 'r.david.murray', 'docs@python', 'python-dev', 'serhiy.storchaka', 'demian.brecht', 'Ajtag', 'cheryl.sabella']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue21818'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6', 'Python 3.7']

    Activity

    1. Ajtag commented on Jun 20, 2014

      Ajtagmannequin
      MannequinAuthor

      all the links to Cookie class in the cookielib documentation point to Cookie module.

      for example:
      
      CookieJar.set_cookie(cookie)
      Set a *Cookie*, without checking with policy to see whether or not it should be set.
      

      cookie in the documentation links to
      https://docs.python.org/2/library/cookie.html#module-Cookie

      cookie in the documentation should link to
      https://docs.python.org/2/library/cookielib.html#cookielib.Cookie

    2. added
      docs
      on Jun 20, 2014
    3. serhiy-storchaka commented on Mar 14, 2015

      @serhiy-storchaka
      Member

      Georg, this looks as a bug in Sphinx configuration. Why module takes priority on class when the role is explicitly specified? I have counted about two hundreds of similar bugs in the documentation.

    4. added
      type-bug
      on Mar 14, 2015
    5. serhiy-storchaka commented on Mar 14, 2015

      @serhiy-storchaka
      Member

      Here is a patch for 2.7 that fixes above a hundred of broken class references. But may be even more broken function references. I think it would be better to fix Sphinx rules.

    6. bitdancer commented on Mar 14, 2015

      @bitdancer
      Member

      This happens because the role is pretty much ignored by Sphinx for linking purposes. I remember Georg talking about the reason for this, but I forget what it was. Perhaps it would be possible to, as you suggest, have the roll affect the priority...but it may be the case that the references don't currently retain the needed information. Regardless, that would be an issue for the Sphinx tracker.

    7. serhiy-storchaka commented on Nov 9, 2015

      @serhiy-storchaka
      Member

      Georg, is it possible to tune Sphinx rules?

    8. birkenfeld commented on Nov 9, 2015

      @birkenfeld
      Member

      The rules are as they are mostly for backwards compatibility. But it is rarely a problem since there is only one object with a given name.

      :class:`Cookie` within the docs for cookielib would not be able to link to Cookie.Cookie since it is not found in its scope. :class:`Cookie.Cookie` works, as does :class:`~Cookie.Cookie`.

      When you use the "find-in-any-namespace" syntax, i.e. :class:`.Cookie` the type *will* be taken into account.

    9. serhiy-storchaka commented on Nov 29, 2016

      @serhiy-storchaka
      Member

      Thus the only way to fix links is to specify full names? Does docs_class_links-2.7.patch look good to you?

    10. python-dev commented on Dec 2, 2016

      python-devmannequin
      Mannequin

      New changeset 5b40d81e8883 by Serhiy Storchaka in branch '2.7':
      Issue bpo-21818: Fixed references to classes that have names matching with module
      https://hg.python.org/cpython/rev/5b40d81e8883

      New changeset d64e37b9204e by Serhiy Storchaka in branch '3.5':
      Issue bpo-21818: Fixed references to classes that have names matching with module
      https://hg.python.org/cpython/rev/d64e37b9204e

      New changeset 62c9a89a2103 by Serhiy Storchaka in branch '3.6':
      Issue bpo-21818: Fixed references to classes that have names matching with module
      https://hg.python.org/cpython/rev/62c9a89a2103

      New changeset c642c597d05c by Serhiy Storchaka in branch 'default':
      Issue bpo-21818: Fixed references to classes that have names matching with module
      https://hg.python.org/cpython/rev/c642c597d05c

    11. csabella commented on Sep 3, 2017

      @csabella
      Contributor

      Can this issue be closed?

    12. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)docstype-bug

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions