Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2035

sbknumpyarrayconverter.cpp using deprecated NPY_ARRAY_UPDATEIFCOPY

    XMLWordPrintable

Details

    • Windows
    •   1422cf4a7f277fb13fd209f24a90d6c02641497d

    Description

      When trying to compile commit 83704e5a1126cffc2741e83dc500bbc35418ec2e with numpy version 1.23.1 under python 3.9.12 on Windows 10 I get the message

      pyside-setup\sources\shiboken6\libshiboken\sbknumpyarrayconverter.cpp(119): error C2065: 'NPY_ARRAY_UPDATEIFCOPY': undeclared identifier

      I assume this is due to the deprecation of the flags NPY_ARRAY_UPDATEIFCOPY and NPY_ARRAY_WRITEBACKIFCOPY or that these symbols have been moved to a new file.

      https://numpy.org/doc/1.17/reference/c-api.array.html

      "If the (deprecated) NPY_ARRAY_UPDATEIFCOPY or the NPY_ARRAY_WRITEBACKIFCOPY flags are set, it has a different meaning, namely base is the array into which the current array will be copied upon copy resolution. This overloading of the base property for two functions is likely to change in a future version of NumPy."

      I am using Qt 6.2.3 in case that matters. I also tested by checking out tags/v6.2.4, but the same problem occurs. 
      On the same system I had a successful compile with commit 
      96b84fe6c7c4a9990288865ffa879091c826fe8f under python 3.7 (numpy version 1.21.5).
      Downgrading the numpy version to 1.21.5 and leaving python 3.9 seems to fix fixes the issue. The problem is thus almost certainly because of changes in the numpy version.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            meetaig Tim Elberfeld
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes