-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
MAINT: add test to prevent new public-looking modules being added #14454
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
Conversation
Hmm, we start with a failure that I can't reproduce locally:
shows up for an install, but not an in-place build. adding it to the list |
Can you elaborate on what you mean by this? |
The comment explicitly said not to add The root cause is that in our main |
Also finish the TODO about figuring out which np.lib.<submodule>'s are public. This is a giant mess ...
Also address other review comments.
fe73481
to
069e115
Compare
Also remove `numpy.ma.version.py`, it was not importable and served no purpose.
069e115
to
9530d43
Compare
Thanks @rgommers. I guess the next step is to identify candidates for namespace deprecation. |
Before that, lower-hanging fruit may be to remove |
"random.philox", | ||
"random.sfc64", | ||
"testing.decorators", | ||
"testing.noseclasses", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This broke the wheel builds, I suspect because nose is not present in those builds. Nose doesn't support recent Python3 out of the box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have a link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nose
is optional, and if not present an import error will be raised if a attempt to import it is made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. okay that's easy to fix, PR to follow
Removes these files that were deprecated since 1.15.0: - numpy/testing/decorators.py - numpy/testing/noseclasses.py - numpy/testing/nosetester.py This also resolves a failure in the recently introduced tests in `test_public_api.py` (see numpygh-14454). Closes numpygh-14566
There is more work to do (added a FIXME), but that's for another time. Preventing to add new submodules is a good start. Also added some documentation, and split things into public and private submodules with comments.
The change to
numpy.lib.mixins.__all__
shows that people have been working around ourimport *
mess sometimes. Not adding some public object to an__all__
dict is incorrect of course - need a more structural fix by getting rid of*
imports.