diff options
Diffstat (limited to 'pkg_resources.py')
| -rw-r--r-- | pkg_resources.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index 52d92669..e8dae8a4 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1912,7 +1912,7 @@ replace = {'pre':'c', 'preview':'c','-':'final-','rc':'c','dev':'@'}.get def _parse_version_parts(s): for part in component_re.split(s): part = replace(part,part) - if not part or part=='.': + if part in ['', '.']: continue if part[:1] in '0123456789': yield part.zfill(8) # pad for numeric comparison @@ -1955,8 +1955,6 @@ def parse_version(s): parts = [] for part in _parse_version_parts(s.lower()): if part.startswith('*'): - if part<'*final': # remove '-' before a prerelease tag - while parts and parts[-1]=='*final-': parts.pop() # remove trailing zeros from each series of numeric parts while parts and parts[-1]=='00000000': parts.pop() |
