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

isinstance / inheritance broken depending on import order when using star import

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.7.1, 6.8.0
    • 6.7.0
    • PySide
    • None
    • Linux x86_64 Python 3.11
    • Linux/X11
    • 556bc8d15 (dev), ab5e13242 (6.7)

    Description

      this code:

       

      from PySide6.QtGui import QActionGroup
      from PySide6.QtWidgets import *
      QApplication([])
      assert isinstance(QFileDialog(), QWidget)
      

       

      Passes on 6.6.3.1 but fails on 6.7.0. Commenting out the QActionGroup import or not using star import for QtWidgets makes it pass. Moving the QActionGroup import to after the star import makes it pass. Originally observed in much more cryptic form in CI runs such as [this one|#step:10:86].] , but replicated locally on Ubuntu 23.10 with Python 3.11.

      Attachments

        Issue Links

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

          Activity

            People

              ctismer Christian Tismer
              larsoner Eric Larson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes