| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The multiple signatures suffer from the problem that
many are reported as error, because one larger type
is evaluated before another type.
An Example: PySide6.QtCore.QCborSimpleType is shadowed by int
when int is listed first. That is due to the mro:
int.mro() [<class 'int'>, <class 'object'>]
QCborSimpleType.mro() [<enum 'QCborSimpleType'>, <enum 'IntEnum'>,
<class 'int'>, <enum 'ReprEnum'>,
<enum 'Enum'>, <class 'object'>]
We are implementing a topological sort by mro length that
puts the list into the right order.
Result is from 226 down to 30.
Change-Id: I155e2169c3c8ab4afd5b7bb8f3411ccf6467d440
Task-number: PYSIDE-2846
Fixes: PYSIDE-2687
Fixes: PYSIDE-2886
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
| |
Add a future statement to all Python source files.
Task-number: PYSIDE-2786
Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Add a documentation page for the pyside6-genpyi tool. This also removes
an unused argument and clarifies that the --feature argument is
currently not available for PyPy.
Change-Id: Ic2fa7e92ae0ccbc30e997db8d7dfad02e5b26732
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
A patch that corrects Qt.Modifier and Qt.KeyboardModifier
causes early loading of QtCore.Qt .
Move the patch into snippets, running it only when needed.
Task-number: PYSIDE-1735
Task-number: PYSIDE-2404
Change-Id: I26cc7aa767d5474bf54a22fbad24fae62daafa5f
Pick-to: 6.6
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The __signature__ attribute was used since 2017 with success.
With Python 3.10, there was an incompatibility introduced by
the rlcompleter module. This was detected quite late, because
there is no exception thrown in normal line completion.
Using the rlcompleter module directly, the error can be seen.
The problem is not the attribute itself, but PySide's need to
support *multi-signature*. The signature objects are either
regular compatible Signature objects, or in the multi-case,
*lists* thereof.
Since PyPy was implemented, the internal use of the __signature__
attribute was replaced by a get_signature() call. The attribute
was never documented in the public until recently in the
developer docs. We therefor can assume that removal of the
attribute will cause no problems.
[ChangeLog][PySide6] The non-standard __signature__ attribute of
functions and classes was removed in favor of get_signature().
No Pick-to because this is meant for 6.5
Change-Id: Iaa8bb08a33db66868d949593e527b753bf989681
Fixes: PYSIDE-2101
Task-number: PYSIDE-510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rlcompleter module calls inspect.signature which breaks
the multi-signatures of the signature C module.
The __signature__ attribute should no longer be used anyway
and people should use get_signature(), instead. But before we
evict this attribute, this patch fixes the problem, temporarily.
[ChangeLog][PySide6] Python 3.10 and up have an incompatibility
to the __signature__ attribute. This temporary patch fixes this
until final removal of that attribute.
Change-Id: Ic08d551cd388e6b3b29eb4694427a7202a4272b4
Fixes: PYSIDE-2101
Pick-to: 6.4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After turning IntEnum into Enum, a few classes need more
attention because the simple int coercion is no more
sufficient. Instead, a bit of help is necessary to make
the usage of the __or__ operator consistent, again.
On first sight, this coercion to KeyCombination looks slightly
unpythonic. But this originates in the complex matters. If you
observe what types are actually added, this is very correct.
Using the IntEnum version instead is not better. It is just
hiding the ongoings by using int, which would also allow
to combine two characters as a bad side effect.
[ChangeLog][PySide6] PyEnum now handles QKeyCombination correctly
with "|" or (deprecated) "+" operators, without falling back
to using IntEnum.
Task-number: PYSIDE-1735
Change-Id: I08b93b8b7ece75ca650f2916ec6f6f5bb711a70b
Pick-to: 6.3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Remove the code from generate_pyi.py as well, amending
4a3d5f9affd0ba8f6d37ad5c0cdf8d2aa52914a8.
Pick-to: 6.3 6.2
Change-Id: I718ff55b9cfbe027a133083f3cd6ddd3c85fb803
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by a
SPDX-License-Identifier. Files that have to be modified by hand are
modified. License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: I065150015bdb84a3096b5b39c061cf0a20ab637d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The __feature__ tests need a stronger way to reset the
feature selection reliably. Some cross-talk was observed
when running multiple tests together with PyTest. This
effect was hidden because our unit-tests are isolated in
individual processes by CTest.
- Remove all special 0x80 cases of TearDown functions
- introduce a new feature module function `reset` that
completely uninitializes the features, including the
`pyside_feature_dict`.
- drop the artificial naming of `__feature__` in favor of
`feature`. This is less confusing for people examining
the implementation.
[ChangeLog][PySide6] Feature switching was improved by avoiding
cross-talk between multiple test runs.
Task-number: PYSIDE-1019
Change-Id: I28550f293763ac58df72b8ce5c0a613c2067f6ba
Pick-to: 6.3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The __feature__ switching does not work yet in
PyPy. More importantly, the current implementation uses
object identity on small numbers which PyPy does not have.
[ChangeLog][shiboken6] Feature switching is disabled in PyPy,
allowing .pyi generation to be enabled, now.
Task-number: PYSIDE-535
Change-Id: I6fc7ef538007273b53d560bbf40bf46108b2bd82
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PyPy branch has been apart from the main branch for a
long time. Meanwhile, almost everything has settled and can
be merged into the main branch.
This has the advantage of a single branch for both
configurations.
This project is still not ready. It will be called ready when
the Mandelbrot example can be run without any changes.
To achieve that, the current threading problem must be solved.
The WIP branch is kept. It now holds only the pypy-blog.txt file.
Task-number: PYSIDE-535
Change-Id: I317b0e921cc6810e1b76c69991a0f8e592135c65
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This proposal was discussed.
It was also tested with Nuitka and cx_freeze.
[ChangeLog][shiboken6] Python support files are now always
embedded. There is no longer a physical copy installed in the FS.
Reasoning is: We always had the signature module in real
Python files and also as an embedded ZIP file.
With the solution to PYSIDE-1621 we suddenly had a way
to avoid accessing the file system completely. The
remaining question is: Why should we keep the files in
the installation at all?
Long time ago, it was said that the source files were
needed to see tracebacks. But tracebacks are visible the
same way, regardless if the files exist as physical files
or only in memory. The error messages will be as verbose
as always.
Personally, I see it more as a drawback, because parts of
our application become vulnerable by external manipulation.
By the complete virtualization, the system is as
self-contained as a binary executable.
Task-number: PYSIDE-1621
Change-Id: I821545fb5d52465b69bb2c172bdfb43894ac2109
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signature scripts needed an update to make them
work even when no source files are available.
* Access to the license text should avoid source files
* Some loader simplifications are possible since Python 2 is gone
* The import list for PySide is incomplete
* Enforce embedding in COIN mode for better testing
This is a preparational step before the zip file access
becomes totally virtual.
Change-Id: I85e750bb718855f140edac6de34955adbd7843bc
Pick-to: 5.15
Pick-to: 6.1
Task-number: PYSIDE-1621
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Move the global variables and initialization into main in
generate_pyi.py and set is_ci on the options object. Do the same for
consistency in pyi_generator.py.
Pick-to: 6.1
Fixes: PYSIDE-1614
Change-Id: I5cb69b58816e5253b3842f135f51fbcbded7b348
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We add a possibility to select features before generating
the pyi files. This will improve the feature adoption, because
common IDEs can use these changed .pyi files.
- avoid crashes because of early selection
- add an option to generate_pyi
- document pyside6-genpyi and shiboken6-genpyi
- build a correct display of properties
Task-number: PYSIDE-1019
Pick-to: 6.1
Change-Id: Ib75dfcbaccaa969ef47eeb142d9c034a2a6c11d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the new tool has been created, we can now produce
a Shiboken.pyi file automatically and make the PySide pyi
files more complete.
The Shiboken internal objects are now published, and we
no longer need a fake Shiboken.Object .
We can continue here a bit, maybe in another commit.
Pick-to: 6.1
Task-number: PYSIDE-1415
Change-Id: I9ba9336dbffa200ac519968519ee9381dd5cad84
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
generate_pyi is now split into a pyi_generator in signature.lib
and the remaining stub in generate_pyi.py .
pyi_generator can create .pyi files from arbitrary modules
created with shiboken.
Pick-to: 6.1
Fixes: PYSIDE-1415
Change-Id: I966cf9f48859185d7ecb72140b533319226e511d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
generate_pyi is now split into a pyi_generator in signature.lib
and the remaining stub in generate_pyi.py .
This is the first step in the transformation.
Pick-to: 6.1
Task-number: PYSIDE-1415
Change-Id: I7b9075d3f6d8d2b8f8efa4591234f89d4bbe3e46
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
inspect and typing are removed from the signature
module and the official ones are used. This is done as a
clean-up before re-writing generate_pyi.py .
Task-number: PYSIDE-1415
Change-Id: I3b580805775962447e65a2d7593ecf737e97536c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract all implicit conversions and write them as typing.Union[].
The optional_replacer was fixed, build_brace_pattern needed
a separator to be able to continue.
Missing mappings are added.
Task-number: PYSIDE-1520
Change-Id: I2d8e4e7b8f1586036cc3ec9cf469a27e693e7312
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
| |
With this patch, os.path in Shiboken and Pyside
will be completely removed from sources.
The rest will be done later.
Task-number: PYSIDE-1499
Change-Id: Id01782779487ceec62efdd1f32f65beee0234338
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modifying the paths to work in the new way is a quite ambitious
task. But doing so improves the overall project structure and
makes imports unambiguous.
This patch should not be applied alone but with
move "shiboken6/shiboken6" to "shiboken6/Shiboken" temp
The reworked version of this patch no longer has different
structures in `build` and `install`.
Tested with
Python 3.6, 3.7, 3.8, 3.9 debug build
Python 3.6 debug install
Python 3.9 release install
Task-number: PYSIDE-1497
Change-Id: Id9d816dd825907f9359651e7e2f69f54e1ba46c9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Pick-to: 6.0
Pick-to: 5.15
Task-number: PYSIDE-510
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>
|
|
|
Adapt CMake files, build scripts, tests and examples.
Task-number: PYSIDE-904
Change-Id: I845f7b006e9ad274fed5444ec4c1f9dbe176ff88
Reviewed-by: Christian Tismer <tismer@stackless.com>
|