aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build_history/blacklist.txt5
-rw-r--r--sources/pyside2/PySide2/support/generate_pyi.py1
-rw-r--r--sources/pyside2/tests/registry/exists_darwin_5_14_0_ci.py1
-rw-r--r--sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_0_ci.py1
-rw-r--r--sources/pyside2/tests/registry/exists_win32_5_14_0_ci.py1
-rw-r--r--sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_0_ci.py1
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/loader.py6
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py55
8 files changed, 19 insertions, 52 deletions
diff --git a/build_history/blacklist.txt b/build_history/blacklist.txt
index 9b63f9784..51fd7681d 100644
--- a/build_history/blacklist.txt
+++ b/build_history/blacklist.txt
@@ -94,5 +94,6 @@
linux
darwin
# Open GL functions failures on macOS (2/2020)
-[registry::existence_test]
- darwin
+##[registry::existence_test]
+## darwin
+## Enable again after recreating!
diff --git a/sources/pyside2/PySide2/support/generate_pyi.py b/sources/pyside2/PySide2/support/generate_pyi.py
index f173ec2fc..f92367c82 100644
--- a/sources/pyside2/PySide2/support/generate_pyi.py
+++ b/sources/pyside2/PySide2/support/generate_pyi.py
@@ -142,7 +142,6 @@ class Formatter(Writer):
self.print(" import typing")
self.print("except ImportError:")
self.print(" from PySide2.support.signature import typing")
- self.print("from PySide2.support.signature import typing")
self.print("from PySide2.support.signature.mapping import (")
self.print(" Virtual, Missing, Invalid, Default, Instance)")
self.print()
diff --git a/sources/pyside2/tests/registry/exists_darwin_5_14_0_ci.py b/sources/pyside2/tests/registry/exists_darwin_5_14_0_ci.py
index 98ec8fcbc..82295c216 100644
--- a/sources/pyside2/tests/registry/exists_darwin_5_14_0_ci.py
+++ b/sources/pyside2/tests/registry/exists_darwin_5_14_0_ci.py
@@ -1,3 +1,4 @@
+recreate
#############################################################################
##
## Copyright (C) 2018 The Qt Company Ltd.
diff --git a/sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_0_ci.py b/sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_0_ci.py
index e19f8a27c..1a7266b36 100644
--- a/sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_0_ci.py
+++ b/sources/pyside2/tests/registry/exists_red_hat_enterprise_linux_workstation7_6_5_14_0_ci.py
@@ -1,3 +1,4 @@
+recreate
#############################################################################
##
## Copyright (C) 2018 The Qt Company Ltd.
diff --git a/sources/pyside2/tests/registry/exists_win32_5_14_0_ci.py b/sources/pyside2/tests/registry/exists_win32_5_14_0_ci.py
index 575236710..7b360284d 100644
--- a/sources/pyside2/tests/registry/exists_win32_5_14_0_ci.py
+++ b/sources/pyside2/tests/registry/exists_win32_5_14_0_ci.py
@@ -1,3 +1,4 @@
+recreate
#############################################################################
##
## Copyright (C) 2018 The Qt Company Ltd.
diff --git a/sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_0_ci.py b/sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_0_ci.py
index 2bacf6ae7..5fbe713e7 100644
--- a/sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_0_ci.py
+++ b/sources/pyside2/tests/registry/exists_x86_64_suse_linux_5_14_0_ci.py
@@ -1,3 +1,4 @@
+recreate
#############################################################################
##
## Copyright (C) 2018 The Qt Company Ltd.
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/loader.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/loader.py
index a0367883a..6564786b9 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/loader.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/loader.py
@@ -152,10 +152,12 @@ if sys.version_info >= (3,):
import inspect
inspect.formatannotation = formatannotation
else:
- if "typing" not in sys.modules:
+ tp_name = "typing"
+ if tp_name not in sys.modules:
orig_typing = False
from shibokensupport import typing27 as typing
- sys.modules["typing"] = typing
+ sys.modules[tp_name] = typing
+ typing.__name__ = tp_name
else:
import typing
import inspect
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index 0767e8fd4..0571b11bd 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -73,45 +73,6 @@ NoneType = type(None)
_S = TypeVar("_S")
-# Building our own Char type, which is much nicer than
-# Char = typing.Union[str, int] # how do I model the limitation to 1 char?
-
-class _CharMeta(type):
- def __repr__(self):
- return '%s.%s' % (self.__module__, self.__name__)
-
-
-class Char(with_metaclass(_CharMeta)):
- """
- From http://doc.qt.io/qt-5/qchar.html :
-
- In Qt, Unicode characters are 16-bit entities without any markup or
- structure. This class represents such an entity. It is lightweight,
- so it can be used everywhere. Most compilers treat it like an
- unsigned short.
-
- Here, we provide a simple implementation just to avoid long aliases.
- """
- __module__ = "typing"
-
- def __init__(self, code):
- if isinstance(code, int):
- self.code = code & 0xffff
- else:
- self.code = ord(code)
-
- def __add__(self, other):
- return chr(self.code) + other
-
- def __radd__(self, other):
- return other + chr(self.code)
-
- def __repr__(self):
- return "typing.Char({})".format(self.code)
-
-typing.Char = Char
-
-
MultiMap = typing.DefaultDict[str, typing.List[str]]
# ulong_max is only 32 bit on windows.
@@ -266,7 +227,7 @@ namespace = globals() # our module's __dict__
type_map.update({
"...": ellipsis,
"bool": bool,
- "char": Char,
+ "char": int,
"char*": str,
"char*const": str,
"double": float,
@@ -278,7 +239,7 @@ type_map.update({
"PyObject": object,
"PySequence": typing.Iterable, # important for numpy
"PyTypeObject": type,
- "QChar": Char,
+ "QChar": str,
"QHash": typing.Dict,
"qint16": int,
"qint32": int,
@@ -305,7 +266,7 @@ type_map.update({
"QVector": typing.List,
"real": float,
"short": int,
- "signed char": Char,
+ "signed char": int,
"signed long": int,
"std.list": typing.List,
"std.map": typing.Dict,
@@ -314,12 +275,12 @@ type_map.update({
"str": str,
"true": True,
"Tuple": typing.Tuple,
- "uchar": Char,
+ "uchar": int,
"uchar*": str,
"uint": int,
"ulong": int,
"ULONG_MAX": ulong_max,
- "unsigned char": Char, # 5.9
+ "unsigned char": int, # 5.9
"unsigned char*": str,
"unsigned int": int,
"unsigned long int": int, # 5.6, RHEL 6.6
@@ -405,7 +366,7 @@ def init_minimal():
def init_sample():
import datetime
type_map.update({
- "char": Char,
+ "char": int,
"char**": typing.List[str],
"Complex": complex,
"double": float,
@@ -418,7 +379,7 @@ def init_sample():
"PStr": str,
"PyDate": datetime.date,
"sample.bool": bool,
- "sample.char": Char,
+ "sample.char": int,
"sample.double": float,
"sample.int": int,
"sample.ObjectType": object,
@@ -427,7 +388,7 @@ def init_sample():
"sample.Photon.TemplateBase[Photon.IdentityType]": sample.Photon.ValueIdentity,
"sample.Point": Point,
"sample.PStr": str,
- "sample.unsigned char": Char,
+ "sample.unsigned char": int,
"std.size_t": int,
"std.string": str,
"ZeroIn": 0,