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

Numpy2 incompatible with Shiboken2

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.15.2
    • Shiboken
    • None
    • Windows
    • 68d2b13a4 (dev), 02ad0b372 (6.7), 88450bbdc (tqtc/lts-6.5), 411dc1fe6 (tqtc/lts-6.2), 58381296f (tqtc/lts-5.15)

    Description

      Hi All

      I just updated to the brand new numpy 2. Seems it (may) breaks PySide2, at least there are a lot of warnings printed now. I installed PySide2 from pip.

      Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import shiboken2
      
      A module that was compiled using NumPy 1.x cannot be run in
      NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
      versions of NumPy, modules must be compiled with NumPy 2.0.
      Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
      
      If you are a user of the module, the easiest solution will be to
      downgrade to 'numpy<2' or try to upgrade the affected module.
      We expect that some modules will need time to support NumPy 2.
      
      Traceback (most recent call last):  File "<stdin>", line 1, in <module>
        File "...\lib\site-packages\shiboken2\__init__.py", line 27, in <module>
          from .shiboken2 import *
      >>> shiboken2.__version__
      '5.15.2.1'

      Is there a new release of shiboken2 supporting numpy2 planned?

      Best regards,
      Oli

      Attachments

        For Gerrit Dashboard: PYSIDE-2789
        # Subject Branch Project Status CR V

        Activity

          People

            kleint Friedemann Kleint
            olivermeier Oliver Meier
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes