aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2020-03-19 15:25:13 +0100
committerChristian Tismer <tismer@stackless.com>2020-03-20 01:00:50 +0100
commit719277aee248afe75abfac77414540827517ad3f (patch)
treef2dcfbe52d1b5cde9466d08dbc35f9d700798299
parentcf059117c3926081bee79d9223017147613649a4 (diff)
Avoid a signature warning in Python 3.6
Regular expressions which can evaluate to an empty string result in a warning in Python 3.6 if you try to re.split() on that pattern. The generated pattern for the signature parser was enhanced to avoid the unintended empty pattern. This change was not very large, actually only a single bit (but the right one). :-) >>> bin(ord("*")) '0b101010' >>> bin(ord("+")) '0b101011' Change-Id: I15ba6ef6f108c51afba59b4004261bede26c4a74 Fixes: PYSIDE-1247 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/tool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/tool.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/tool.py
index 3b0825049..24e75e42c 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/tool.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/tool.py
@@ -116,7 +116,7 @@ def build_brace_pattern(level, separators=""):
| {so} {replacer} {sc}
| {co} {replacer} {cc}
| {ao} {replacer} {ac}
- )*
+ )+
)
""")
no_braces_q = "[^{all}{qu}{bs}]*".format(**locals())