This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Django 1.4.1, WebOb 1.2.2, WebTest 1.4.0, django-browserid 0.…
…6, django-sha2 1.4.1, django-webtest 1.5.4, requests 0.14.1
- Loading branch information
Cameron Dawson
committed
Oct 3, 2012
1 parent
9b0c80f
commit 4998c71
Showing
3,722 changed files
with
273,586 additions
and
107,464 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,30 @@ | ||
VERSION = (1, 3, 3, 'final', 0) | ||
VERSION = (1, 4, 1, 'final', 0) | ||
|
||
def get_version(): | ||
version = '%s.%s' % (VERSION[0], VERSION[1]) | ||
if VERSION[2]: | ||
version = '%s.%s' % (version, VERSION[2]) | ||
if VERSION[3:] == ('alpha', 0): | ||
version = '%s pre-alpha' % version | ||
else: | ||
if VERSION[3] != 'final': | ||
version = '%s %s %s' % (version, VERSION[3], VERSION[4]) | ||
from django.utils.version import get_svn_revision | ||
svn_rev = get_svn_revision() | ||
if svn_rev != u'SVN-unknown': | ||
version = "%s %s" % (version, svn_rev) | ||
return version | ||
def get_version(version=None): | ||
"""Derives a PEP386-compliant version number from VERSION.""" | ||
if version is None: | ||
version = VERSION | ||
assert len(version) == 5 | ||
assert version[3] in ('alpha', 'beta', 'rc', 'final') | ||
|
||
# Now build the two parts of the version number: | ||
# main = X.Y[.Z] | ||
# sub = .devN - for pre-alpha releases | ||
# | {a|b|c}N - for alpha, beta and rc releases | ||
|
||
parts = 2 if version[2] == 0 else 3 | ||
main = '.'.join(str(x) for x in version[:parts]) | ||
|
||
sub = '' | ||
if version[3] == 'alpha' and version[4] == 0: | ||
# At the toplevel, this would cause an import loop. | ||
from django.utils.version import get_svn_revision | ||
svn_revision = get_svn_revision()[4:] | ||
if svn_revision != 'unknown': | ||
sub = '.dev%s' % svn_revision | ||
|
||
elif version[3] != 'final': | ||
mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'} | ||
sub = mapping[version[3]] + str(version[4]) | ||
|
||
return main + sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.