Changeset 691


Ignore:
Timestamp:
Jan 2, 2016, 6:35:15 PM (4 years ago)
Author:
cito
Message:

Print a warning when the PostgreSQL version is too old

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.x/module/setup.py

    r690 r691  
    4848import os
    4949import platform
     50import warnings
    5051try:
    5152    from setuptools import setup
     
    7677            part = int(part)
    7778        parts.append(part)
    78     return tuple(parts or [8])
     79    return tuple(parts or [8, 3])
    7980
    8081
     
    119120        self.default_vars = True
    120121        self.escaping_funcs = pg_version[0] >= 9
     122        if pg_version < (8, 3):
     123            warnings.warn("PygreSQL does not support this PostgreSQL version.")
    121124
    122125    def finalize_options(self):
  • trunk/module/setup.py

    r690 r691  
    4949import os
    5050import platform
     51import warnings
    5152try:
    5253    from setuptools import setup
     
    7778            part = int(part)
    7879        parts.append(part)
    79     return tuple(parts or [9])
     80    return tuple(parts or [9, 0])
    8081
    8182
     
    120121        self.default_vars = True
    121122        self.escaping_funcs = pg_version[0] >= 9
     123        if pg_version < (9, 0):
     124            warnings.warn("PygreSQL does not support this PostgreSQL version.")
    122125
    123126    def finalize_options(self):
Note: See TracChangeset for help on using the changeset viewer.