Python plugin compatibility

You can publish multiple versions of your plugin, each for a different QGIS version. In order to assign your plugin to proper QGIS version, you should properly set plugin metadata tags described below.

qgisMinimumVersion

This tag is absolutely required and should be set to a "major dot minor" version, e.g. qgisMinimumVersion=2.0
In some (rare?) cases you could want to set it to the full version number, e.g.: 2.0.4 . It's also possible.

NOTE: Although master is officially still 1.9, the plugin loading stuff is set to behave as 2.0, thus you can safely set qgisMinimumVersion to 2.0 and it will work in master.

qgisMaximumVersion (don't use unless necessary)

Despite some rumors, usually you don't need (and shouldn't) set this tag explicitly.

QGIS assumes the plugin is compatible with qgisMinimumVersion and any higher WITHIN one major version. Another words, it automatically sets qgisMaximumVersion to the default value, what is floor(qgisMinimumVersion)+0.99

For example: if you set the minimum version to 1.6, the maximum is assumed to 1.99. If you set the minimum to 2.0, the maximum is 2.99.

There may be two cases that you could want to set the qgisMaximumVersion explicitly:

1. Set it higher than default. If your plugin is very simple and you want to maintain one dual-API version instead of two separate, you can set:
qgisMinimumVersion to 1.6 and qgisMaximumVersion to 2.99. Please note in most cases it's much more complicated than maintaing separate versions.

2. Set it lower than default. E.g. min=2.0 and max=2.3. Hardly useful, as we don't break API within one major version, so plugins for 2.0 should work with any 2.x.

Although it would generally work, you shouldn't use the qgisMaximumVersion in order to publish e.g. one plugin version for QGIS 2.0-2.3 and a second for 2.4-2.99. Instead, you can bump up the version of the second plugin, as stated in the version tag description.

Note "99" is the highest allowed value, please don't use higher numbers.

experimental

Regardless of minimum and maximum QGIS version, you can set plugin's experimental tag to either true of false. You can use this tag to publish both: stable and development version. Please see next section also.

version

With multiple plugin version, it's important to give them proprer sequence, because QGIS always chooses the highest plugin version compatible with the current program version and allowed by the experimental status.

Thus, if you publish two plugins with qgsMinimumVersion respectively 2.0 and 2.4, you must give a higher version to the latter. Otherwise you can't be sure which one will be chosen for QGIS 2.4 (and above), as both are compatible.

The same with experimental tag: if you publish both experimental and non-experimental versions, the former must have a higher version to be sure it will be chosen for users allowing experimental plugins.

The official QGIS Plugin Repository

The official plugin repository only returns the highest plugin (both: experimental and not) compatible with requested QGIS version. For that reason, it should be always accessed with qgis url parameter:

http://plugins.qgis.org/plugins/plugins.xml?qgis=2.0

Because QGIS 1.8 doesn't attach this parameter, the default is 1.8. YES, simple http://plugins.qgis.org/plugins/plugins.xml with no parameter will only
return plugins compatible with QGIS 1.8.