"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Version.py" between
cheetah3-3.1.0.tar.gz and cheetah3-3.2.0.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

Version.py  (cheetah3-3.1.0):Version.py  (cheetah3-3.2.0)
Version = '3.1.0' Version = '3.2.0'
VersionTuple = (3, 1, 0, 'final', 1) VersionTuple = (3, 2, 0, 'final', 0)
MinCompatibleVersion = '3.0.0a1' MinCompatibleVersion = '3.0.0a1'
MinCompatibleVersionTuple = (3, 0, 0, 'alpha', 1) MinCompatibleVersionTuple = (3, 0, 0, 'alpha', 1)
#### ####
def convertVersionStringToTuple(s): def convertVersionStringToTuple(s):
versionNum = [0, 0, 0] versionNum = [0, 0, 0]
releaseType = 'final' releaseType = 'final'
releaseTypeSubNum = 0 releaseTypeSubNum = 0
skipping to change at line 31 skipping to change at line 31
releaseType = 'candidate' releaseType = 'candidate'
else: else:
num = s num = s
num = num.split('.') num = num.split('.')
for i in range(len(num)): for i in range(len(num)):
versionNum[i] = int(num[i]) versionNum[i] = int(num[i])
if len(versionNum) < 3: if len(versionNum) < 3:
versionNum += [0] versionNum += [0]
releaseTypeSubNum = int(releaseTypeSubNum) releaseTypeSubNum = int(releaseTypeSubNum)
return tuple(versionNum+[releaseType, releaseTypeSubNum]) return tuple(versionNum + [releaseType, releaseTypeSubNum])
if __name__ == '__main__': if __name__ == '__main__':
c = convertVersionStringToTuple c = convertVersionStringToTuple
print(c('2.0a1')) print(c('2.0a1'))
print(c('2.0b1')) print(c('2.0b1'))
print(c('2.0rc1')) print(c('2.0rc1'))
print(c('2.0')) print(c('2.0'))
print(c('2.0.2')) print(c('2.0.2'))
assert c('0.9.19b1') < c('0.9.19') assert c('0.9.19b1') < c('0.9.19')
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)