| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the project split, shiboken exposed its own modules, and the
overall structure with shiboken2.support.signature and
PySide2.support.signature was already quite complicated.
When introducing embedding, it is necessary to have some support
folder that gets unpacked from a zipfile. That means, the shiboken2
root directory would be in the zip file in the embedding case.
This does not only increase the complexity, it further means
that we must make shiboken2.so available in the shiboken2
containing zipfile!
In order to avoid that, we stop the dependency from the two
support directories and use shibokensupport, instead. The
simplification of the loader and other modules is also significant.
Task-number: PYSIDE-510
Change-Id: Ic735a8d36f10f03698378f2ac9685a5955e40b0c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the bug found in PYSIDE-928, the contextlib problem of
Python 3.5 also vanished.
What remains is the crash on shutdown which is caused by
module 'testbinding'.
Task-number: PYSIDE-953
Change-Id: I07f18fa468fdb0758ee4e4b7663c3a42bec42822
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python 3.5 has a bug that crashes the build.
See the description in the issue tracker.
The cure is to use a more recent contextlib.py and to avoid
a PySide cleanup function that creates the crash.
The problem is not solved for Python 3.5, and it is not clear
if the testbinding module has a hidden bug, too.
But this fix seems to be good enough for the moment.
We should decide if we are going to fix Python 3.5 or abandon
it altogether.
Change-Id: Iacf2237de1f34d2b3cd1d68f1fb5833bdca3fdc2
Fixes: PYSIDE-953
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Attempts to load the module directly from Python if loading it manually from
the .py file fails. This exposes the support submodule to installers. The
loader.py module was also patched to allow direct import from installers.
Change-Id: If225ae7a2e916912a581e09d1a02c18fd3a17526
Fixes: PYSIDE-942
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The correction to container types has a small bug which
does not exist in reality, but could give a problem in the
future:
- We need not only avoid instantiation in Missing, but
generally in all _NotCalled classes. Otherwise, when called
during processing of container types, they would loose
their (Missing, Default, ...whatever) tag.
Change-Id: I4eb154100da6f3067b816c190af314b2a710ff39
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An error was reported that we had a bug in this .pyi line:
def parseErrors(self) -> PySide2.QtScxml.QScxmlError: ...
which actually had to be a list like
def parseErrors(self) -> typing.List[PySide2.QtScxml.QScxmlError]: ...
A deeper look revealed that we had very many other examples,
also in the argument lists, were we did not handle containers
properly. (For example, 90 times in QtCore!)
This is a leftover from the type error messages which
were generated in C++, and never really understood.
This is now a clean rewrite of the C++ part to expose all
information and an extension of the Python parser that
systematically uses the container types from the typing
module.
The implementation became a bit more complex because of
Python 2: We need to provide our own copy of the public
typing module, because it is not safe to assume that this module
can be loaded. Importing it from support.signature gave a
problem because we now need to find the names of instances
to produce List[...], which needed to be implemented in the
loader.
Implemented the "Pair" type now as a native generic type.
This is more correct than the former implementation and
shorter in the .pyi files.
Additionally, an own definition of "Char" was provided for
brevity. This was not important to implement and could also
be done with "int", but it is helpful for the future to know how
to implement own types (and it was fun).
Task-number: PYSIDE-921
Task-number: PYSIDE-795
Change-Id: I0e565b38d7b4fff39dd606950f9f8d97c45acbf5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signature module will be used to generate automated
documentation by using the function signatures as docstrings.
This functionality should be low-hanging fruit. Actually, it was a
bit tricky to get this working. The crucial point was to use
PyType_Modified().
The function works fine on methods.
Supporting types needs some more effort.
It is not clear why the __signature__ attribute can be added,
but the change to __doc__ is not recognized. May be related to
the absence of Py_TPFLAGS_HAVE_VERSION_TAG ?
This will be addressed another time.
Task-number: PYSIDE-908
Change-Id: If8faa87927899f4c072d42b91eafd8f7658c6abc
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TypeError messages can now be produced, based upon the
signature module.
As a feature under test, we produce ValueErrors instead in
certain cases. This will probably improve, later.
We are currently investigating how much can be determined,
automatically.
Task-number: PYSIDE-795
Change-Id: Ie8a648beaf8a3bed388e3c01ba501bb36859722e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building type hints during the PySide build, it can happen that
the QtMultimedia module already exists, but the QtMultimediaWidgets
module is not yet built.
Since during the build also directories exist alongside with the not yet
existing modules, it can happen that such a directory is picked up by
Python 3, which supports namespace modules without __init__.py .
This case was already handled by the mapping modules, but
QtMultimediaWidgets was directly imported and not checked.
Now the check code has been extracted from the mapping reloader,
and there is no more unchecked module left.
Task-number: PYSIDE-735
Change-Id: I1a1f53525417651005d0759e417082fe71b02773
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signature module has been quite far developed.
In the course of making things fit for the TypeErrors with
the signature module, now also all signatures from all
shiboken modules are queried.
Instead of writing an extra signature existence test for
shiboken, it made more sense to extend the existing
init_platform.py by the shiboken modules.
In fact, by this query a corner case was exploited that
worked on Python 2 but assertion-crashed on Python 3.
The mapping.py modules were also completed to support
all new PySide2 modules.
Special care had to be taken because the "shiboken2" module
exists both as directory and as binary module. The fix was
tricky, and I will add a task that replaces such workarounds
by a better design.
Task-number: PYSIDE-510
Change-Id: Ibf8e322d1905976a0044a702ea178b7f98629fb4
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The script is now automatically called in the cmake build,
as part of the create_pyside_module macro.
The script runs after every module build and tries to
generate .pyi files. This does not need to succeed, but
will generate all files in the end. The script has been prepared
to allow partial runs without overhead.
After integration of the .pyi generation into cmake, these files
are also installed into the install directory by cmake.
For wheel building, setup.py has entries, too.
Building a full project with all modules revealed a bug in the
signature module that allowed unsupported function objects.
Module enum_sig had to be changed to suppress types
which have no ancestry in shiboken.
PYTHONPATH was avoided because it was not Windows
compatible. Instead, the script was changed to accept
"--sys-path" and "--lib-path" parameters. The latter evaluates
either to PATH or LD_LIBRARY_PATH.
The necessity to create .pyi files while the project is in the
build process showed a hard to track down error condition
in PySide_BuildSignatureProps.
Simple logging was added as a start of introducing logging
everywhere.
Task-number: PYSIDE-735
Change-Id: I6b3eec4b823d026583e902023badedeb06fe0961
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implementation formats all signatures in a way
that is known as type hinting files (.pyi).
Usage
-----
The script is to be called by the same Python interpreter that
was used to build PySide. It works with Python 2 and 3.
On Python 3, it performs a self-test.
python3 sources/pyside2/PySide2/support/generate_pyi.py run
will generate .pyi files for all compiled PySide modules
and places them into site packages to the binaries.
An optional outpath can be specified.
It is planned to call this script automatically after install.
o Local constants are not included, yet.
Maybe they never will, unless requested.
o The keyword "from" appears 43 times in argument lists.
It is fixed in Python, only which does not matter.
o When using Python 3.7 or above, it respects Pep 563 and
avoids imports which are deferred to runtime.
Task-number: PYSIDE-735
Change-Id: I3bcd5d9284b853fe955376bf35c7897e3698da2b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PySide project has been split into three pieces, including
Shiboken. This had far-reaching consequences for the signature project.
Shiboken can be run together with PySide or alone,
with tests or without. In every configuration, the signature
module has to work correctly.
During tests, the shiboken binary also hides the shiboken module,
and we had to use extra efforts to always guarantee the accessibility
of all signature modules.
This commit is the preparation for typeerrors implemented with the
signature module. It has been split off because the splitting
is not directly related, besides these unawaited consequences.
I re-added and corrected voidptr_test and simplified the calls.
Remark.. We should rename shiboken to Shiboken in all imports.
I also simplified initialization. After "from PySide2 import QtCore",
now a simple access like "type.__signature__" triggers initialization.
Further, I removed all traces of "signature_loader" and allowed
loading everything from PySide2.support.signature, again. The
loader is now needed internally, only.
Also, moved the type patching into FinishSignatureInitialization
to support modules with no classes at all.
The "testbinding" problem was finally identified as a name clash
when the same function is also a signal. A further investigation
showed that there exists also a regular PySide method with
that problem. The test was extended to all methods, and it
maps now all these cases to "{name}.overload".
Updated the included typing27.py from https://pypi.org/project/typing/
from version 3.6.2 to version 3.6.6 .
Task-number: PYSIDE-749
Change-Id: Ie33b8c6b0df5640212f8991539088593a041a05c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
| |
to be replaced by a subtree merge.
|
|
|
|
|
|
|
| |
From time to time, it is good to update the master project.
Change-Id: I50c45caf7c37ebb4ea865b4e4f5896e5cd8915fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
From time to time, submodules need to be updated.
Actually, I would even like to update the master module after every submodule
checkin, but this seems to be not easy to do all the time.
Change-Id: I52f266c58086186df05ddcc85085f35e2e28ead7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recent change that made use of framework headers on OS/X did
not work with homebrew Qt, and it didn't work with official builds
either, because neither of the chosen include folders contained
all the necessary headers to lead to a successful build.
Fortunately shiboken actually supports being passed multiple include
locations, separated by a colon on OS/X, and a semicolon on Windows.
This patch makes sure to always pass the Qt include folder, and in
case if the Qt build is a framework build, also passes the root
frameworks location, with headers found by shiboken under
frameworkName.framewework/Headers.
This works for homebrew builds, official builds and custom
non-installed prefix / in-source builds of Qt.
Change-Id: I47b24e197839883de2ab873461efc1f4d4d33743
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Versions of OSX lower than 10.9 link libstdc++ by default.
Also libstdc++ is linked when the osx minimum deployment target is
lower than 10.9.
The new option allows explicitly linking libc++ in the cases mentioned
above. It is not enabled by default, because most libraries and
executables on versions lower than 10.9 are compiled with libstdc++,
and mixing standard library versions can lead to crashes.
Change-Id: I7397d2bbce2cfceaeb848f25e0bbf1a24ac9bde8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
| |
This was modified, but not corrected in setup.py
|
| |
|
|
|
|
| |
We will see how travis works now.
|
| |
|
| |
|
|
|
|
|
| |
How on earth did people debug without debug builds?
This must have been wrong before the move to Qt5.
|
| |
|
| |
|
|
|
|
| |
Fix for empty PYTHON*_VERSION_* variables
|
|
|
|
| |
Quick fix for last PR.
|
| |
|
| |
|
|
|
|
| |
still, there seem to be errors....
|
|
|
|
|
|
| |
I just understood what is needed to define a package:
The files PySide2Config(...).cmake are crucial, the project names
have little to do with that.
|
|
|
|
|
|
|
|
|
|
|
| |
The intention is to have PySide2 and Shiboken2 as project names, to
allow for co-existence of PySide and PySide2.
This is the first version that builds with these settings on OS X:
$ python3 setup.py build --debug --no-examples --ignore-git --qmake=/usr/local/Cellar/qt5/5.5.0/bin/qmake --jobs=9
This is not yet tested.
|
| |
|
|
|
|
| |
pyside2-setup.
|
| |
|
| |
|
|\
| |
| |
| | |
For the old qt4 version, the old repository should be used.
|
| | |
|
| | |
|
| |
| |
| |
| | |
window debugging)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
exploration
|
| |
|