def _setversion(self, version):
        checkVersion = hasattr(self, '_version') #could be reconstructing
        if checkVersion:
            checkVersion = self._getappversion()
        if IDroneModelAppVersion.providedBy(version):
            self._version = IDroneModelAppVersion(version)
        else:
            self._version = IDroneModelAppVersion(
                AppVersion.makeAppVersion(self.app.name, version)
            )
        if checkVersion:
            data = {
                'instance': self,
                'version': self._version,
                'previous': checkVersion
            }
            if checkVersion < self._version:
                if checkVersion.major < self._version.major:
                    Event('new-major-release').fire(**data)
                else:
                    Event('new-release-version').fire(**data)
                return #done
            Event('release-change').fire(**data)
sets the self.appversion and self.version
dataset/ETHPy150Open OrbitzWorldwide/droned/droned/lib/droned/models/app.py/AppInstance._setversion