Beispiel #1
0
def create_range(start_version_string, end_version_string):
    start = UnboundedVersionSpecifier()
    end = UnboundedVersionSpecifier()

    if start_version_string is not None:
        start = VersionSpecifier.from_version_string(start_version_string)

    if end_version_string is not None:
        end = VersionSpecifier.from_version_string(end_version_string)

    return VersionRange(start=start, end=end)
Beispiel #2
0
 def _sanitize_version(cls, version):
     version = [
         v if isinstance(v, VersionSpecifier) else
         VersionSpecifier.from_version_string(v)
         for v in cls.version_to_list(version)
     ]
     return version or [UnboundedVersionSpecifier()]