[QGIS-Developer] Removing QgsProject.instance() from Python bindings?

Alexander Bruy alexander.bruy at gmail.com
Fri Dec 22 23:11:08 PST 2017


+1 from me too. This also will bring more consistency with other methods.
We already have iface.activeLayer() instead of currentLayer()

2017-12-23 8:03 GMT+02:00 Tim Sutton <tim at kartoza.com>:

> Hi
>
>
>
> On 23 Dec 2017, at 06:40, Nyall Dawson <nyall.dawson at gmail.com> wrote:
>
> Hi all,
>
> Just wondering... before 3.0 launch, should we remove
> QgsProject.instance() from the Python bindings, in favour of something
> like iface.activeProject()?
>
>
>
> +1 That sounds much more intuitive to me.
>
> Regards
>
> Tim
>
>
> 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!!
> _______________________________________________
> 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
>
>
>>
>
>
>
>
>
> *Tim Sutton*
>
> *Co-founder:* Kartoza
> *Project chair:* QGIS.org
>
> Visit http://kartoza.com to find out about open source:
>
> Desktop GIS programming services
> Geospatial web development
> GIS Training
> Consulting Services
>
> *Skype*: timlinux
> *IRC:* timlinux on #qgis at freenode.net
>
>
> _______________________________________________
> 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
>



-- 
Alexander Bruy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171223/9e164f9c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KartozaNewLogoThumbnail.jpg
Type: image/jpeg
Size: 6122 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171223/9e164f9c/attachment.jpg>


More information about the QGIS-Developer mailing list