aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/pep384impl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Split The Signature Module After The Project SplitChristian Tismer2018-11-241-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.11' into 5.12Friedemann Kleint2018-10-181-1/+1
|\ | | | | | | Change-Id: I2468031ecb8cc8a97bcb8ddf85e48101ec22eda9
| * Fix crash when using a MSVC debug buildFriedemann Kleint2018-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | Prepare the Signature Module For More ApplicationsChristian Tismer2018-10-111-3/+24
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* shiboken/pep384: Avoid warning by literal comparisonCristian Maureira-Fredes2018-09-121-1/+1
| | | | | | | | | 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>
* Document the Python Limited APIChristian Tismer2018-08-211-291/+3
| | | | | | | | | | | | | 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>
* Implement Proper Name ManglingChristian Tismer2018-08-211-8/+92
| | | | | | | | | | | | | | | | | | | 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>
* Fix Some Minor Limited API Omissions And QuirksChristian Tismer2018-08-061-3/+3
| | | | | | | | | | | 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>
* Pep 384 Final Cut: Remove PepTypeChristian Tismer2018-07-231-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix Limited API and Signature Glitches in Python 3.7Christian Tismer2018-07-091-1/+1
| | | | | | | | | | | | | | | | | 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>
* Prepare Limited API for Python 3.7Christian Tismer2018-06-261-88/+3
| | | | | | | | | | | | | | | 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>
* Undo renaming of Pep384_InitChristian Tismer2018-06-061-1/+1
| | | | | | | | | | | | 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>
* PEP 384-squash: Implement PEP 384Christian Tismer2018-05-301-0/+924
| | | | | | | | | | 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>
* remove pyside2 and shiboken2 submodules (5.9 edition)Oswald Buddenhagen2017-05-221-25/+0
| | | | to be replaced by a subtree merge.
* update: bring repositories back in syncChristian Tismer2017-02-151-15/+21
| | | | | | | From time to time, it is good to update the master project. Change-Id: I50c45caf7c37ebb4ea865b4e4f5896e5cd8915fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Update the pyside-setup submodulesChristian Tismer2016-12-121-15/+15
| | | | | | | | | | 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>
* Fix OS/X inclusion of framework headers.Alexandru Croitor2016-06-161-6/+16
| | | | | | | | | | | | | | | | | | | | | 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>
* Add option to link with libc++ on older OSX versions.Alexandru Croitor2016-05-111-5/+8
| | | | | | | | | | | | | | 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>
* a quick shiboken fix that should work, but will become obsolete with Qt 5.6.1Christian Tismer2016-04-191-11/+5
|
* fix the name pyside2uicChristian Tismer2016-04-191-5/+11
| | | | This was modified, but not corrected in setup.py
* UpdateThomas-Karl Pietrowski2016-04-021-5/+5
|
* shiboken should build with tests.Christian Tismer2016-02-231-8/+5
| | | | We will see how travis works now.
* updateChristian Tismer2015-12-291-8/+7
|
* updateChristian Tismer2015-12-281-7/+8
|
* fixing debug builds on windows.Christian Tismer2015-11-121-9/+7
| | | | | How on earth did people debug without debug builds? This must have been wrong before the move to Qt5.
* merge the new signal supportChristian Tismer2015-11-071-5/+10
|
* updateChristian Tismer2015-10-241-8/+5
|
* Merge pull request #9 from thopiekar/cmake-workChristian Tismer2015-09-281-7/+7
| | | | Fix for empty PYTHON*_VERSION_* variables
* Merge pull request #8 from thopiekar/cmake-workChristian Tismer2015-09-281-7/+7
| | | | Quick fix for last PR.
* sub-reposChristian Tismer2015-09-281-7/+7
|
* )small fixes (right wiki, name changesChristian Tismer2015-09-251-5/+8
|
* change all scripts to respect the new PySide2 module name.Christian Tismer2015-09-211-9/+5
| | | | still, there seem to be errors....
* not-so-small fix to the huge change.Christian Tismer2015-09-211-13/+8
| | | | | | 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.
* huge change on project layout.Christian Tismer2015-09-211-7/+13
| | | | | | | | | | | 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.
* fix the repos names in setup.pyChristian Tismer2015-09-201-5/+8
|
* add/extend README.md files and add pyside2.wiki.git as a sub-repo of ↵Christian Tismer2015-09-201-13/+5
| | | | pyside2-setup.
* updateChristian Tismer2015-09-191-6/+12
|
* update sub-reposChristian Tismer2015-09-181-5/+7
|
* simplify the project structure. "qt5" is replaced by "master".Christian Tismer2015-09-171-5/+5
|\ | | | | | | For the old qt4 version, the old repository should be used.
| * small update to state that the docs are still from 4.8Christian Tismer2015-09-151-6/+17
| |
| * update sub-reposChristian Tismer2015-08-161-5/+7
| |
| * be more forgiving when file trees cannot be removed (happens often during ↵Christian Tismer2015-08-161-6/+5
| | | | | | | | window debugging)
| * update sub-reposChristian Tismer2015-07-271-7/+6
| |
| * update sub-reposChristian Tismer2015-07-211-7/+6
| |
| * update sub-reposChristian Tismer2015-07-191-12/+7
| |
| * update sub-reposChristian Tismer2015-07-081-5/+13
| |
| * transition to pyside-examples2Christian Tismer2015-07-051-5/+5
| |
| * adjust sub reposChristian Tismer2015-06-271-5/+5
|/
* update soubrettes and ignore a local folder 'explore2' with some cmake ↵Christian Tismer2015-06-171-5/+5
| | | | exploration
* update submodulesChristian Tismer2015-06-141-5/+5
|