Description of problem: After upgrade to postgresql-7.4.6-1.FC2.1 the pgdb module stops to work: | import pgdb | db = pgdb.connect(host='db', database='mailstat') | c = db.cursor() | c.execute("SELECT %u", (1,)) | Traceback (most recent call last): | File "<stdin>", line 4, in ? | File "/tmp/pgdb.py", line 188, in execute | self.executemany(operation, (params,)) | File "/tmp/pgdb.py", line 209, in executemany | raise OperationalError, "internal error in '%s' (%s)" % (sql,e) | pgdb.OperationalError: internal error in 'INIT' This is caused by syntax like | elif type(x, (types.IntType, types.LongType, types.FloatType)): ... | elif type(x, (types.ListType, types.TupleType)): which is not valid python code. Version-Release number of selected component (if applicable): postgresql-7.4.6-1.FC2.1 How reproducible: 100% Additional info: Marking this as HIGH priority as it breaks all python programs based on pgdb which worked before the upgrade.
Thanks for the report. I checked with PyGreSQL's author, who replies: <quote> This bug was fixed days later but I never made a new version. I now use isinstance() anyway which is the more correct method. I will get 3.6 out right away with this and other fixes. </quote> I'll roll out a new Fedora release as soon as I get 3.6 from him.
Fixed (I trust) in this morning's release.
*** Bug 143281 has been marked as a duplicate of this bug. ***
*** Bug 152392 has been marked as a duplicate of this bug. ***