MAINT: Remove all nose testing support.#23041
Conversation
| reveal_type(np.testing.rundocs("test.py")) # E: None | ||
| reveal_type(np.testing.rundocs(Path("test.py"), raise_on_error=True)) # E: None | ||
|
|
||
| @np.testing.raises(RuntimeError, RuntimeWarning) |
There was a problem hiding this comment.
@BvB93 Removing the decorator doesn't seem to bother the tests.
|
The pyinstaller error looks unrelated. I wonder if the new version 5.7.0 released Dec 4 is the cause. EDIT: Some of the passing PRs also use the 5.7.0 version. |
|
The error is and seems to be related to this line numpy/numpy/core/_add_newdocs.py Line 4970 in e2fccd9 |
|
It seems But, I am happy either way. The typing test looks like the test for the decorator typing itself. |
|
Maybe the error is due to a circular import somehow when using the pyinstaller hook? |
|
There is a |
|
Hmm... the |
|
Importing There are a number of profiling errors of the form: Which I don't think should be related unless removing nose has exposed a potential profiling problem. |
NumPy switched to using pytest in 2018 and nose has been unmaintained for many years. We have kept NumPy's nose support to avoid breaking downstream projects who might have been using it and not yet switched to pytest or some other testing framework. With the arrival of Python 3.12, unpatched nose will raise an error. It it time to move on. Decorators removed - raises - slow - setastest - skipif - knownfailif - deprecated - parametrize - _needs_refcount These are not to be confused with pytest versions with similar names, e.g., pytest.mark.slow, pytest.mark.skipif, pytest.mark.parametrize. Functions removed - Tester - import_nose - run_module_suite
acbb5c1 to
f75bb0e
Compare
|
Ohhh, the tests are the issue... I suspect you can also add it to: in the pyinstaller hook file. Not sure about the other thing, but I doubt it is related. |
I considered that, made me wonder if pyinstaller was working correctly before. In the absence of complaints I decided to leave it as is, especially as I don't really understand it :) EDIT1: but maybe "hidden" refers to the underscore prefix? But then I would expect problems with the other underscored modules, but they are all imported up top. EDIT2: I note that |
|
We should figure out how to deprecate |
|
Squashed and release note added. |
|
My guess is that things would work fine if the |
seberg
left a comment
There was a problem hiding this comment.
Thanks LGTM! Could add formatting to the release note, but doesn't matter.
I am very sure the _multiarray_tests should be in hiddenimport, but I am happy to follow up on that myself. Nothing in NumPy needs/uses it (so there is no way pyinstaller can find it by searching for import statements).
But the tests need it and we want to be able to run them, so we should make sure it gets packaged. Having a stray import in the code works, but seems less clean.
|
Thanks @charris |
NumPy switched to using pytest in 2018 and nose has been unmaintained for many years. We have kept NumPy's nose support to avoid breaking downstream projects who were might have been using it and not yet switched to pytest or some other testing framework. With the arrival of Python 3.12, unpatched nose will raise an error. It is time to move on.
Decorators removed
These are not to be confused with pytest versions with similar names, e.g., pytest.mark.slow, pytest.mark.skipif, pytest.mark.parametrize.
Functions removed