Skip to content

Conversation

@p12tic
Copy link
Contributor

@p12tic p12tic commented Jul 7, 2022

Description

PySide 5.15.1 and newer have a bug (https://bugreports.qt.io/browse/PYSIDE-1426) which results in the following error emitted on certain @Property decorators:

TypeError: A constant property cannot have a WRITE method or a NOTIFY signal.

Until the bug is fixed on PySide2 side workaround is to not use Property as a decorator, but as a simple function wrapper emitting the property as a class member.

Fixes #1239.

PySide 5.15.1 and newer have a bug
(https://bugreports.qt.io/browse/PYSIDE-1426) which results in the
following error emitted on certain @Property decorators:

TypeError: A constant property cannot have a WRITE method or a NOTIFY
signal.

Until the bug is fixed on PySide2 side workaround is to not use Property
as a decorator, but as a simple function wrapper emitting the property
as a class member.

Fixes alicevision#1239.
@p12tic p12tic force-pushed the fix-pyside2-decorator-bug branch from 79bf88b to e725f59 Compare July 7, 2022 22:00
@fabiencastan
Copy link
Member

fabiencastan commented Jul 11, 2022

Thanks for the PR.
We are trying to move from Qt-5.14 to Qt-6 without supporting the intermediate 5.15:
#1709
I have not checked in detail, but I think your fix is already done in this PR, isn't it?

@p12tic
Copy link
Contributor Author

p12tic commented Jul 12, 2022

@fabiencastan Thanks for the answer. The patch applies to dev/qt6 branch, so probably PySide 6.x just does not have the issue.

Is Qt6 support going to be merged soon? If yes, then this PR does not have any benefits and can be closed. However if it will still take some time to polish things on Qt6 branch, then it may still make sense to merge this PR, because it will still allow people to run meshroom on python 3.9. The latest Python supported by Pyside 5.14 is python 3.8 which is not present in the latest Debian stable or Ubuntu LTS.

@p12tic
Copy link
Contributor Author

p12tic commented Jul 12, 2022

I edited my previous comment to address my bad memory.

@fabiencastan
Copy link
Member

Is it still compatible with 5.14.1? If yes, I have no pbl to merge it.

@p12tic
Copy link
Contributor Author

p12tic commented Jul 14, 2022

@fabiencastan I've checked that this PR works on PySide 5.14.1 on Python 3.8

@p12tic
Copy link
Contributor Author

p12tic commented Jul 22, 2022

@fabiencastan Just a friendly ping :-)

@fabiencastan fabiencastan merged commit cdbcb75 into alicevision:develop Jul 28, 2022
@fabiencastan
Copy link
Member

Thanks @p12tic !

@p12tic p12tic deleted the fix-pyside2-decorator-bug branch August 4, 2022 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building and running Meshroom

3 participants