Qt causes Python's Py_Main to no-op on Windows
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 36k
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 558
Beschreibung
Bug report
There is a a very weird bug with Python 3.10.4 and Qt (both 5.15.2 and 6.3.0) such that if you reference any non-trivial Qt classes or methods (such as qIsFinite, QString, or QVector) on Windows, trying to call Py_Main (or Py_BytesMain) will result in a no-op (the program will immediately exit 0 and not show the Python interactive shell). Furthermore, the bug is absent on MacOS. I have linked a minimal example of the bug at https://github.com/Landmaster/python-embed-qt-bug. The corresponding bug report on the QT side is at https://bugreports.qt.io/browse/QTBUG-103734.
Your environment
- CPython versions tested on: 3.10.4
- Operating system and architecture: Windows 11
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem verlinkten Minimalbeispiel unter Windows 11 mit CPython 3.10.4 und Qt 5.15.2 oder 6.3.0 und vergleiche Py_Main und Py_BytesMain mit und ohne nichttriviale Qt-Referenzen. Lies den verlinkten Bericht QTBUG-103734 und ermittle die Ursache; die Arbeit ist abgeschlossen, wenn das eingebettete Programm nicht mehr still beendet wird, anstatt die interaktive Shell anzuzeigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100