Thread: [cx-oracle-users] cx_Oracle 4.1
Brought to you by:
atuining
From: Anthony T. <an...@co...> - 2005-01-24 19:06:58
|
What is cx_Oracle? cx_Oracle is a Python extension module that allows access to Oracle and conforms to the Python database API 2.0 specifications with a few exceptions. Where do I get it? http://starship.python.net/crew/atuining What's new? 1) Added support for Python 2.4. In Python 2.4, the datetime module is used for both binding and fetching of date and timestamp data. In Python 2.3, objects from the datetime module can be bound but the internal datetime objects will be returned from queries. 2) Added pickling support for LOB and datetime data. 3) Fully qualified the table name that was missing in an alter table statement in the setup test script as noted by Marc Gehling. 4) Added a section allowing for the setting of the RPATH linker directive in setup.py as requested by Iustin Pop. 5) Added code to raise a programming error exception when an attempt is made to access a LOB locator variable in a subsequent fetch. 6) The username, password and dsn (tnsentry) are stored on the connection object when specified, regardless of whether or not a standard connection takes place. 7) Added additional module level constant called "LOB" as requested by Joseph Canedo. 8) Changed exception type to IntegrityError for constraint violations as requested by Joseph Canedo. 9) If scale and precision are not specified, an attempt is made to return a long integer as requested by Joseph Canedo. 10) Added workaround for Oracle bug which returns an invalid handle when the prepare call fails. Thanks to al...@hs... for providing the code that demonstrated the problem. 11) The cusor method arravar() will now accept the actual list so that it is not necessary to call cursor.arrayvar() followed immediately by var.setvalue(). 12) Fixed bug where attempts to execute the statement "None" with bind variables would cause a segmentation fault. 13) Added support for binding by position (paramstyle = "numeric"). 14) Removed memory leak created by calls to OCIParamGet() which were not mirrored by calls to OCIDescriptorFree(). Thanks to Mihai Ibanescu for pointing this out and providing a patch. 15) Added support for calling cursor.executemany() with statement None implying that the previously prepared statement ought to be executed. Thanks to Mihai Ibanescu for providing a patch. 16) Added support for rebinding variables when a subsequent call to cursor.executemany() uses a different number of rows. Thanks to Mihai Ibanescu for supplying a patch. 17) The microseconds are now displayed in datetime variables when nonzero similar to method used in the datetime module. 18) Added support for binary_float and binary_double columns in Oracle 10g. Changes since 4.1 beta 1 1) Fixed bug where subclasses of Cursor do not pass the connection in the constructor causing a segfault. 2) DDL statements must be reparsed before execution as noted by Mihai Ibanescu. 3) Add support for setting input sizes by position. 4) Fixed problem with catching an exception during execute and then still attempting to perform a fetch afterwards as noted by Leith Parkin. 5) Rename the types so that they can be pickled and unpickled. Thanks to Harri Pasanen for pointing out the problem. 6) Handle invalid NLS_LANG setting properly (Oracle seems to like to provide a handle back even though it is invalid) and determine the number of bytes per character in order to allow for proper support in the future of multibyte and variable width character sets. 7) Remove date checking from the native case since Python already checks that dates are valid; enhance error message when invalid dates are encountered so that additional processing can be done. 8) Fix bug executing SQL using numeric parameter names with predefined variables (such as what takes place when calling stored procedures with out parameters). 9) Add support for reading CLOB values using multibyte or variable length character sets. -- Anthony Tuininga an...@co... Computronix Distinctive Software. Real People. Suite 200, 10216 - 124 Street NW Edmonton, AB, Canada T5N 4A3 Phone: (780) 454-3700 Fax: (780) 454-3838 http://www.computronix.com |
From: Sean P. K. <sp...@ge...> - 2005-02-01 19:21:05
|
Anthony, I have been trying to compile this version on Mac OS X 10.3.7 with Python 2.3 and have run into a strange problem. Below is a copy of the session, where I build and install cx_Oracle and then try to import it. It crashes the python interpreter. Even though I get a few compiler errors, it seems that everything is actually going fine. I was able to use the previous version without a problem. Do you have any ideas what might be going on. I researched the error a bit and it mentioned that this can happen when something is compiled against a different version of Python and then the one it is being run in. I do have python 2.4 on the system as well, but it is in another directory and I have done some testing, and am reasonable sure this isn't the problem, unless there are some hard coded paths in the module somewhere (which seems unlikely). Any ideas? Thanks, Sean ------ $ sudo python setup.py build running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.darwin-7.7.0-Power_Macintosh-2.3 gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/Users/spkane/oracle/OraHome_1/rdbms/demo -I/Users/spkane/oracle/OraHome_1/rdbms/public -I/Users/spkane/oracle/OraHome_1/network/public -I/Users/spkane/oracle/OraHome_1/plsql/public -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/ python2.3 -c cx_Oracle.c -o build/temp.darwin-7.7.0-Power_Macintosh-2.3/cx_Oracle.o -DBUILD_TIME="February 01, 2005 11:11:53" In file included from /Users/spkane/oracle/OraHome_1/rdbms/public/oci.h:2327, from cx_Oracle.c:9: /Users/spkane/oracle/OraHome_1/rdbms/public/oci1.h:148: warning: function declaration isn't a prototype In file included from /Users/spkane/oracle/OraHome_1/rdbms/public/ociap.h:206, from /Users/spkane/oracle/OraHome_1/rdbms/public/oci.h:2351, from cx_Oracle.c:9: /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:674: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2665: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2674: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2684: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2693: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2702: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2711: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2719: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2729: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2736: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2744: warning: function declaration isn't a prototype In file included from /Users/spkane/oracle/OraHome_1/rdbms/public/oci.h:2351, from cx_Oracle.c:9: /Users/spkane/oracle/OraHome_1/rdbms/public/ociap.h:9952: warning: function declaration isn't a prototype /Users/spkane/oracle/OraHome_1/rdbms/public/ociap.h:9958: warning: function declaration isn't a prototype creating build/lib.darwin-7.7.0-Power_Macintosh-2.3 gcc -Wl,-F. -Wl,-F. -bundle -framework Python build/temp.darwin-7.7.0-Power_Macintosh-2.3/cx_Oracle.o -L/Users/spkane/oracle/OraHome_1/lib -lclntsh -o build/lib.darwin-7.7.0-Power_Macintosh-2.3/cx_Oracle.so $ sudo python setup.py install running install running build running build_ext running install_lib copying build/lib.darwin-7.7.0-Power_Macintosh-2.3/cx_Oracle.so -> /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ site-packages $ python Python 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import cx_Oracle Fatal Python error: Interpreter not initialized (version mismatch?) Abort trap $ |
From: Marcos P. <ma...@bu...> - 2005-02-01 23:03:18
|
=BFHave you tried python -v to see what exact files are being loaded? El mar, 01-02-2005 a las 11:20 -0800, Sean P.Kane escribi=F3: > Anthony, >=20 > I have been trying to compile this version on Mac OS X 10.3.7 with =20 > Python 2.3 and have run into a strange problem. Below is a copy of the= =20 > session, where I build and install cx_Oracle and then try to import it.= =20 > It crashes the python interpreter. Even though I get a few compiler =20 > errors, it seems that everything is actually going fine. I was able to = =20 > use the previous version without a problem. Do you have any ideas what = =20 > might be going on. I researched the error a bit and it mentioned that =20 > this can happen when something is compiled against a different version = =20 > of Python and then the one it is being run in. I do have python 2.4 on = =20 > the system as well, but it is in another directory and I have done some= =20 > testing, and am reasonable sure this isn't the problem, unless there =20 > are some hard coded paths in the module somewhere (which seems =20 > unlikely). >=20 > Any ideas? >=20 > Thanks, > Sean >=20 > ------ >=20 > $ sudo python setup.py build >=20 > running build > running build_ext > building 'cx_Oracle' extension > creating build > creating build/temp.darwin-7.7.0-Power_Macintosh-2.3 > gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp =20 > -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall =20 > -Wstrict-prototypes -I/Users/spkane/oracle/OraHome_1/rdbms/demo =20 > -I/Users/spkane/oracle/OraHome_1/rdbms/public =20 > -I/Users/spkane/oracle/OraHome_1/network/public =20 > -I/Users/spkane/oracle/OraHome_1/plsql/public =20 > -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/=20 > python2.3 -c cx_Oracle.c -o =20 > build/temp.darwin-7.7.0-Power_Macintosh-2.3/cx_Oracle.o =20 > -DBUILD_TIME=3D"February 01, 2005 11:11:53" > In file included from =20 > /Users/spkane/oracle/OraHome_1/rdbms/public/oci.h:2327, > from cx_Oracle.c:9: > /Users/spkane/oracle/OraHome_1/rdbms/public/oci1.h:148: warning: =20 > function declaration isn't a prototype > In file included from =20 > /Users/spkane/oracle/OraHome_1/rdbms/public/ociap.h:206, > from =20 > /Users/spkane/oracle/OraHome_1/rdbms/public/oci.h:2351, > from cx_Oracle.c:9: > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:674: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2665: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2674: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2684: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2693: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2702: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2711: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2719: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2729: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2736: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/nzt.h:2744: warning: =20 > function declaration isn't a prototype > In file included from =20 > /Users/spkane/oracle/OraHome_1/rdbms/public/oci.h:2351, > from cx_Oracle.c:9: > /Users/spkane/oracle/OraHome_1/rdbms/public/ociap.h:9952: warning: =20 > function declaration isn't a prototype > /Users/spkane/oracle/OraHome_1/rdbms/public/ociap.h:9958: warning: =20 > function declaration isn't a prototype > creating build/lib.darwin-7.7.0-Power_Macintosh-2.3 > gcc -Wl,-F. -Wl,-F. -bundle -framework Python =20 > build/temp.darwin-7.7.0-Power_Macintosh-2.3/cx_Oracle.o =20 > -L/Users/spkane/oracle/OraHome_1/lib -lclntsh -o =20 > build/lib.darwin-7.7.0-Power_Macintosh-2.3/cx_Oracle.so >=20 > $ sudo python setup.py install >=20 > running install > running build > running build_ext > running install_lib > copying build/lib.darwin-7.7.0-Power_Macintosh-2.3/cx_Oracle.so -> =20 > /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/= =20 > site-packages >=20 > $ python >=20 > Python 2.3 (#1, Sep 13 2003, 00:49:11) > [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import cx_Oracle > Fatal Python error: Interpreter not initialized (version mismatch?) > Abort trap >=20 > $=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |