diff options
| author | Christian Tismer <tismer@stackless.com> | 2021-05-08 16:06:23 +0200 |
|---|---|---|
| committer | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2022-01-05 12:11:47 +0100 |
| commit | c77bed5125660d6ad173321e1e40b6220795a976 (patch) | |
| tree | 93e699f348639849f0fcf44e0cdeaa4398ac8c0f /examples/scriptableapplication/pythonutils.cpp | |
| parent | 49517d06cb09e36ecf00228bc8fa862a722842ed (diff) | |
py3.10-prep: Fix parser.py for changed typing module
The typing module has subtle changes that are not even
documented: Typing types now have a __name__ attribute.
That confused the parser of the pyi generator because
suddenly stingizing
Callable[..., Optional[str]]
resulted in
Callable[..., Optional]
because of special rules that return the generic name
of a typing type, which was very unexpected. Finding this bug
took a lot of debugging of the recursive `_resolve_type`
function.
We finally move the debugging_aid string as a function into
lib/tool.py, because this was very helpful.
Some changes are not valid in 5.15, because there were other
modification in 6.x source code, like f-string, and some Qt install dir
struncture, like Qt/resources.
[ChangeLog][shiboken6] The parser for .pyi files needed an update
because of undocumented changes in typing.py for Python 3.10 .
Task-number: PYSIDE-1436
Change-Id: I3b8f2c1aa52a23014a8a915a0c677af96dfc536f
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 2530cb3f165ac02b8f7132e3f5ab4f7f6896dbd9)
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/scriptableapplication/pythonutils.cpp')
0 files changed, 0 insertions, 0 deletions
