pygdbmi
pygdbmi copied to clipboard
Make it clearer what is public api
- [x] I have added an entry to
CHANGELOG.md
Summary of changes
This PR adds __all__ to all pygdbmi modules to make start imports of pygdbmi better. I'm not a big fan of star imports but I think that using __all__ makes it clearer what is public and what not.
To guide me on what is public and what not I just checked what is documented in the docs. This made me wonder, should IoManager.make_non_blocking be public? I think it may be public by mistake.
If you agree I can make it private or, if you don't want to break potential users, we can remove it from the docs and from the star import.
I also moved assert_match to the tests as it's not needed by pygdbmi itself.
Test plan
No new tests needed, but tested by running
$ nox -s tests
$ python3
>>> from pygdbmi.gdbmiparser import *
>>> pprint
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'pprint' is not defined. Did you mean: 'print'?
>>>
(In previous versions pprint would be imported as a side effect of the start import)