Commit Graph

133 Commits

Author SHA1 Message Date
Matthias Koefferlein ea2486eaed Fixed a merge issue 2022-11-09 23:30:08 +01:00
Matthias Koefferlein 1edbd6232f Merge branch 'python-typehints' 2022-11-09 23:13:31 +01:00
Matthias Koefferlein 240281d9ff [consider merging] Important patch: avoids incorrect initialization of Python classes 2022-11-06 01:12:16 +01:00
Matthias Koefferlein 0262926b11 Moved __deepcopy__ implementation and NotImplemented fallback from db.__init__ to C++ implementation for better performance and generalization. Added tests 2022-10-26 10:40:20 +02:00
Matthias Koefferlein a72888e331 Enabling polymorphic re-throw, hence supporting TypeError 2022-10-24 22:03:31 +02:00
Matthias Koefferlein 2b60e2f6e9 Preventing overriding of getters by is_.. predicates 2022-10-24 21:06:03 +02:00
Matthias Koefferlein c8d86f8e73 Improved doc, enough slots for getters and setters for Qt namespace 2022-10-24 20:53:58 +02:00
Matthias Koefferlein 24c6224a84 Do not produce Python methods masked by properties. 2022-10-24 20:31:46 +02:00
Matthias Koefferlein a39d22c438 Fixed problems with reserved words 2022-10-24 19:44:28 +02:00
Matthias Koefferlein 9011af54ac Class properties 2022-10-23 23:47:26 +02:00
Matthias Koefferlein eb31f67aeb Include .pyi in deployment, scrips enhanced for more compatibility with stubtest 2022-10-23 23:18:09 +02:00
Matthias Koefferlein daad80d5d5 Synthesize getters from is_... predicates, added getter for RecursiveShapeIterator#shape_flags 2022-10-23 22:08:06 +02:00
Matthias Koefferlein be6e05da55 WIP: refactoring, added special GSI methods for Python binding 2022-10-23 19:00:41 +02:00
Matthias Koefferlein 2c18bc6c46 WIP: refactoring 2022-10-23 18:31:13 +02:00
Matthias Koefferlein d3a36e66f2 Fixed a compiler warning 2022-10-20 23:29:35 +02:00
Matthias Koefferlein fbd4c84d84 Refactoring of pya/rba/expressions
Goal is to support "*!" which is a variant of multiplication
without the commutative nature.

The refactoring yields a more consistent handling of
Python specializations. Now this happens when the methods
are collected, rather than later. This way, specific behavior
for identically named synonyms can be implemented for example.
This is the case for the "*" operator in Trans which is partially
commutative and partially not.
2022-10-20 23:26:14 +02:00
Matthias Koefferlein c012bb846e Cherry-picked Python type hint enhancements from master 2022-10-19 22:13:03 +02:00
Thomas Ferreira de Lima 4d4f4b643b Added python stubs with type hinting and documentation. (#1125)
* Added python stubs with type hinting and documentation.

The documentation was extracted by inspecting the docstrings within each class and methods.
This should enable type hinting and checking by IDEs like VSCode.
The stubs were automatically generated, and have not been manually curated. (TODO)

* created tl ArgType to python type translator

* Fixing a pyaModule.cc bug

* almost finished stubgen

* fixing little bug in classes defined within classes

* Release version of the stubgen script. Good enough for release.

* Adding notes

* Including stubs when installing from source

* typechecking bugfix: missed checking is_iter()

* Cleaning up unused code for merge review

* Including stubs when installing from source (part deux)

* Putting the GenericDeviceExtractor name setting into the right place.

* Updating python stubs

Co-authored-by: Matthias Koefferlein <matthias@koefferlein.de>
2022-09-01 00:41:42 +02:00
Matthias Koefferlein 590c4a6b31 Argument numbers/names for Ruby too 2022-07-30 01:32:27 +02:00
Matthias Koefferlein 7d078ed041 Express argument details in Python call errors 2022-07-29 23:58:19 +02:00
Balint Cristian 8705de49f7
Support python 3.11 changes. (#1104) 2022-06-29 00:58:23 +02:00
Matthias Koefferlein 26dbb4003e Better error messages on missing module imports in Python modules 2022-05-13 23:20:58 +02:00
Matthias Koefferlein 5facc418cb WIP: futher improvements on Python module for Qt-less case 2022-05-12 23:42:21 +02:00
Matthias Koefferlein a1318599fe Fixed #1054 (only an issue in debug builds so far) 2022-04-04 23:28:16 +02:00
Matthias Köfferlein 51cf918f56
Issue 1029 - Crash on QTreeViewItem#setBackgroundColor (#1032)
* Fixed issue #1029

The problem happened because in the described case the
tl::Variant used as a intermediate container holds the
Python QBrush object and when it gets deleted, the
QBrush object is deleted too.

* Added tests
2022-03-16 23:27:25 +01:00
Matthias Koefferlein ffb81a66ea Fixed Python 3.10 builds 2022-02-05 19:46:53 +01:00
Matthias Koefferlein 12fd26663d Merge branch 'qt6' 2022-01-06 21:48:02 +01:00
Matthias Koefferlein 10456516db Updated copyright to 2022, preparations for 0.27.6 (was delayed due to code signing certificate issues) 2022-01-04 21:20:04 +01:00
Matthias Koefferlein 2d334bd88d Some code simplification 2021-12-11 01:09:07 +01:00
Matthias Koefferlein ca304b15c8 Enable multi-base support for RBA + Qt binding 2021-12-11 00:14:10 +01:00
Matthias Koefferlein f15db66fc4 Providing a different implementation of the multi-base mixin concept for Python to support multiple bases in Qt binding (e.g. QIODeviceBase) 2021-12-10 00:53:51 +01:00
Matthias Koefferlein 202ac55200 Preparations for multiple bases for Python objects 2021-12-08 23:53:38 +01:00
Matthias Koefferlein 9c0e94e63c WIP: Allowing extension (mixin) classes
Needed to represent QIODeviceBase as a second base class for
QIOdevice, QFile etc. Additional base classes are supported but
in a rather limited way. They only contribute constants like enums.
No methods can be provided this way (a limitation of the method
enumeration scheme which only supports one base classe)
2021-12-07 23:24:08 +01:00
Matthias Koefferlein ab97a4722d WIP: fixed some Qt binding and GSI issues, added tests 2021-12-04 22:15:04 +01:00
Matthias Koefferlein 709ed19e13 Added first version of Qt binding for Qt6 2021-12-02 23:40:31 +01:00
Matthias Koefferlein ab350078a0 Cross-calling of Python from Ruby and much more ... 2021-11-13 19:57:31 +01:00
Eugene Zelenko d5c9067d8f Fix misspellings in various modules. 2021-06-11 20:11:37 -07:00
Matthias Köfferlein e6ab8c2483
Issue 771 (#773)
* Fixed the issue - Byte array variant was not properly converted to Python/Ruby objects.

* Added tests + properly converting byte arrays to byte array variants in Python.
2021-04-19 22:28:27 +02:00
Matthias Koefferlein d31f87f053 Some issues with the byte array binding fixed, less ambiguitites with Qt bindings, tests added. 2021-01-24 23:44:40 +01:00
Matthias Koefferlein 5aac018503 Mapping QByteArray (and std::vector<char>) to Python 'bytes' now. 2021-01-24 17:36:40 +01:00
Matthias Koefferlein d1e6845ae4 Replaced std::auto_ptr by std::unique_ptr because the latter is deprecated 2021-01-23 21:55:51 +01:00
Matthias Koefferlein 11e9f89fc2 Introduced normalization into region/edges/edge pairs/texts tests to get rid of platform dependency because of unordered_set implementation details. 2021-01-19 08:03:42 +01:00
Matthias Koefferlein 7d4310d343 Updated copyright to 2021 2021-01-05 22:57:48 +01:00
Matthias Koefferlein 4ec00fb129 Fixed an issue with wrapping new objects into tl::Variants which are returned directly. For these objects, ownership needs to be transferred to the script. 2020-12-27 17:09:06 +01:00
Matthias Koefferlein a20f0d5891 Also provide 'void to self' return values for Python. 2020-08-31 23:55:26 +02:00
Matthias Koefferlein 6aff74c844 Merge branch 'master' into issue-588 2020-07-08 23:29:27 +02:00
Matthias Koefferlein beec19951d Candidate for fix. 2020-07-05 14:09:23 +02:00
Matthias Koefferlein fc75bf72f8 Avoid a segfault when the owner of a callable went out of scope and got deleted (pya): null weak pointer happens 2020-06-15 01:28:49 +02:00
Matthias Koefferlein 880b9904cf WIP Netlist probing will deliver an instantiation path now. 2020-06-14 22:04:16 +02:00
Matthias Koefferlein 15567d3d27 Some small fixes to make clang-analyze happy. 2020-04-26 09:33:10 +02:00