spyder-kernels
spyder-kernels copied to clipboard
Numpy matrix warning in tests
trafficstars
Running the tests on Python 3.10 gives the following warnings, among others:
spyder_kernels/console/kernel.py:14
.../spyder_kernels/console/kernel.py:14: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import LooseVersion
spyder_kernels/utils/tests/test_nsview.py::test_get_numpy_type
.../spyder_kernels/utils/tests/test_nsview.py:430: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
matrix = np.matrix([[1, 2], [3, 4]])
The other warnings relate to packages imported by spyder-kernels.
Hey @juliangilbey, thanks for reporting. We're aware of this issue but spyder-kernels still supports Python 2 and it's going to stay like that until we release Spyder 6 in six months to a year.
However, we'll take this into account when migrating our code to be Python 3 only.
Thanks @ccordoba12! :-)