[QGIS-Developer] Converting plugins to QGIS 3

C Hamilton adenaculture at gmail.com
Fri May 12 08:21:18 PDT 2017

With the OSGeo4W installer I see that 2to3 is located at


It made some changes but does not seem to migrate PyQt4 to PyQt5. What am I
doing wrong? I just tried running this on one of my files in this manner
from the OSGeo4W Shell.

python C:\OSGeo4W64\apps\Python36\Tools\scripts\2to3.py -w copyLatLonTool.py


> The point is, that some classes have been moved between modules from
> PyQt4 to PyQt5 (e.g. all widgets from QtGui to QtWidgets).
> The migration tool 2to3 can help with this - but only if the imports are
> fully qualified.
> There are other ways to upgrade your code than 2to3, the advantage of
> the proposed approach is that it makes your code closer to "best
> practice" - but it's up to you to decide.
> Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170512/89518af7/attachment.html>

More information about the QGIS-Developer mailing list