From 62a8ef308a664ee8c6251cfba27da7fe6fef2d8e Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 4 Jun 2011 14:21:18 +0100 Subject: [PATCH] Fixed version check --- lib/__init__.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/__init__.py b/lib/__init__.py index 48a9847a..38312100 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -40,20 +40,16 @@ Homepage: http://initd.org/projects/psycopg2 # Import modules needed by _psycopg to allow tools like py2exe to do # 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 -if sys.version_info[0] >= 2 and sys.version_info[1] >= 3: +if sys.version_info >= (2, 3): try: import datetime as _psycopg_needs_datetime except: warnings.warn( "can't import datetime module probably needed by _psycopg", RuntimeWarning) -if sys.version_info[0] >= 2 and sys.version_info[1] >= 4: +if sys.version_info >= (2, 4): try: import decimal as _psycopg_needs_decimal except: