parse_version#
- parse_version(version_str: str) tuple[int, int, int][source]#
Parse version string to tuple of three ints for comparison.
- Parameters:
version_str (str) – Fully qualified version string of the form ‘major.minor.patch’.
- Returns:
Version as tuple.
- Return type:
tuple[int, int, int]
- Raises:
ValueError – If
version_strhas less that three elements separated by..ValueError – If
version_str‘s first three elements can not be casted to int.