Extension Migration¶
Migrate from API v1 to v2¶
API version 2 was introduced along with Ulauncher v5 after migrating from Python 2 to 3.
Required actions:
Remove
manifest_versionfrommanifest.json. It’s no longer neededIn the manifest file rename
api_versiontorequired_api_versionand set its value to"2"Note that we previously recommended to use a “semver” constraint here, but2is a valid such constraint and we are moving away from semver in the coming API release, so there is no point in using it.Migrate your extension to Python 3 manually or by using 2to3 tool
Create a file called
versions.jsonin the root directory of master branch using the following content as a template:
[ { "required_api_version": "1", "commit": "<branch name with the pre-migration code>" }, { "required_api_version": "2", "commit": "<branch name with python3 code>" } ]For more details about
version.json, see tutorial.For example, you may choose
python2as a branch name where you keep the old code, which is going to be used by the old Ulauncher app, andmasteras a branch name where you keep the latest version. In this case the file contents should look like this:[ { "required_api_version": "1", "commit": "python2" }, { "required_api_version": "2, "commit": "master" } ]
Note
Please take a short survey to help us build greater API and documentation