mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 09:24:07 +03:00
Fixed version check
This commit is contained in:
parent
c8ec747903
commit
62a8ef308a
|
@ -40,20 +40,16 @@ Homepage: http://initd.org/projects/psycopg2
|
||||||
|
|
||||||
# Import modules needed by _psycopg to allow tools like py2exe to do
|
# Import modules needed by _psycopg to allow tools like py2exe to do
|
||||||
# their work without bothering about the module dependencies.
|
# their work without bothering about the module dependencies.
|
||||||
#
|
|
||||||
# TODO: we should probably use the Warnings framework to signal a missing
|
|
||||||
# module instead of raising an exception (in case we're running a thin
|
|
||||||
# embedded Python or something even more devious.)
|
|
||||||
|
|
||||||
import sys, warnings
|
import sys, warnings
|
||||||
if sys.version_info[0] >= 2 and sys.version_info[1] >= 3:
|
if sys.version_info >= (2, 3):
|
||||||
try:
|
try:
|
||||||
import datetime as _psycopg_needs_datetime
|
import datetime as _psycopg_needs_datetime
|
||||||
except:
|
except:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"can't import datetime module probably needed by _psycopg",
|
"can't import datetime module probably needed by _psycopg",
|
||||||
RuntimeWarning)
|
RuntimeWarning)
|
||||||
if sys.version_info[0] >= 2 and sys.version_info[1] >= 4:
|
if sys.version_info >= (2, 4):
|
||||||
try:
|
try:
|
||||||
import decimal as _psycopg_needs_decimal
|
import decimal as _psycopg_needs_decimal
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user