mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-06-01 03:33:10 +03:00
Added PY2, PY3 to compat module
This commit is contained in:
parent
4ace9544ff
commit
f4a2630f1a
|
@ -4,12 +4,16 @@ __all__ = ['string_types', 'text_type', 'lru_cache']
|
||||||
|
|
||||||
if sys.version_info[0] == 2:
|
if sys.version_info[0] == 2:
|
||||||
# Python 2
|
# Python 2
|
||||||
|
PY2 = True
|
||||||
|
PY3 = False
|
||||||
string_types = basestring,
|
string_types = basestring,
|
||||||
text_type = unicode
|
text_type = unicode
|
||||||
from ._lru_cache import lru_cache
|
from ._lru_cache import lru_cache
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Python 3
|
# Python 3
|
||||||
|
PY2 = False
|
||||||
|
PY3 = True
|
||||||
string_types = str,
|
string_types = str,
|
||||||
text_type = str
|
text_type = str
|
||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
|
|
Loading…
Reference in New Issue
Block a user