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

PySide6/Shiboken overrides standard library enum.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.3.2
    • Shiboken
    • None
    • Platform: Ubuntu 20.04 / Pop-OS / Windows
      Python version: 3.8.10, 3.9.10
    • All
    • 3609308c63 (pyside/pyside-setup/dev) 0b29d3aa80 (pyside/pyside-setup/6.4) 8ba40d22c0 (pyside/pyside-setup/6.4.0) 0b29d3aa80 (pyside/tqtc-pyside-setup/6.4) 8ba40d22c0 (pyside/tqtc-pyside-setup/6.4.0) 3609308c63 (pyside/tqtc-pyside-setup/dev)

    Description

      We found some strange behaviour and it seems Shiboken overrides the built in enum.

      Minimal example:

       

      import enum
      class MyEnum(enum.Enum):
          MEMBER = 0
      print(f"{isinstance(MyEnum.MEMBER, enum.Enum)=}")
      import PySide6
      print(f"{PySide6.__version__=}")
      print(f"{isinstance(MyEnum.MEMBER, enum.Enum)=}")
      import enum
      print(f"{isinstance(MyEnum.MEMBER, enum.Enum)=}")
      -----------OUTPUT--------------
      isinstance(MyEnum.MEMBER, enum.Enum)=True
      PySide6.__version__='6.3.2'
      isinstance(MyEnum.MEMBER, enum.Enum)=True
      isinstance(MyEnum.MEMBER, enum.Enum)=False
      

       

       

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            andre.hedesand André Hedesand
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes