def version_windows(versions, major=1, minor=1, point=1):
 version_identifiers = []
 for version_string in versions:
  try:
   version_identifiers.append(Version(version_string))
  except (InvalidVersion, UnicodeEncodeError):
   pass
 major_version_window = major
 minor_version_window = minor
 point_version_window = point
 manager = VersionManager()
 for v in version_identifiers:
  manager.add(v)
 manager.prune_major(major_version_window)
 manager.prune_minor(minor_version_window)
 manager.prune_point(point_version_window)
 return manager.get_version_list()

def version_windows ( versions , major = 1 , minor = 1 , point = 1 ) : version_identifiers = [ ] for version_string in versions : try : version_identifiers . append ( Version ( version_string ) ) except ( InvalidVersion , UnicodeEncodeError ) : pass major_version_window = major minor_version_window = minor point_version_window = point manager = VersionManager ( ) for v in version_identifiers : manager . add ( v ) manager . prune_major ( major_version_window ) manager . prune_minor ( minor_version_window ) manager . prune_point ( point_version_window ) return manager . get_version_list ( )
return list of versions that have been pruned to version windows uses :py:class:versionmanager to prune the list of versions .