Skip to content

Document the constants in the socket module #45048

Open

Description

@sonderblade
BPO 1732367
Nosy @birkenfeld, @giampaolo, @bitdancer, @vadmium, @ammaraskar
Dependencies
  • bpo-12887: Documenting all SO_* constants in socket module
  • bpo-13256: Document and test new socket options
  • bpo-14345: Document socket.SOL_SOCKET
  • bpo-27409: List socket.SO_, SCM_, MSG_, IPPROTO_ symbols
  • Files
  • doc-for-socket-af-constants.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 = None
    created_at = <Date 2007-06-06.20:46:18.000>
    labels = ['type-feature', '3.7', 'docs']
    title = 'Document the constants in the socket module'
    updated_at = <Date 2017-08-12.12:12:03.630>
    user = 'https://bugs.python.org/sonderblade'

    bugs.python.org fields:

    activity = <Date 2017-08-12.12:12:03.630>
    actor = 'ammar2'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2007-06-06.20:46:18.000>
    creator = 'sonderblade'
    dependencies = ['12887', '13256', '14345', '27409']
    files = ['8037']
    hgrepos = []
    issue_num = 1732367
    keywords = ['patch']
    message_count = 17.0
    messages = ['52732', '52733', '52734', '52735', '59375', '66743', '66751', '67121', '116686', '116690', '269459', '272496', '299206', '300151', '300189', '300192', '300197']
    nosy_count = 7.0
    nosy_names = ['georg.brandl', 'sonderblade', 'giampaolo.rodola', 'bjourne', 'r.david.murray', 'martin.panter', 'ammar2']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1732367'
    versions = ['Python 3.7']

    Linked PRs

    Activity

    1. sonderblade commented on Jun 6, 2007

      sonderblademannequin
      MannequinAuthor

      I wish to add documentation for the constants in the socket module. AF_, SO_, MSG_* etc. Some of them are really useful such as SO_KEEPALIVE and MSG_WAITALL. The modules documentation currently just refers the reader to UNIX manual pages, but I think we can do better.

      This patch is for the AF_* constants. If it is accepted, I'd like to submit patches for the other constants too. Maybe there should be a subsection for all constants?

    2. birkenfeld commented on Jun 7, 2007

      @birkenfeld
      Member

      I fear that intermixing \dataline with content within one datadesc is not correct.

      I think I'd put the constants and their explanation into a table.

    3. sonderblade commented on Jun 7, 2007

      sonderblademannequin
      MannequinAuthor

      I assume you like the general idea of the patch then? I'll create a patch with the tables and create a new subsection to contain them.

    4. birkenfeld commented on Jun 7, 2007

      @birkenfeld
      Member

      Yes, more documentation is almost always better than less. :-)

    5. birkenfeld commented on Jan 6, 2008

      @birkenfeld
      Member

      Be sure to use reST format now that we've switched to that. Much easier
      to type :)

    6. birkenfeld commented on May 12, 2008

      @birkenfeld
      Member

      Is there progress on this?

    7. giampaolo commented on May 12, 2008

      @giampaolo
      Contributor

      Yes, having a subsection describing such things would be a cool idea.
      Please don't leave behind this ticket.

    8. bjourne commented on May 20, 2008

      bjournemannequin
      Mannequin

      There is no progress on this. I had lots of documentation written in
      Latex on a laptop, but then I lost it. Sorry.

    9. BreamoreBoy commented on Sep 17, 2010

      BreamoreBoymannequin
      Mannequin

      msg67121 states proposed changes were lost :(

    10. 8 remaining items

    11. ammaraskar commented on Jul 26, 2017

      @ammaraskar
      Member

      Gonna take this and its dependencies on, eta 2-4 days.

    12. ammaraskar commented on Aug 11, 2017

      @ammaraskar
      Member

      I've opened up a PR for this ticket's dependencies. There's some things I'm looking for feedback on there: #3072

    13. vadmium commented on Aug 12, 2017

      @vadmium
      Member

      bpo-13256 contains a patch documenting socket options, but was closed because the author lost interest.

      bpo-27409 is a proposal to list the symbols available without documenting what each one is for.

    14. vadmium commented on Aug 12, 2017

      @vadmium
      Member

      The general rule for documenting availability seems to be to only list the special cases. Many of the socket options are specified by Posix, and seem to be available on Linux, Windows, BSD and other OSes. If you say “Availability: Linux, Windows”, it could imply that the API is specific to those two platforms, and not available on Free BSD or other platforms in general.

    15. ammaraskar commented on Aug 12, 2017

      @ammaraskar
      Member

      That makes sense, listing availability for exceptions would certainly make everything more succinct. How do you propose we mention that certain options don't actually do anything on Windows. Currently I have a footnote in the table that links to the MSDN documentation here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms740532(v=vs.85).aspx

      control+f for "SO_RCVLOWAT" for example

    16. transferred this issue fromon Apr 10, 2022
    17. added 2 commits that reference this issue on Apr 20, 2025
    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

      docsDocumentation in the Doc dirtopic-socketRelated to the socket, socketserver and selectors modulestype-featureA feature request or enhancement

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions