Bug 168066

Summary: 4Suite's Postgres support breaks for current version of Postgres
Product: [Fedora] Fedora Reporter: Sam Varshavchik <mrsam>
Component: 4SuiteAssignee: Miloslav Trmač <mitr>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.0-8.b1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-14 17:20:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sam Varshavchik 2005-09-12 03:35:13 UTC
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):

1.0.3

How reproducible:

Always

Steps to Reproduce:


$ python
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
3.6.1
>>> import Ft.Server.Server.Drivers.Postgres

Actual results:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"/usr/lib/python2.3/site-packages/Ft/Server/Server/Drivers/Postgres/__init__.py",
line 22, in ?
    if float(version.group()) < 3.2:
ValueError: invalid literal for float(): 3.6.1

Expected results:

The module gets imported.

Additional info:

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.

Comment 1 Miloslav Trmač 2005-09-14 17:20:46 UTC
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.