[Qgis-developer] [plugins] python 3 support

Matthias Kuhn matthias at opengis.ch
Mon May 9 02:10:33 PDT 2016


Hi

On 09/05/16 10:51, Denis Rouzaud wrote:
> Dear all,
>
> I am raising this again....
>
> Now that we can build QGIS with Qt5, Python 3, PyQt5, an open question
> remains: how do plugins will handle with this?
> Starting a QGIS built with PyQt5 using enabled plugins will probably
> report a lot of Python crashes.
>
> Right now, there is an option to port plugins when building QGIS.
> This solution is fine at the moment although it requires a rebuild
> every time you install a new plugin.
This only ports core plugins, so this does not help at all with 3rd
party plugins.
>
> But later on, whenever QGIS 3 arises, it would be perfect to offer a
> way to plugins to support both 2.x and 3.x, or not?
>
> I believe plugins should tell if they handle python2/pyqt4 or
> python3/pyqt5 or both (probably using qgis.PyQt package).
> If we choose this path, it should be included in next QGIS release.
> I started a PR on this topic [0] but it only propose to the plugin to
> say if they support Python3/PyQt5 and assumes that it can support only
> one. This would need to be updated so plugins could support both.

I would like to see flags for

py2pyqt4
py3pyqt5
py3pyqt5-experimental

The last one will allow plugin authors to start porting and receive user
feedback while not yet promoting their plugin as stable under this version.

Normally a dev should manually run scripts/2to3 on his plugin, fix
remaining issues and flag as compatible (or experimental if he wants
broader testing first).

> What do you think?
> Should we stick to the port-plugins and offer nothing else?
Nope :)
>
> Cheers,
>
> Denis
>
Matthias
>
>
>
> [0] https://github.com/qgis/QGIS/pull/2911
>
>
>
>
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160509/4eff998b/attachment.html>


More information about the Qgis-developer mailing list