Skip to content

Commit e0a7781

Browse files
committed
Python 3 Compatibility with __version__.py
The 'basestring' keyword was removed from __version__.py making Python <= 3.3 compatible.
1 parent c23349e commit e0a7781

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

eve_mongoengine/__version__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Project Version
22

3+
# This file must remain compatible with
4+
# both Python >= 2.6 and Python 3.3+
5+
36
VERSION = (0, 1, 0) # 0.1.0
47

58
def get_version():
6-
if isinstance(VERSION[-1], basestring):
7-
return '.'.join(map(str, VERSION[:-1])) + VERSION[-1]
8-
return '.'.join(map(str, VERSION))
9+
if isinstance(VERSION[-1], int):
10+
return '.'.join(map(str, VERSION))
11+
return '.'.join(map(str, VERSION[:-1])) + VERSION[-1]
12+

0 commit comments

Comments
 (0)