Qt4/Qt5 neutral compilation fixes
Re: Qt4/Qt5 neutral compilation fixes
I would like to propose to reconsider the option mentioned here viewtopic.php?f=10&t=12534&start=190#p145131
That is to get in the Python3 support and start the 0.17 release process (can take few months). This would give us 0.17 with support for both Python3 and 2, and there are also already a lot of new features since 0.16 (2600+ commits).
After 0.17 release we move to Qt5/Pyside2 and drop support for Python2/Qt4/Pyside... There are a few good reasons to do it like this but I also believe it would be generally good for the project to have a new final release in the next months (at least in the first half of 2017).
That is to get in the Python3 support and start the 0.17 release process (can take few months). This would give us 0.17 with support for both Python3 and 2, and there are also already a lot of new features since 0.16 (2600+ commits).
After 0.17 release we move to Qt5/Pyside2 and drop support for Python2/Qt4/Pyside... There are a few good reasons to do it like this but I also believe it would be generally good for the project to have a new final release in the next months (at least in the first half of 2017).
Re: Qt4/Qt5 neutral compilation fixes
Actually things changed a bit as PySide2 now supports Python 2.7 (looking at the Qt Wiki) and up. It was not that long ago when i looked and it was advertised PySide2 will be Python 3 only.
P.S. Therefore FreeCAD being Python2/Python3, PySide/PySide2 and Qt4/Qt5 compatible i guess could stay relevant for additional year or two.
P.S. Therefore FreeCAD being Python2/Python3, PySide/PySide2 and Qt4/Qt5 compatible i guess could stay relevant for additional year or two.
Re: Qt4/Qt5 neutral compilation fixes
https://wiki.qt.io/PySide2_GettingStarted
"On Windows, it is recommended to use Python 3 and build with MSVC2015. Python 2 requires building with MSVC2008."
Regardless if it is possible or not it is still questionable if it makes sense to drag all this weight with us... If we do the 0.17 sooner, we can then have another year to work out everything else.
"On Windows, it is recommended to use Python 3 and build with MSVC2015. Python 2 requires building with MSVC2008."
Regardless if it is possible or not it is still questionable if it makes sense to drag all this weight with us... If we do the 0.17 sooner, we can then have another year to work out everything else.
Re: Qt4/Qt5 neutral compilation fixes
I read about qtpy in the past but at this time it only supported PyQt4 and PySide. Does it also support PySide2 now?I was thinking we maybe could also abstract the PyQt/PySide/PySide2, there is the qtpy package that could become interesting too some day...
Even if we go for one Python binding only but if using qtpy reduces the code changes for the PySide <=> PySide2 migration or any future changes like the PySide3 migration for Qt6 then it might be worth to have a look at it.+1 for not supporting multiply qt bindings. There are for sure some incompatible things in pyside, pyside2, pyqt4, pyqt5. Better to go for pyside2 only.
It might be recommended but it's not mandatory. Last weekend I build PySide2 with Python2.7 using MSVC2013. MSVC2008 isn't an option anyway because since the merge of PartDesignNext we need C++11 features which the old compiler doesn't support. So, on Windows the minimum compiler version is MSVC2013.https://wiki.qt.io/PySide2_GettingStarted
"On Windows, it is recommended to use Python 3 and build with MSVC2015. Python 2 requires building with MSVC2008."
Re: Qt4/Qt5 neutral compilation fixes
That is true. I just want to avoid issues for 3d party wb when used with pyqt...
What about wrapping the old pyside api into FreeCAD.PySide? Then we could simple replace 'from PySide import ... ' with 'from FreeCAD.PySide import ...'
Is there any reason for going for qt5 before python3? The python3 branch was nearly ready a year ago. And shouldn't be too much work to get ready again. On the qt5 side pyside2 is not officially released.
What about wrapping the old pyside api into FreeCAD.PySide? Then we could simple replace 'from PySide import ... ' with 'from FreeCAD.PySide import ...'
Is there any reason for going for qt5 before python3? The python3 branch was nearly ready a year ago. And shouldn't be too much work to get ready again. On the qt5 side pyside2 is not officially released.
Re: Qt4/Qt5 neutral compilation fixes
If you have a look at the git history then you will see that the Qt5 migration is (nearly) finished. The move was quite smooth for the C++ part. The code basis now supports Qt4 and Qt5.Is there any reason for going for qt5 before python3?
Re: Qt4/Qt5 neutral compilation fixes
Good, thanks for the additional informations
Re: Qt4/Qt5 neutral compilation fixes
As soon as it's finished, we retake the python3 battle!
Re: Qt4/Qt5 neutral compilation fixes
Do you think we should first do the PySide2 migration before doing the Python3 port or what do you mean with "finished"?yorik wrote:As soon as it's finished, we retake the python3 battle!
Re: Qt4/Qt5 neutral compilation fixes
Another idea to support pyside2 without changing the python code:
Place a 'Pyside' dir somewhere at python path eg. usr/lib/freecad/Mod/pymodules. Now wrap pyside2 to the old api. Then the wrapped module should be imported and not the origin pyside module.
Place a 'Pyside' dir somewhere at python path eg. usr/lib/freecad/Mod/pymodules. Now wrap pyside2 to the old api. Then the wrapped module should be imported and not the origin pyside module.