socket.getaddrinfo Py3.10 docs say "AddressFamily.SOCK_STREAM"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
Documentation
The socket.getaddrinfo example in the Py3.10 docs is given as the following:
>>> socket.getaddrinfo("example.org", 80, proto=socket.IPPROTO_TCP)
[(<AddressFamily.AF_INET6: 10>, <AddressFamily.SOCK_STREAM: 1>,
6, '', ('2606:2800:220:1:248:1893:25c8:1946', 80, 0, 0)),
(<AddressFamily.AF_INET: 2>, <AddressFamily.SOCK_STREAM: 1>,
6, '', ('93.184.216.34', 80))]
This should have SocketKind instead of the second AddressFamily:
>>> socket.getaddrinfo("example.org", 80, proto=socket.IPPROTO_TCP)
[(<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_STREAM: 1>,
6, '', ('2606:2800:220:1:248:1893:25c8:1946', 80, 0, 0)),
(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>,
6, '', ('93.184.216.34', 80))]
I've checked the main, 3.10 and 3.11 branches, and this is only apparent in the 3.10 documentation. The main and 3.11 branches have older lines here and use the module-level constants. I wouldn't know where to direct a PR, sorry.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Py3.10 version of Doc/library/socket.rst and inspect the socket.getaddrinfo example linked in the issue. Compare it with the main and 3.11 documentation, update the displayed enum type if needed, and verify that the example matches the documented output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100