Bug 2046668
Summary: | numpy fails to build with Python 3.11: error: _PyErr_StackItem{aka struct _err_stackitem} has no member named exc_type | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tomáš Hrnčiar <thrnciar> |
Component: | numpy | Assignee: | Gwyn Ciesla <gwync> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | cstratak, gwync, jspaleta, mhroncok, orion, rdieter, thrnciar, tomspur, vstinner |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-06-21 14:37:40 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 2016048, 2098667, 2098881, 2099017 |
Description
Tomáš Hrnčiar
2022-01-27 07:21:30 UTC
I proposed to revert the change upstream until Cython and numpy are updated for this incompatible C API change: https://bugs.python.org/issue45711#msg412264 I also opened a discussion on python-dev: "Please update Cython before introcuding C API incompatible changes in Python". https://mail.python.org/archives/list/python-dev@python.org/thread/RS2C53LDZPXHRR2VCY2G2YSPDVA4LNQU/ This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36. =================================== FAILURES =================================== ______________________ TestConversion.test_to_int_scalar _______________________ self = <numpy.core.tests.test_multiarray.TestConversion object at 0x7f4fda4d6790> def test_to_int_scalar(self): # gh-9972 means that these aren't always the same int_funcs = (int, lambda x: x.__int__()) for int_func in int_funcs: assert_equal(int_func(np.array(0)), 0) assert_equal(int_func(np.array([1])), 1) assert_equal(int_func(np.array([[42]])), 42) assert_raises(TypeError, int_func, np.array([1, 2])) # gh-9972 assert_equal(4, int_func(np.array('4'))) assert_equal(5, int_func(np.bytes_(b'5'))) assert_equal(6, int_func(np.unicode_(u'6'))) class HasTrunc: def __trunc__(self): return 3 > assert_equal(3, int_func(np.array(HasTrunc()))) E DeprecationWarning: The delegation of int() to __trunc__ is deprecated. HasTrunc = <class 'numpy.core.tests.test_multiarray.TestConversion.test_to_int_scalar.<locals>.HasTrunc'> int_func = <class 'int'> int_funcs = (<class 'int'>, <function TestConversion.test_to_int_scalar.<locals>.<lambda> at 0x7f4fda4ee020>) self = <numpy.core.tests.test_multiarray.TestConversion object at 0x7f4fda4d6790> ../../../../BUILDROOT/numpy-1.22.0-3.fc37.x86_64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_multiarray.py:8324: DeprecationWarning ____________________ TestUfunc.test_pickle_name_is_qualname ____________________ self = <numpy.core.tests.test_ufunc.TestUfunc object at 0x7f4fdbe53110> def test_pickle_name_is_qualname(self): # This tests that a simplification of our ufunc pickle code will # lead to allowing qualnames as names. Future ufuncs should # possible add a specific qualname, or a hook into pickling instead # (dask+numba may benefit). _pickleable_module_global.ufunc = umt._pickleable_module_global_ufunc > obj = pickle.loads(pickle.dumps(_pickleable_module_global.ufunc)) self = <numpy.core.tests.test_ufunc.TestUfunc object at 0x7f4fdbe53110> ../../../../BUILDROOT/numpy-1.22.0-3.fc37.x86_64/usr/lib64/python3.11/site-packages/numpy/core/tests/test_ufunc.py:209: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Cython.Shadow.CythonCImports object at 0x7f4ff1ed4ed0> item = '_pickleable_module_global' def __getattr__(self, item): if item.startswith('__') and item.endswith('__'): raise AttributeError(item) > return __import__(item) E ModuleNotFoundError: No module named '_pickleable_module_global' item = '_pickleable_module_global' self = <Cython.Shadow.CythonCImports object at 0x7f4ff1ed4ed0> /usr/lib64/python3.11/site-packages/Cython/Shadow.py:542: ModuleNotFoundError =========================== short test summary info ============================ With python 3.11.0b1 there is an error during collecting the tests.Also TestConversion.test_to_int_scalar mentioned above is still broken. ==================================== ERRORS ==================================== _____________ ERROR collecting typing/tests/test_generic_alias.py ______________ ../../../../BUILDROOT/numpy-1.22.3-1.fc37.x86_64/usr/lib64/python3.11/site-packages/numpy/typing/tests/test_generic_alias.py:23: in <module> FuncType = Callable[[Union[_GenericAlias, types.GenericAlias]], Any] Any = typing.Any Callable = typing.Callable DType = numpy.dtype[+ScalarType] DType_ref = numpy.dtype[+ScalarType] NDArray = numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]] NDArray_ref = numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]] ScalarType = +ScalarType T1 = ~T1 T2 = ~T2 Tuple = typing.Tuple Type = typing.Type TypeVar = <class 'typing.TypeVar'> Union = typing.Union _GenericAlias = <class 'numpy.typing._generic_alias._GenericAlias'> __builtins__ = <builtins> __cached__ = '/builddir/build/BUILDROOT/numpy-1.22.3-1.fc37.x86_64/usr/lib64/python3.11/site-packages/numpy/typing/tests/__pycache__/test_generic_alias.cpython-311.pyc' __doc__ = None __file__ = '/builddir/build/BUILDROOT/numpy-1.22.3-1.fc37.x86_64/usr/lib64/python3.11/site-packages/numpy/typing/tests/test_generic_alias.py' __loader__ = <_pytest.assertion.rewrite.AssertionRewritingHook object at 0x7f6280b124d0> __name__ = 'numpy.typing.tests.test_generic_alias' __package__ = 'numpy.typing.tests' __spec__ = ModuleSpec(name='numpy.typing.tests.test_generic_alias', loader=<_pytest.assertion.rewrite.AssertionRewritingHook obje...uild/BUILDROOT/numpy-1.22.3-1.fc37.x86_64/usr/lib64/python3.11/site-packages/numpy/typing/tests/test_generic_alias.py') annotations = _Feature((3, 7, 0, 'beta', 1), (3, 11, 0, 'alpha', 0), 16777216) copy = <module 'copy' from '/usr/lib64/python3.11/copy.py'> np = <module 'numpy' from '/builddir/build/BUILDROOT/numpy-1.22.3-1.fc37.x86_64/usr/lib64/python3.11/site-packages/numpy/__init__.py'> pickle = <module 'pickle' from '/usr/lib64/python3.11/pickle.py'> pytest = <module 'pytest' from '/usr/lib/python3.11/site-packages/pytest/__init__.py'> sys = <module 'sys' (built-in)> types = <module 'types' from '/usr/lib64/python3.11/types.py'> weakref = <module 'weakref' from '/usr/lib64/python3.11/weakref.py'> /usr/lib64/python3.11/typing.py:350: in inner return func(*args, **kwds) args = (typing.Union, (<class 'numpy.typing._generic_alias._GenericAlias'>, <class 'types.GenericAlias'>)) cached = <functools._lru_cache_wrapper object at 0x7f62815f5380> func = <function _SpecialForm.__getitem__ at 0x7f62815fc7c0> kwds = {} /usr/lib64/python3.11/typing.py:450: in __getitem__ return self._getitem(self, parameters) parameters = (<class 'numpy.typing._generic_alias._GenericAlias'>, <class 'types.GenericAlias'>) self = typing.Union /usr/lib64/python3.11/typing.py:661: in Union return _UnionGenericAlias(self, parameters) msg = 'Union[arg, ...]: each arg must be a type.' parameters = (<class 'numpy.typing._generic_alias._GenericAlias'>, <class 'types.GenericAlias'>) self = typing.Union /usr/lib64/python3.11/typing.py:1317: in __init__ self.__parameters__ = _collect_parameters(args) __class__ = <class 'typing._GenericAlias'> _paramspec_tvars = False args = (<class 'numpy.typing._generic_alias._GenericAlias'>, <class 'types.GenericAlias'>) inst = True name = None origin = typing.Union self = typing.Union[numpy.typing._generic_alias._GenericAlias, types.GenericAlias] /usr/lib64/python3.11/typing.py:257: in _collect_parameters for x in getattr(t, '__parameters__', ()): E TypeError: 'property' object is not iterable args = (<class 'numpy.typing._generic_alias._GenericAlias'>, <class 'types.GenericAlias'>) parameters = [] t = <class 'numpy.typing._generic_alias._GenericAlias'> =========================== short test summary info ============================ ERROR ../../typing/tests/test_generic_alias.py - TypeError: 'property' object... !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! 1296 deselected, 1 error in 8.48s |