| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Imports should not touch the feature dict unless they are feature imports.
This was a small error in the import logic.
Change-Id: I16045fffb4b770861ff2efba674667894e0798e5
Fixes: PYSIDE-1548
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 39ba36db0fb8a3c722cb23e02f38abab9c67592c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Result tuples do not (yet) get information from XML.
Instead, they fetch their info solely from the embedded
signature strings and information encoded in mapping.py .
When a variable is determined as a result variable, it is
removed from the arg list and normally appended to the
return tuple.
It turned out that a special rule is needed:
A variable that comes first in the variable list should
also be first in the result tuple.
This heuristics should be replaced by more introspection.
Right now, this suffices as a working fix.
Fixes: PYSIDE-1409
Change-Id: Ib65682439e2f678380e0f58a42a36506d0766ddf
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 3506158551488788450498f9b4ffe86375172fea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A special case "std::optional" caused an exception at an unforeseen
place, because "std" was not recognized in an eval.
Turn this into another runtime warning.
Also, the "std::optional" case was added as "typing.Optional"
after applying und testing the above fix.
Change-Id: I722ae463d133125e96ab09aeb38f21cdc2453d5b
Fixes: PYSIDE-1538
Reviewed-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 0a47111b454b8e1582d8595cadc348b61989ff29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch originally was
"__feature__: Make imports more safe against installation errors"
After applying the patch to 5.15 with errors, it became clear that
not __feature__ was a problem, but the "import PySideX.support"
did not work in the embedding case.
This observation made the error message concerning PyInstaller
pointless. Instead, the pseudo-import of PySideX.support was fixed
to work correctly in all cases.
Tested on 5.15 with PyInstaller, this is now going back into dev.
Manually cherry-picked to 6.0
Pick-to: 5.15
Task-number: PYSIDE-1502
Change-Id: I2fd680a6a28de00f5392147b0d050deb7663dc22
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch had a way too complicated method to find
out if something is a method, and this broke on
Python 2 because we don't have the __qualname__
attribute everywhere.
But this can be done much easier: We check the type and see
if it is a function or builtin function.
Everything else must be a method, no matter what it is :)
Change-Id: I07e5690f36e4ed4d50ea5e203233b369dc70fa5f
Task-number: PYSIDE-510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 609bd8121b9a45846b236ecf51226da026651d51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signature module is modified again to be more correct when
using the mypy application.
This part splits some changes which occurred when working on
Shiboken.Enum inheritance.
There will be a number of follow-ups:
- signatures for all shiboken types
- test cases for signatures
- signature support for different __feature__ selections
Change-Id: Ifb0d92bf7641f2909ab950e3458b3c3c68c20dad
Task-number: PYSIDE-510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 123e27090e0ec4f8d32f301700c9ff9d1b49ba2a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
This should be the last patch related the usage of f-strings
from the 'sources' directory.
Change-Id: I0288d720dc4930dee088ca3396a66d1b3ba18f76
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit d9f344fcef6bec04a787f9ea9f4ea94f15eaa26c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our parser regex handled everything but no single quotes.
In Qt6, single quotes appeared with a backslash escape.
Errors will no longer give a warning but raise a SystemError
from now on, because syntax errors in the parser are not
tolerable.
Task-number: PYSIDE-510
Change-Id: I6790d4aa73b507160b0c3107c2aa665fe6aae49d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit be04c2df4202bcf2086348380da91fcfb28397d6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the reworking of error messages, the `__init__` function
became visible both via the "class" and as "class.__init__".
The constructor is treated specially because we want to list it first.
Avoid duplicate generation of the constructor by filtering
in "enum_sig.py".
Change-Id: I04c0a47990d6ca8d97a748f7ecfe911f9aec2fe6
Task-number: PYSIDE-1305
Pick-to: 5.15
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a small improvement needed in errorhandler.py:
It was not consequent to use TypeError for missing attributes
in one case, and to use AttributeError on the constructors.
The error message may be different, but it always should be
AttributeError.
Task-number: PYSIDE-1305
Task-number: PYSIDE-1019
Change-Id: I1c278c5256000f0f0fe66ca9da36c2d078002b25
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PySide has a distinction between functions with simple arguments and
functions with keyword arguments for optional keywords.
When a function has keywords specified in one or more signature
branch, it gets the METH_KEYWORDS flag. In this case, it is checked
that no argument is given positional and per keyword at the same time.
Completely forgotten was to check which keywords are allowed in that
branch, if at all. The problem was much complicated because
constructors can contain extra signals and properties.
At the same time, all further error messages are generated with Python.
This adds necessary flexibility when features are active.
All PyBuildValue objects were refcount leaking. That has been replaced
by static createStaticString expressions.
The `argNames` structure is no longer needed by the improved algorithm.
Change-Id: Ic297912c47231720f61c7d4b79b46a1e376a9941
Fixes: PYSIDE-1305
Task-number: PYSIDE-1019
Pick-to: 5.15
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Features seem to work quite good so far, but they clearly need
much more testing.
One of the problems is that error messages are produced,
but the function name is not found and we get an ugly default
error message.
This is an efficient implementation that does all name mangling
in the C code. A helper dict avoids linear search for properties.
Task-number: PYSIDE-1019
Change-Id: Ic87c4a6e7dc2b2a251e809d6df0eb7fb9ca8021c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Note that not all future statements can be removed:
PEP 563 for instance deals with
from __future__ import annotations
Task-number: PYSIDE-904
Change-Id: Ia387ec87f3c68ca64d13e8e80191eda900f58638
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since class properties are now developed, we now have the
case that class methods can produce errors without having
a valid signature, yet.
Signatures for class methods will be implemented eventually.
Before that happens, we provide a default error message
which shows the given arguments.
This is sufficient for the moment, because errors in class methods
can currently be created by class property setters only which have
a quite trivial signature.
Task-number: PYSIDE-510
Change-Id: I6397da114cedd628ba19c86b153e60497a0b4ddd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
Adapt CMake files, build scripts, tests and examples.
Task-number: PYSIDE-904
Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
This change affects mostly only my own sources which were
prepared for the migration to Python 3.6 .
Task-number: PYSIDE-904
Change-Id: I0c2cd59f6f625f51f876099c33005ac70ca39db9
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
Adapt CMake files, build scripts, tests and examples.
Task-number: PYSIDE-904
Change-Id: I4cb5ee4c8df539546014b08202a7b1e98ed3ff07
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|