| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
The @setter decorator causes the property to be recreated with Py_None
set for the non-existent members, apparently due to a long-closed Python
bug (see_property_copy()). As a band-aid fix, check for Py_None.
Fixes: PYSIDE-3227
Pick-to: 6.10
Change-Id: Ib818e9930bd598306270377e26e625bfa9692a92
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Use .value to compare against the Enum value in a hidden
namespace.
Task-number: PYSIDE-2404
Change-Id: I2a7bda2aeac6aa69b3d38d2e377ac9b1127e1fee
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Adapt the op codes for detecting a parameterless __init__() call in
enum code to 3.14.
Pick-to: 6.9 6.8
Task-number: PYSIDE-3147
Task-number: PYSIDE-1735
Change-Id: I7dcaaae82b4c136db5dbd9ef36519783b73c15ce
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
| |
Change-Id: I3eae10ca459eae88632357ae5334c93fa2d0254f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.9 6.8
Change-Id: Idff689832a68fadf6c4492032df3ed94b9343389
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.9 6.8
Change-Id: Ibcd0ee3190638ac224c6dd770de0dffe93ed9dda
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
| |
The new approach is disable-gil.
Task-number: PYSIDE-2221
Change-Id: I1b1e783883aa2e94f62548385d3f19b61cf6d1ed
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
QtAsyncio has tests like other modules, although they were not
automatically tested.
Add a way to specify this kind of modules without conflicts in cmake.
Initial-patch-by: Christian Tismer <tismer@stackless.com>
Task-number: PYSIDE-769
Change-Id: I9897f37c98c400846af77d18533486fb048aca80
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
| |
Some tests were also missing imports and checks, add them as well.
Pick-to: 6.9
Change-Id: Id73b7ab0ec06e5d87613719d0b2f267fa165db77
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Make sure to store QtEnums in QVariant when the enum has a metatype.
Fixes: PYSIDE-3084
Change-Id: I94b89f89e6fb3c58560325f2a6843a5260d86557
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
| |
It turned out to be boring if the PYI files are printed locally.
Task-number: PYSIDE-3012
Change-Id: Ic47e1828367c1f00c263451a6090cb5e03313103
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Reason: We cannot find an error which happens in CI on Windows 11, only
Task-number: PYSIDE-3012
Change-Id: I99a2d72e49027cc76767c70bdc94d8d3f6451782
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Reason: We cannot find an error which happens in CI on Windows 11, only
Task-number: PYSIDE-3012
Change-Id: I8f2e4c56ee8c81e8d3b348c624be5df80d5df275
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The --pretty switch shows a little context.
If that does not help, we will have to send the whole
PYI file back from CI.
Task-number: PYSIDE-2846
Task-number: PYSIDE-3012
Change-Id: I45a4111c6ea78bf6c487077c43eb37b946602ec8
Pick-to: 6.8
Reviewed-by: Ece Cinucen <ece.cinucen@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Add a further indirection in callPythonMetaMethodHelper()
when only a pointer conversion is available for a const-ref parameter.
Task-number: PYSIDE-3004
Change-Id: I6ec7c5a9d4d30c8e4973ec79534d5f3eb3bf8204
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
| |
As a drive-by fix flake errors.
Pick-to: 6.8
Task-number: PYSIDE-1735
Change-Id: I9829b011fee78fc8edd1aefdd3066ae89e63644b
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
Considering we are not compatible with Python 2 anymore,
we can drop the 'object' explicit inheritance in the class
declaration.
Pick-to: 6.8
Change-Id: Iac3a95aa9721c3ff1a755f457c0936ca157a8470
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.8
Change-Id: I1a5964463f703ade0657816cb974206355a5ae5b
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Many modules were imported but unused in our tests.
Additionally, some type hint issues were solved.
Pick-to: 6.8
Change-Id: Ic2368690e9a6ce0fffea812206185aa4f3dc3c58
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix some oversights of previous changes:
- Bump limited API
- Fix CMake files
- Remove outdated version checks from Python code
- Adapt some documentation
Pick-to: 6.8
Task-number: PYSIDE-2943
Change-Id: Id8d9c4c6bb0629948de28beb3c4274991f84ff08
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The other missing things are sequence and mapping methods
which need some more support from cppgenerator. Will be
added later.
typing.Self is only known since Python 3.11 .
We emulate that by patching it into typing and adjusting
the Python version for mypy.
Task-number: PYSIDE-2846
Change-Id: Icb1060c7bba355061d8f134c8e76fb14369d7dda
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Addressing a few comments from tests that were related
to the Python 2 compatibility.
Pick-to: 6.8
Change-Id: I88c614549cfb91f879fe3e0d82a6988362e0ce19
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It turned out that mypy is not loaded by COIN tests when
requirements_coin.txt is used. Also enforce mypy existence
in COIN to prevent further configuration errors.
As a drive-by, a new cache is used that is > 10% faster.
Task-number: PYSIDE-2846
Change-Id: I75a27cfd0cb0fb0d7cd44c2a121291af052b0d8f
Pick-to: 6.8 6.8.0
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The __all__ support for the PySide6 module works just fine.
But there is a last incompatibility that might strike others
as it did hit ourselves when using PySide6.__dict["__all__"]:
Use a derived dict type and define a __missing__ attribute.
Derive further a module type, then it works without problems.
A little support function in Shiboken allows to replace the
dict of PySide6 with this derived type.
amends 703d975f16aff95bc9014a2689a3ae824b5a552f.
Pick-to: 6.8
Task-number: PYSIDE-2895
Task-number: PYSIDE-1890
Change-Id: I018228116a5fdd1401c1ebd42ceb886f6829deeb
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default, mypy stores its cache data in $(pwd)/.mypy_cache .
It is better to save it in the pyside_setup folder under a version
specific name. This makes the cache survive full rebuilds.
We tested that this folder is really writable.
Task-number: PYSIDE-2846
Change-Id: I739e74cb24b5aaa1b2b457195e8a143b56a2bc44
Pick-to: 6.8 6.8.0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
After addition of subtypes support, filtering is necessary
to exclude subtypes from resolving.
Deleting the subtype was a bad idea with an unordered_map.
Better is to use a list of names to resolve.
Task-number: PYSIDE-2404
Change-Id: Ide5b13fbd37bab44881a25d4466ec30c89cd9918
Fixes: PYSIDE-2898
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testing Mypy on the whole project costs some time,
about 33 s on a Mac Studio Max M1 in debug mode.
On CI with release Windows, this is about 8 sec.
An option "--skip-mypy-test" is added to save time.
The mypy tool is only enforced to exist in COIN.
Otherwise it is optional.
Task-number: PYSIDE-2846
Change-Id: Ibbabbf6b893537ac923fbbaba9ff832ebd675a21
Fixes: PYSIDE-2672
Fixes: PYSIDE-2886
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The addition of nested types made it necessary to filter
subtypes out of resolveLazyClasses because incarnateType
should be called for toplevel types, only.
Added a star test to pyenum_relax_options_test.py to
test this case without using extra time.
Task-number: PYSIDE-2404
Change-Id: I4b95c0f65c055376defb6a8e9ea888285c82a8e2
Fixes: PYSIDE-2888
Pick-to: 6.8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
__str__ and __repr__ are simply fixed by returning str instead
of PyObject.
__reduce__ actually has return type "str | tuple[Any, ...]",
but using str here too fits the purpose.
Errors before: 533
Errors after: 450
Change-Id: I6dd3527d3f5f3f035e667d0ca3c8f123e94e844f
Task-number: PYSIDE-2846
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qualified aliases
Change the behavior of registerConverterName() to always overwrite
existing entries. It should then only be used for fully qualified
names. Add a function registerConverterAlias() which does not
overwrite existing entries for registering partially qualified names.
Use registerConverterAlias() for the primitive types since they
are re-registered in multiple modules.
This prevents clashes when registering duplicate classes. For example,
registering a globally scoped class "Connection" will then overwrite
the partially qualified alias "Connection" of
"QMetaObject::Connection".
Fixes: PYSIDE-2792
Change-Id: I2bd3c0bff96da6d3ceddd46a2368fe6b94bbed68
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
| |
Add a future statement to all Python source files.
Task-number: PYSIDE-2786
Change-Id: Icd6688c7795a9e16fdcaa829686d57792df27690
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* opcodes have changed numbers. That made "import *" etc. fail.
* PUSH_NULL is sometimes inserted before a call.
* enum_test needed an overhaul due to opcode changes.
Python 3.13 works fine.
Supporting --disable-gil is a different issue.
Task-number: PYSIDE-2751
Change-Id: I37b447148787e2923a58c091a5c8ac808d579bc0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When a Python class does _not_ implement __init__,
then we might get the default of object.__init__, which
must be skipped like the object class alone.
Change-Id: I0416c97854e8d1c9edf0b9ac44d3df58223fef84
Fixes: PYSIDE-2654
Task-number: PYSIDE-2294
Pick-to: 6.5 6.6 6.7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For signals like
QRemoteObjectRegistry.remoteObjectAdded(QRemoteObjectSourceLocation)
where
using QRemoteObjectSourceLocation =
std::pair<QString,QRemoteObjectSourceLocationInfo>
one needed to specify the fully qualified C++ name in @Slot()
for the metaobject system to work and the shiboken converter
to be found. Record the typedefs and register the container
converters under the typedef name, too.
Fixes: PYSIDE-2633
Change-Id: Ifc62f096277949a507957a0466adb47d082695c7
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additionally register the shiboken converter under the type alias
name ("Qt::Alignment"), which appears in the meta method signature
besides the full name ("QFlags<Qt::AlignmentFlag>").
Manifests as signal:
QBluetoothDeviceDiscoveryAgent::deviceUpdated(QBluetoothDeviceInfo, QBluetoothDeviceInfo::Fields)
Pick-to: 6.6
Fixes: PYSIDE-2613
Change-Id: I7ecce8e0b3f8ddf790c40260fc156184e83cad69
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QMatrix<n>x<m> is a template specialization of
QGenericMatrix<n,m,float> which the type name of the QVariant
contains. To find the proper Shiboken converter for this, change the
name back.
As a drive-by, fix @snippet conversion-sbkobject to return a
PyObjectWrapper() with warning in cases where the QMetaType is valid
but no converter can be found.
Fixes: PYSIDE-2599
Pick-to: 6.6
Change-Id: I4f41dcbaa394fcc1732536c0b7a6569f694f3c45
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
It is needed For the QIcon::ThemeIcon fields.
Task-number: PYSIDE-2497
Task-number: PYSIDE-2537
Change-Id: I11d94c150dfa614797038e56cd37128bf3e88cff
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
| |
Task-number: PYSIDE-535
Change-Id: I9dc87afba17ceed9bd24c54e468e634155877e61
Pick-to: 6.6
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
| |
Mostly spacing related.
Pick-to: 6.6
Change-Id: I748a8a06f456c5d4bafb94c397c43b3b2ee9e3e9
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
| |
Pick-to: 6.6 6.5
Change-Id: If0050eadfc36444300b61498e46034ad3b4c8cdd
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Builtin types no longer have tp_dict set. We need to
use PyType_GetDict, instead. This works without Limited API
at the moment.
With some great cheating, this works with Limited API, too.
We emulate PyType_GetDict by tp_dict if that is not 0.
Otherwise we create an empty dict.
Some small changes to Exception handling and longer
warm-up in leaking tests were found, too.
Pick-to: 6.6 6.5 6.2
Task-number: PYSIDE-2230
Change-Id: I8a56de6208ec00979255b39b5784dfc9b4b92def
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
| |
Pick-to: 6.6 6.5
Change-Id: I23d8ea03ec578a897352c2627417a706ca71ef82
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
|
|
|
|
| |
Pick-to: 6.5
Change-Id: I261ec7ec933e21658d357ad1ffbeb4de5b84d13f
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
| |
Task-number: PYSIDE-1735
Change-Id: I51e68c50872f1d1254218ae7556ba607f73c4ea9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The new Enum implementation can no longer be switched off.
Individual features can still be deselected with the
environment variable PYSIDE6_OPTION_PYTHON_ENUM which
had the name PYSIDE63_OPTION_PYTHON_ENUM before.
This change is meant for PySide 6.6 .
Task-number: PYSIDE-1735
Change-Id: Iae5b7a9d42a0d7b005dbba20201a80713ef79be9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- For Python/Shiboken types not known to Qt that requires wrapping
around a QVariant, we use the PyObjectWrapper type. This patch
registers a toInt() QMetaType converter for PyObjectWrapper, which
enables automatic conversion to int for a QVariant(PyObjectWrapper)
within C++ i.e. QVariant(PyObjectWrapper).toInt() will work
- This means that cases like QAbstractItemModel::data() that calls
QtPrivate::legacyEnumValueFromModelData(const QVariant &data) would
work without explicit conversion from QVariant(PyObjectWrapper) to
QVariant(int). But for cases like QMetaProperty::write() explcit
handling is still required.
- This would also work for cases where the QVariant(PyObjectWrapper) is
simply channeled from Python to C++, and from C++ back to Python
without performing any operations on it.
- Incase, the wrapped object is not a PyEnum/ShibokenEnum object, then
toInt() would return a -1.
Pick-to: 6.5
Task-number: PYSIDE-1930
Task-number: PYSIDE-2339
Change-Id: I983351f2ff88c79c29399c257e38421116efc7a3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In multiple inheritance, it makes no sense to pass positional
arguments into a mixin class. This was correctly implemented
but later "corrected" because of wrong user input.
Correct and compatible to the competitor's implementation
is passing keyword arguments, only.
This is rarely a problem since people should use keyword arguments
only in multiple inheritance.
Change-Id: If5eb19368a50ee2a5534f10081d84511453993e5
Fixes: PYSIDE-2294
Pick-to: 6.5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PySide does not implement multiple inheritance.
Please see "About Multiple Inheritance in Python" at the issue.
This patch just supports the `__init__` call.
A more consequent implementation will follow that
supports multiple inheritance with every method.
[ChangeLog][pyside6] Cooperative multiple inheritance is now
implemented for all __init__ methods.
Fixes: PYSIDE-1564
Change-Id: I8df805d22c2052c3a9747420a86341f64e29a5ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SignalInstance unfortunately can be created directly without
a calling Signal. This is an old design error that cannot easily
be reverted because that is now the API.
Fixed by printing "(no signature)":
* print(SignalInstance()) # prints "(no signature)"
Fixed by producing a runtime error:
* SignalInstance().connect(lambda: None)
* SignalInstance().disconnect()
* SignalInstance().emit()
Thanks to <bers bers> who reported them all.
Task-number: PYSIDE-79
Change-Id: I92598d963b9796453fbd17c1526a674fa007e5e8
Pick-to: 6.4
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
|