[Qgis-developer] Breaking API and merge of threading branch

Charlie Sharpsteen chuck at sharpsteen.net
Wed Aug 10 16:13:36 EDT 2011


On Wed, Aug 10, 2011 at 3:32 AM, Tim Sutton <lists at linfiniti.com> wrote:
>
> I think the fact that we are going to break API in 2.0 is well known
> and discussed often in releases, blogs, qgis hackfests etc. and is a
> general expectation when performing a major version numbering change.
> I think your approach is good (tag last api compatibility etc). As far
> as I am concerned we can go ahead with API breakage today. There are a
> number of other gut wrenching changes I would like to make for 2.0:
>
> - change theme to 'gis' theme by default
> - get rid of kids theme
> - rename default theme to 'legacy'
> - remove all deprecated api calls
>
> Many parts of our api have developed inconsistencies and I would like
> to spend some time putting my 'rpl' binary to good use trying to clean
> these up before we release. I think we should continue the practice of
> marking new api additions / changes with a @note added in 2.0  or
> @note replaces getLayerId in 2.0 etc. as far as possible so that
> people can adapt to our changes easily.
>
> Anyway +1 for API breakage from me - we will continue maintaining
> 1.7.x for now anyway for those looking for stability. The number of
> things we can reasonable backport will shrink as we mess with the API
> but I don't see the impact to be too big.
>
> Regards
>
> Tim


Since backwards-incompatible changes are being discussed, may I also suggest
that we update PyQGIS to use version 2 of the SIP apis for QString and
QVariant?

The version 2 API is much more Pythonic and has better support for Unicode
and Python 3. It is also the only version that is compatible with PySide.
Because of this, many GUI components that use the Enthought scientific
python modules are only compatible with version 2 of the SIP APIs. Notable
projects include Matplotlib and IPython.

More information on why using API v2 is a good idea can be found here:

  http://www.pyside.org/docs/pseps/psep-0101.html


Updating to the new SIP API should be a simple matter of adding:

    import sip
    sip.setapi('QString', 2)
    sip.setapi('QVariant', 2)

To the startup routine for the Python kernel before any PyQt libraries are
added. All Python plugins that use QString or QVariant would have to replace
these with plain Python strings and dicts.

Thoughts?

-Charlie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110810/58a066be/attachment.html


More information about the Qgis-developer mailing list