Bug 168066 - 4Suite's Postgres support breaks for current version of Postgres
4Suite's Postgres support breaks for current version of Postgres
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: 4Suite (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-11 23:35 EDT by Sam Varshavchik
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 1.0-8.b1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-14 13:20:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sam Varshavchik 2005-09-11 23:35:13 EDT
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 13:20:46 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.