[Qgis-developer] master and PyQt5 evolutions...
Nyall Dawson
nyall.dawson at gmail.com
Tue Aug 16 15:14:56 PDT 2016
On 17 August 2016 at 04:55, <mederic.ribreux at medspx.fr> wrote:
> Hello devs,
>
> I would like to know if it is OK to replace the few PyQt4 methods that have
> been modified in PyQt5 directly into master branch ? The code is not
> correctly ported with 2to3 because this is a PyQt evolution and not a
> python3 improvement.
>
> For example, QFileDialog.getOpenFileName in PyQt5 is the new name of
> QFileDialog.getOpenFileNameAndFilter in PyQt4 (which returns a tuple and not
> only a string). There is no getOpenFileNameAndFilter in PyQt5. If I "port"
> to the PyQt5 method, the code will not work anymore in PyQt4.
>
> Of course, I could make a lib2to3 custom fix class (like in fix_pyqt.py) but
> it seems to be very complicated (well, for my skills).
>
> I can also test for the current PyQt version directly in the code, before
> launching a QFileDialog method, but this is not very elegant.
>
> What are the rules for the master branch with not retrocompatible PyQt5 code
There's discussion here:
http://osgeo-org.1560.x6.nabble.com/Windows-builds-of-the-master-branch-td5280168.html
Personally I don't think we should break qt4 builds until we have all
the existing tests passing on the Travis qt5 builds.
Nyall
> ?
>
> Cheers,
> --
> Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list