Re: [cx-oracle-users] Re: cx_Oracle Python utility
Brought to you by:
atuining
From: Geoff G. <ge...@ge...> - 2003-08-29 23:16:36
|
cx_Oracle 3.1 builds acceptably under Python 2.1.3, but fails to run. Apparently 3.1 has used PyString_FromFormat, and that doesn't exist prior to some version of 2.2. I have a patch -- it's not exactly elegant, but it gets the job done and appears to run correctly. I would submit as a bug and a proposed patch on sourceforge (and will if you tell me to) but I wasn't sure it wasn't actually a "feature". Patch included below .sig. Thanks, --G. -- Geoff Gerrietts <geoff at gerrietts dot net> http://www.gerrietts.net/ "If I were two-faced, would I be wearing this one?" --Abraham Lincoln Index: cx_Oracle.c =================================================================== RCS file: /src/3rdparty/cxoracle/cx_Oracle.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 cx_Oracle.c --- cx_Oracle.c 2003/08/22 13:37:37 1.1.1.1 +++ cx_Oracle.c 2003/08/29 23:15:27 @@ -146,9 +146,10 @@ return NULL; // return the formatted string - return PyString_FromFormat("(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=" - "(PROTOCOL=TCP)(HOST=%s)(PORT=%d)))(CONNECT_DATA=(SID=%s)))", - host, port, sid); + return PyString_Format(PyString_FromString( + "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=" + "(PROTOCOL=TCP)(HOST=%s)(PORT=%d)))(CONNECT_DATA=(SID=%s)))"), + args); } |