Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npsupport does not work with numpy>=2.0.0 #573

Open
junkmd opened this issue Jun 21, 2024 · 0 comments
Open

npsupport does not work with numpy>=2.0.0 #573

junkmd opened this issue Jun 21, 2024 · 0 comments
Labels
npsupport tests enhance or fix tests

Comments

@junkmd
Copy link
Collaborator

junkmd commented Jun 21, 2024

I noticed that the tests for comtypes.npsupport fail when numpy==2.0.0 is installed.

ERROR: test_VT_I4_ndarray_enabled (test_npsupport.NumpySupportTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "...\comtypes\comtypes\test\test_npsupport.py", line 66, in call_enabled
    func(self)
  File "...\comtypes\comtypes\test\test_npsupport.py", line 188, in test_VT_I4_ndarray
    sa = t.from_param(in_arr)
  File "...\comtypes\comtypes\safearray.py", line 214, in from_param
    value = cls.create(value, extra)
  File "...\comtypes\comtypes\safearray.py", line 122, in create
    return cls.create_from_ndarray(value, extra)
  File "...\comtypes\comtypes\safearray.py", line 171, in create_from_ndarray
    raise TypeError("Wrong array item type")
TypeError: Wrong array item type

To avoid a situation where we can't develop other features until npsupport supports numpy==2.0.0, I will change the GHA workflow so that the numpy installed in the CI environment is a version lower than 2.0.0 for the time being.

I'm not particularly familiar with the use cases for npsupport, so I hope that community members who have a high priority for npsupport will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npsupport tests enhance or fix tests
Projects
None yet
Development

No branches or pull requests

1 participant