aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/support/signature/mapping.py
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2018-07-08 18:40:33 +0200
committerChristian Tismer <tismer@stackless.com>2018-07-09 15:34:00 +0000
commit55d89709967354e606313a6078f580c8073a6dd8 (patch)
treec0c9419093bea05230590739031235b14f62126a /sources/pyside2/PySide2/support/signature/mapping.py
parent5662706937bd6a1449538539e3a503c6cbc45399 (diff)
Fix Limited API and Signature Glitches in Python 3.7
When the homebrew version of Python 3.7 appeared so unforeseen early, I felt inclined to fix these glitches, immediately: In Python 3.7, the typing module was more changed than expected. Since we don't support versions below 3.5, it was easy to fix by avoiding to copy typing.py for version 3.x, altogether. It stays there for Python 2.7 . Furthermore, the Python issue 33738 will later be solved than the code expected, so I fixed that one for all by a macro definition. Task-number: PYSIDE-741 Change-Id: Ia56ccd1ef20cb9536b1d39f190e011e5dccf1f22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/support/signature/mapping.py')
-rw-r--r--sources/pyside2/PySide2/support/signature/mapping.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/pyside2/PySide2/support/signature/mapping.py b/sources/pyside2/PySide2/support/signature/mapping.py
index 3e05dbcb2..7151af8bb 100644
--- a/sources/pyside2/PySide2/support/signature/mapping.py
+++ b/sources/pyside2/PySide2/support/signature/mapping.py
@@ -55,8 +55,11 @@ See _resolve_value() in singature.py
import sys
import struct
import PySide2
+try:
+ from . import typing
+except ImportError:
+ import typing
-from . import typing
ellipsis = "..."
Char = typing.Union[str, int] # how do I model the limitation to 1 char?
StringList = typing.List[str]