def getNextVersion(version, now=None):
 if (now is None):
  now = date.today()
 major = (now.year - VERSION_OFFSET)
 if (major != version.major):
  minor = 0
 else:
  minor = (version.minor + 1)
 return Version(version.package, major, minor, 0)

def getNextVersion ( version , now = None ) : if ( now is None ) : now = date . today ( ) major = ( now . year - VERSION_OFFSET ) if ( major != version . major ) : minor = 0 else : minor = ( version . minor + 1 ) return Version ( version . package , major , minor , 0 )
calculate the version number for a new release of twisted based on the previous version number .