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
warnings.__all__ incomplete #66387
Comments
If you try |
Antoine: I'll look in to this unless you want do so yourself. Thanks. |
Jon, please do! |
See also bpo-20689. socket.__all__ is incomplete too. |
Serhiy, should I submit these fixes as separate patches? E.g. one patch for the warnings module, and another for the socket module? More generally, should the items included in __all__ be derived from the items described in the documentation? For instance, only the functions listed in 18.1.2 https://docs.python.org/dev/library/socket.html#module-contents ? And finally, should a unittest be added for both of these modules to ensure that __all__ includes all of the desired publicly exposed elements? |
Yes, please use separate patches attached to the appropriate bug. As for what should go into __all__, it's what is documented as the API of the module. As for tests, it doesn't hurt. =) |
Here is a patch that changes __all__ in Lib/warnings.py to include the functions mentioned in the library reference https://docs.python.org/dev/library/warnings.html#available-functions. A unittest is included. This is my first patch, so comments/feedback are welcome (from now on, I should probably add). |
The patch looks good, Jon! I'm running the test suite now to make sure nothing odd happens from the change, but barring that this should be committed in Python 3.4 and default shortly. |
And Python 2.7. |
New changeset a77dc87a34ff by Brett Cannon in branch '3.4': New changeset aeb5fc7a9956 by Brett Cannon in branch 'default': |
New changeset 727fd4ead3fd by Brett Cannon in branch '2.7': |
Thanks, Brett! |
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: