[QGIS-Developer] Removing QgsProject.instance() from Python bindings?
Enrico Ferreguti
enricofer at gmail.com
Wed Jan 3 00:39:20 PST 2018
...thanks. Many QgsProject.instance() calls even in our plugins too!
2018-01-03 3:37 GMT+01:00 Nyall Dawson <nyall.dawson at gmail.com>:
> >>
> >> Just wondering... before 3.0 launch, should we remove
> >> QgsProject.instance() from the Python bindings, in favour of something
> >> like iface.activeProject()?
> >>
> >> Sometime in the future (4.0?) we'll end up killing
> >> QgsProject.instance(), but in the meantime is it a good move to push
> >> people away from relying on this method?
> >>
> >> I'd say yes, given that the 2.x -> 3.0 api break is so huge anyway and
> >> will generally result in substantial plugin rewriting (vs just
> >> modifying a few methods), maybe we're better off to get PyQGIS
> >> developers to deal with this now and factor it into their new
> >> designs?*
> >>
> >> Nyall
> >>
> >> * based on the belief that 3.x -> 4.0 will be a gentler transition!!
> >> _______________________________________________
>
> Ok, based on the results of https://github.com/qgis/QGIS/pull/5974 ,
> we'll have to defer this until 4.0 when (hopefully) we have much fewer
> QgsProject::instance() calls in core/gui/providers.
>
> Nyall
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180103/da810952/attachment.html>
More information about the QGIS-Developer
mailing list