You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run tests with Numpy-2.0.0-rc2 and they fail with following errors:
* python3_10: running distutils-r1_run_phase python_test
======================================================================
ERROR: test_create_numpy_vector_bool (__main__.TestByteLayout)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/flatbuffers-24.3.25/work/flatbuffers-24.3.25/tests/py_test.py", line 1430, in test_create_numpy_vector_bool
x_other_endian = x.byteswap().newbyteorder()
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_create_numpy_vector_float32 (__main__.TestByteLayout)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/flatbuffers-24.3.25/work/flatbuffers-24.3.25/tests/py_test.py", line 1290, in test_create_numpy_vector_float32
x_other_endian = x.byteswap().newbyteorder()
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_create_numpy_vector_float64 (__main__.TestByteLayout)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/flatbuffers-24.3.25/work/flatbuffers-24.3.25/tests/py_test.py", line 1364, in test_create_numpy_vector_float64
x_other_endian = x.byteswap().newbyteorder()
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_create_numpy_vector_int64 (__main__.TestByteLayout)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/flatbuffers-24.3.25/work/flatbuffers-24.3.25/tests/py_test.py", line 1216, in test_create_numpy_vector_int64
x_other_endian = x.byteswap().newbyteorder()
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_create_numpy_vector_int8 (__main__.TestByteLayout)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/flatbuffers-24.3.25/work/flatbuffers-24.3.25/tests/py_test.py", line 1098, in test_create_numpy_vector_int8
x_other_endian = x.byteswap().newbyteorder()
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
======================================================================
ERROR: test_create_numpy_vector_uint16 (__main__.TestByteLayout)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/flatbuffers-24.3.25/work/flatbuffers-24.3.25/tests/py_test.py", line 1147, in test_create_numpy_vector_uint16
x_other_endian = x.byteswap().newbyteorder()
AttributeError: `newbyteorder` was removed from the ndarray class in NumPy 2.0. Use `arr.view(arr.dtype.newbyteorder(order))` instead.
----------------------------------------------------------------------
Ran 123 tests in 0.079s
FAILED (errors=6)
OS: Gentoo
Python 3.10.14
Numpy 2.0.0-rc2
GCC 15
FlatBuffers 24.3.25
It seems that the issue is still present in master branch but I didn't test it. I didn't find any related Issue nor PR.
The text was updated successfully, but these errors were encountered:
Tests require newbyteorder method, which was removed from the ndarray
class in NumPy 2.0. The issue was reported upstream, see [1].
[1] google/flatbuffers#8332
Signed-off-by: Petr Vaněk <[email protected]>
arkamar
added a commit
to arkamar/flatbuffers
that referenced
this issue
Jul 1, 2024
I tried to run tests with Numpy-2.0.0-rc2 and they fail with following errors:
It seems that the issue is still present in master branch but I didn't test it. I didn't find any related Issue nor PR.
The text was updated successfully, but these errors were encountered: