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
socket.AddressFamily is absent in pydoc output #64888
Comments
The documentation for socket.AddressFamily (unlike to SocketType) isn't generated in html page by pydoc. May be bpo-20654 is similar to this issue. |
I couldn't reproduce this issue. I'm attaching HTML output of both socket.AddressFamily and socket.SocketType enum types. |
Try "./python -m pydoc -w socket". |
I found the culprit. The AddressFamily is not registered in _socket module. I created a preliminary patch to show the culprit. |
"I found the culprit. The AddressFamily is not registered in _socket module. I created a preliminary patch to show the culprit." That's not surprising, this type is created in socket (socket.py), not in _socket (the C module). Your patch is wrong. |
Ah, now I see what is wrong. Actually AddressFamily is missing in text output of pydoc too. Because "AddressFamily" is not included in the __all__ list. SocketType is included, but this is different SocketType, SocketType from _socket (see bpo-20386). Here is a patch which fixes this issue. |
I suggested to not document new enums of the socket module (ex: AddressFamily, SocketType) when they were added. I don't think that they should be part of Python public API. |
We should discuss this suggestion on Python-Dev. It affects the use of enums in other modules. |
As I said in msg209237:
------------------------------------------------------------------------------------ The Enum classes have been documented, so they should be in __all__. |
New changeset f8a8ddf0b070 by Ethan Furman in branch '3.4': New changeset 7266562c2bb3 by Ethan Furman in branch 'default': |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: