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.8.0, 6.7.1
    • 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

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes