PyQt5 QApplication.setOrganizationName broken with None argument in snapshots

Florian Bruhin me at the-compiler.org
Thu Jul 27 08:17:50 BST 2023


> On 20/07/2023 23:05, Florian Bruhin wrote:
> > This works with PyQt 6.5.1:
> > 
> >     >>> from PyQt6.QtCore import QProcess
> >     >>> QProcess.startDetached("echo", ["test"], None)
> >     test
> >     (True, 132311)
> > 
> > But fails on 6.5.2.dev2307152153:
> > 
> >     Traceback (most recent call last):
> >       File "<stdin>", line 1, in <module>
> >     TypeError: arguments did not match any overloaded call:
> >       startDetached(
> >           program: Optional[str],
> >           arguments: Iterable[Optional[str]] = [],
> >           workingDirectory: Optional[str] = ''
> >       ): argument 3 has unexpected type 'NoneType'
> >       startDetached(self): first argument of unbound method must have type 'QProcess'
> 
> Fixed, thanks.

Something similar seems to have popped up in PyQt5 snapshots, despite
the changelog claiming that such issues were fixed on the 21st.

With PyQt5 5.15.9:

    >>> from PyQt5.QtWidgets import QApplication
    >>> app = QApplication([])
    >>> app.setOrganizationName(None)
    >>>

But with 5.15.10.dev2307211354:

    >>> from PyQt5.QtWidgets import QApplication
    >>> app = QApplication([])
    >>> app.setOrganizationName(None)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: setOrganizationName(orgName: Optional[str]): argument 1 has unexpected type 'NoneType'

Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20230727/7bc9fa3e/attachment.sig>


More information about the PyQt mailing list