Bug 168066 - 4Suite's Postgres support breaks for current version of Postgres
Summary: 4Suite's Postgres support breaks for current version of Postgres
Alias: None
Product: Fedora
Classification: Fedora
Component: 4Suite (Show other bugs)
(Show other bugs)
Version: 3
Hardware: All Linux
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-09-12 03:35 UTC by Sam Varshavchik
Modified: 2007-11-30 22:11 UTC (History)
0 users

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

Attachments (Terms of Use)

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):


How reproducible:


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

Actual results:

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

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.

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