| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Add #ifdefs, fixing:
sources/shiboken2/libshiboken/pep384impl.cpp:413:1: warning: ‘PyObject* PepRun_GetResult(const char*, const char*)’ defined but not used [-Wunused-function]
PepRun_GetResult(const char *command, const char *resvar)
Change-Id: I5e469d6a24e95a602b882adbaad334a4ecf9af23
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@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 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>
|
|\
| |
| |
| | |
Change-Id: I2468031ecb8cc8a97bcb8ddf85e48101ec22eda9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The pointers of probe_tp_name and check->tp_name are different
when using the MSVC debug runtime. Use strcmp() instead.
Fixes: PYSIDE-835
Change-Id: I8b6735a9a407bf3325986edd61a7911964802a24
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the preparation for a number of planned applications
and extensions using the signature module.
This general overhaul contains:
- Extraction of signature enumerations into enum_sigs.py,
- a list of current keyword errors in arguments which are unsolved
in shiboken, but temporarily fixed in parser.py (too many for XML),
- fix spurious duplications in multiple signatures
- corrections for keyword errors in function names which cannot be
fixed by Python (quite few),
- fixing "..." arguments into "*args",
- supporting the "slot wrapper" type. This is necessary for
methods like "__add__", "__mul__" etc.
- Create an extra function "get_signature" that has a parameter to
modify the appearance, i.e. without self, without returntype, etc.
Task-number: PYSIDE-510
Change-Id: If16f7bf02c6e7cbbdc970058bb630ea4db2b854a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Even though we are certain of the comparison,
better to get rid of the warnings.
Change-Id: Iafa51b4c59c2315b24fc9092d18792f0c9297553
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Python Limited API brings certain restrictions to PySide.
This document contains an overview and all relevant changes.
Furthermore, there are appendices which show how the
type transformation of the extended types was done
and how it was verified..
Task-number: PYSIDE-768
Change-Id: Ifd6fd3740c23deaed65cce1ba12f17e5f093f18f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When types have attributes starting with two underscores but
ending with at most one, Python uses name mangling to create
a unique private variable.
PySide needs to obey this rule in the tp_getattro methods.
We implemented it as an optimized _Pep_PrivateMangle function that
solves the problem internally without exposing the _Py_Mangle
function.
Remark: I think the exclusion of the _Py_Mangle function is another
oversight in the Limited API.
Task-number: PYSIDE-772
Change-Id: I0bfc2418dae439e963a16e37443f2099c6980696
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Some formatting was not ok, some ordering of methods
was not perfect, some code vanished, bufferprocs had a bad
filename, and descrobject.h did not need a patch, anymore
since things were solved in signature.cpp .
Task-number: PYSIDE-560
Change-Id: Ibd1bedf0763ebb3fbbfd33a8e7cff4b5af6fab5e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While trying to document the Limited API Project,
it suddenly struck me:
We can make the patch much much simpler and implement it
without the necessity to have an extra PepType!
Now I am happy to continue the documentation, because
it is now no more improvable.
This version will last as long as the layout of
PyTypeObject does not change substantially. When that
happens, then we need to rewrite stuff with the according
PyType_GetSlot() access functions.
These access functions will until then be complete enough
so that we can live without the tricks like inventing a reduced
PyTypeObject as was done in the current implementation.
Task-number: PYSIDE-560
Change-Id: I49849cc377baa6794a5b53292691e21d6e2853ab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the homebrew version of Python 3.7 appeared so unforeseen
early, I felt inclined to fix these glitches, immediately:
In Python 3.7, the typing module was more changed than expected.
Since we don't support versions below 3.5, it was easy to fix by
avoiding to copy typing.py for version 3.x, altogether. It stays there
for Python 2.7 .
Furthermore, the Python issue 33738 will later be solved than the
code expected, so I fixed that one for all by a macro definition.
Task-number: PYSIDE-741
Change-Id: Ia56ccd1ef20cb9536b1d39f190e011e5dccf1f22
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PySide has successfully been tested with the Python 3.7 branch.
There will be no change in the areas that are important for us.
It is then safe to bump the supported version and the limited API version
checks to fully include Python 3.7.
The macro errors in the limited API was fixed by a pull request, but it
was too late to get it into 3.7rc1.
The error workaround was therefore extracted into pep384_issue33738.cpp
and will be deactivated later.
Change-Id: Iec3f277b02cac03a5cf44cbcf955ddc690c112e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The functions which were named Pep384XXX were renamed
in order to get "PepType" as a function-like macro that suggests
the similarity between "PyTypeObject" and "PepTypeObject".
But the renaming of the module initialization function was not
intended.
Change-Id: I555633ccbd8e1354c27f2c1957c81905be54d86b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This is the condensed checkin of 18 commits which created
the implementation of PEP 384.
Task-number: PYSIDE-560
Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@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)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|