4.1. Migrating from semver2 to semver3

This section describes the visible differences for users and how your code stays compatible for semver3. Some changes are backward incompatible.

Although the development team tries to make the transition to semver3 as smooth as possible, at some point change is inevitable.

For a more detailed overview of all the changes, refer to our Change Log.

4.1.1. Use Version instead of VersionInfo

The VersionInfo has been renamed to Version to have a more succinct name. An alias has been created to preserve compatibility but using the old name has been deprecated and will be removed in future versions.

If you still need the old version, use this line:

from semver.version import Version as VersionInfo

4.1.2. Use semver.cli instead of semver

All functions related to CLI parsing are moved to semver.cli. If you need such functions, like cmd_bump(), import it from semver.cli in the future:

from semver.cli import cmd_bump

4.1.3. Use semver.Version.is_valid instead of semver.Version.isvalid

The pull request PR #284 introduced the method is_compatible(). To keep consistency, the development team decided to rename the isvalid() to is_valid().