[Debian-astro-maintainers] Bug#1027198: einsteinpy: autopkgtest fail with numpy/1.24.1
s3v
c0llapsed at yahoo.it
Sun Jan 22 08:06:42 GMT 2023
Control: forwarded -1 https://github.com/einsteinpy/einsteinpy/commit/cffc0cacd053481e56
thanks
Dear Maintainer,
FTBFS is caused by two test failing with numpy 1.24
=================================== FAILURES ===================================
__________________________ test_fractal_shows_figure ___________________________
mock_stdout = <_io.StringIO object at 0x7fc084fb1d80>
mock_show = <MagicMock name='show' id='140464841399824'>
@mock.patch.object(go.Figure, "show")
@mock.patch("sys.stdout", new_callable=StringIO)
def test_fractal_shows_figure(mock_stdout, mock_show):
> fig = fractal(divs=2, show=True)
einsteinpy/tests/test_plotting/test_fractal.py:12:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
einsteinpy/plotting/fractal.py:75: in fractal
go.Heatmap(z=_fractal_img(angle=step, dims=(400, 400)), showscale=False)
einsteinpy/plotting/fractal.py:40: in _fractal_img
_julia(A, c, zabs_max, i, j, dims, x_range, y_range, iter_max)
einsteinpy/plotting/fractal.py:20: in _julia
z = np.complex((i / width) * xwidth + xmin + 1j * ((j / height) * ywidth + ymin))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
attr = 'complex'
def __getattr__(attr):
# Warn for expired attributes, and return a dummy function
# that always raises an exception.
import warnings
try:
msg = __expired_functions__[attr]
except KeyError:
pass
else:
warnings.warn(msg, DeprecationWarning, stacklevel=2)
def _expired(*args, **kwds):
raise RuntimeError(msg)
return _expired
# Emit warnings for deprecated attributes
try:
val, msg = __deprecated_attrs__[attr]
except KeyError:
pass
else:
warnings.warn(msg, DeprecationWarning, stacklevel=2)
return val
if attr in __future_scalars__:
# And future warnings for those that will change, but also give
# the AttributeError
warnings.warn(
f"In the future `np.{attr}` will be defined as the "
"corresponding NumPy scalar. (This may have returned Python "
"scalars in past versions.", FutureWarning, stacklevel=2)
# Importing Tester requires importing all of UnitTest which is not a
# cheap import Since it is mainly used in test suits, we lazy import it
# here to save on the order of 10 ms of import time for most users
#
# The previous way Tester was imported also had a side effect of adding
# the full `numpy.testing` namespace
if attr == 'testing':
import numpy.testing as testing
return testing
elif attr == 'Tester':
from .testing import Tester
return Tester
> raise AttributeError("module {!r} has no attribute "
"{!r}".format(__name__, attr))
E AttributeError: module 'numpy' has no attribute 'complex'
/usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError
__________________________ test_fractal_draws_figure ___________________________
def test_fractal_draws_figure():
> fig = fractal(divs=2, show=False)
einsteinpy/tests/test_plotting/test_fractal.py:18:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
einsteinpy/plotting/fractal.py:75: in fractal
go.Heatmap(z=_fractal_img(angle=step, dims=(400, 400)), showscale=False)
einsteinpy/plotting/fractal.py:40: in _fractal_img
_julia(A, c, zabs_max, i, j, dims, x_range, y_range, iter_max)
einsteinpy/plotting/fractal.py:20: in _julia
z = np.complex((i / width) * xwidth + xmin + 1j * ((j / height) * ywidth + ymin))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
attr = 'complex'
def __getattr__(attr):
# Warn for expired attributes, and return a dummy function
# that always raises an exception.
import warnings
try:
msg = __expired_functions__[attr]
except KeyError:
pass
else:
warnings.warn(msg, DeprecationWarning, stacklevel=2)
def _expired(*args, **kwds):
raise RuntimeError(msg)
return _expired
# Emit warnings for deprecated attributes
try:
val, msg = __deprecated_attrs__[attr]
except KeyError:
pass
else:
warnings.warn(msg, DeprecationWarning, stacklevel=2)
return val
if attr in __future_scalars__:
# And future warnings for those that will change, but also give
# the AttributeError
warnings.warn(
f"In the future `np.{attr}` will be defined as the "
"corresponding NumPy scalar. (This may have returned Python "
"scalars in past versions.", FutureWarning, stacklevel=2)
# Importing Tester requires importing all of UnitTest which is not a
# cheap import Since it is mainly used in test suits, we lazy import it
# here to save on the order of 10 ms of import time for most users
#
# The previous way Tester was imported also had a side effect of adding
# the full `numpy.testing` namespace
if attr == 'testing':
import numpy.testing as testing
return testing
elif attr == 'Tester':
from .testing import Tester
return Tester
> raise AttributeError("module {!r} has no attribute "
"{!r}".format(__name__, attr))
E AttributeError: module 'numpy' has no attribute 'complex'
/usr/lib/python3/dist-packages/numpy/__init__.py:284: AttributeError
=============================== warnings summary ===============================
../../../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1240
/usr/lib/python3/dist-packages/_pytest/config/__init__.py:1240: PytestRemovedIn8Warning: The --strict option is deprecated, use --strict-markers instead.
self.issue_config_time_warning(
einsteinpy/ijit.py:30
einsteinpy/ijit.py:30
/build/einsteinpy-0.3.0/.pybuild/cpython3_3.11_einsteinpy/build/einsteinpy/ijit.py:30: UserWarning:
Could not import numba package. All einsteinpy functions will work properly but the CPU intensive algorithms will be slow. Consider installing numba to boo
st performance.
.pybuild/cpython3_3.11_einsteinpy/build/einsteinpy/tests/test_symbolic/test_christoffel.py::test_properties
/usr/lib/python3/dist-packages/_pytest/python.py:199: PytestReturnNotNoneWarning:
Expected None, but .pybuild/cpython3_3.11_einsteinpy/build/einsteinpy/tests/test_symbolic/test_christoffel.py::test_properties returned True, which will be
an error in a future version of pytest. Did you mean to use `assert` instead of `return`?
.pybuild/cpython3_3.11_einsteinpy/build/einsteinpy/tests/test_symbolic/test_schouten.py::test_SchoutenTensor_with_arbritary_config
/usr/lib/python3/dist-packages/_pytest/python.py:199: PytestReturnNotNoneWarning:
Expected None, but .pybuild/cpython3_3.11_einsteinpy/build/einsteinpy/tests/test_symbolic/test_schouten.py::test_SchoutenTensor_with_arbritary_config retur
ned True, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED einsteinpy/tests/test_plotting/test_fractal.py::test_fractal_shows_figure
FAILED einsteinpy/tests/test_plotting/test_fractal.py::test_fractal_draws_figure
======= 2 failed, 229 passed, 8 xfailed, 5 warnings in 239.87s (0:03:59) =======
This failure was fixed upstream [1]
I can confirm that your package builds fine after applying
aforementioned commit.
Kind Regards
[1] https://github.com/einsteinpy/einsteinpy/commit/cffc0cacd053481e56
More information about the Debian-astro-maintainers
mailing list