Red Hat Bugzilla – Bug 168066
4Suite's Postgres support breaks for current version of Postgres
Last modified: 2007-11-30 17:11:13 EST
Description of problem:
Postgres 7.4.6 ships with a python API whose version string is "3.6.1".
The Python side of the API in 4Suite croaks if Postgres API's version label
consists of three or more parts.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Python 2.3.4 (#1, Feb 2 2005, 12:11:53)
[GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import _pg
>>> print _pg.version
>>> import Ft.Server.Server.Drivers.Postgres
Traceback (most recent call last):
File "<stdin>", line 1, in ?
line 22, in ?
if float(version.group()) < 3.2:
ValueError: invalid literal for float(): 3.6.1
The module gets imported.
The postgresql-python module needs to be manually installed before using
4Suite's Postgres driver (see bug 168064).
It seems that Drivers/Postgres/__init__.py wants to make sure that the version
of the postgresql-python's driver is at least 3.2.
So, it converts the version string to a float, and compares it.
Feeding the string "3.6.1" to float() ain't gonna work, because that's not a
floating point number :-(
Suggestion: the easy fix is just to patch out that entire if statement in
__init__.py, and enforce a minimum version of the RPM package.
Thanks for your report. This is fixed in 4Suite 1.0b1 in FC4 and rawhide.
You should be able to rebuild that package from the source RPM for FC3.