diff options
author | Christian Tismer <tismer@stackless.com> | 2019-01-04 19:30:03 +0100 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2019-01-06 07:10:53 +0000 |
commit | 60ce66780a82af1314fae9d82ace519815e7a3a1 (patch) | |
tree | 87e09852a4baff8aca0c83edd53115a2d49c770e /sources/pyside2 | |
parent | ff8f597b4581efa48074286cac6f9f1eb1827cd0 (diff) |
Fix a rare type hint racing condition
When building type hints during the PySide build, it can happen that
the QtMultimedia module already exists, but the QtMultimediaWidgets
module is not yet built.
Since during the build also directories exist alongside with the not yet
existing modules, it can happen that such a directory is picked up by
Python 3, which supports namespace modules without __init__.py .
This case was already handled by the mapping modules, but
QtMultimediaWidgets was directly imported and not checked.
Now the check code has been extracted from the mapping reloader,
and there is no more unchecked module left.
Task-number: PYSIDE-735
Change-Id: I1a1f53525417651005d0759e417082fe71b02773
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside2')
-rw-r--r-- | sources/pyside2/PySide2/support/signature/mapping.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/support/signature/mapping.py b/sources/pyside2/PySide2/support/signature/mapping.py index c39821f05..61fa2d41f 100644 --- a/sources/pyside2/PySide2/support/signature/mapping.py +++ b/sources/pyside2/PySide2/support/signature/mapping.py @@ -311,6 +311,8 @@ def init_QtXmlPatterns(): def init_QtMultimedia(): import PySide2.QtMultimediaWidgets + # Check if foreign import is valid. See mapping.py in shiboken2. + check_module(PySide2.QtMultimediaWidgets) type_map.update({ "QGraphicsVideoItem": PySide2.QtMultimediaWidgets.QGraphicsVideoItem, "QVideoWidget": PySide2.QtMultimediaWidgets.QVideoWidget, |