<div dir="ltr">...thanks. Many QgsProject.instance() calls even in our plugins too!<br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-01-03 3:37 GMT+01:00 Nyall Dawson <span dir="ltr"><<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">>><br>
>> Just wondering... before 3.0 launch, should we remove<br>
>> QgsProject.instance() from the Python bindings, in favour of something<br>
>> like iface.activeProject()?<br>
>><br>
>> Sometime in the future (4.0?) we'll end up killing<br>
>> QgsProject.instance(), but in the meantime is it a good move to push<br>
>> people away from relying on this method?<br>
>><br>
>> I'd say yes, given that the 2.x -> 3.0 api break is so huge anyway and<br>
>> will generally result in substantial plugin rewriting (vs just<br>
>> modifying a few methods), maybe we're better off to get PyQGIS<br>
>> developers to deal with this now and factor it into their new<br>
>> designs?*<br>
>><br>
>> Nyall<br>
>><br>
>> * based on the belief that 3.x -> 4.0 will be a gentler transition!!<br>
>> ______________________________<wbr>_________________<br>
<br>
</span>Ok, based on the results of <a href="https://github.com/qgis/QGIS/pull/5974" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/<wbr>pull/5974</a> ,<br>
we'll have to defer this until 4.0 when (hopefully) we have much fewer<br>
QgsProject::instance() calls in core/gui/providers.<br>
<span class="HOEnZb"><font color="#888888"><br>
Nyall<br>
</font></span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></div></div></blockquote></div><br></div>