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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated 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)

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes