AW: [Zope-DB] [ANN] Modified version of DCOracle2 is available - RE Dr. Klaus Happle fixes
Hello - I was checking your fixes (Dr. Klaus Happle) for the two functions in dco2.c: (RE: http://mail.zope.org/pipermail/zope-db/2006-November/004812.html ) static PyObject *Cursor_ResultSet(Cursor *self, int count)and static PyObject *Cursor_fetch(Cursor *self, PyObject *args) I noticed that in the **original** dco2.c we have: 1. In static PyObject *Cursor_ResultSet(Cursor *self, int count): #ifndef ORACLE8i rs-fetchResultCode = OCI_SUCCESS; #endif 2. In static PyObject *Cursor_fetch(Cursor *self, PyObject *args): #ifndef ORACLE8i if (status == OCI_SUCCESS_WITH_INFO) { for (i = 0; i PyList_Size(self-results); i++) { rs = (ResultSet *) PyList_GetItem(self-results, i); rs-fetchResultCode=status; } } #endif In both cases, you got rid of #ifndef ORACLE8i in your fixes of the two functions. I am just curious as to why these ifndef's were removed. Can someone please clarifiy. Note: in dco2.c we have: #ifdef ORACLE9i # ifndef ORACLE8i # define ORACLE8i # endif #endif so with the #ifndef ORACLE8i, I imagine with the original code did not compile the statements above with Oracle 8 or Oracle 9 detected. I am curious how removing the #ifndef ORACLE8i condition in the fixes to the two functions would affect things at large. Thanks, Maan ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
AW: [Zope-DB] [ANN] Modified version of DCOracle2 is available - RE Dr. Klaus Happle fixes
Hello, your base is DCOracle2, 1.3 beta. But my base and fix was for DCOracle2, 1.2 The Successor (?) of DCOracle2 was reported/initiated from Maciej Wisniowski in http://mail.zope.org/pipermail/zope-db/2006-November/004789.html The base of this development was not the version 1.3 and so we can understand the differnce. When you will use the Version DCOracle2, 1.3 beta, then you must merge the differences or the essentials of my bugfix, which I describe in: http://mail.zope.org/pipermail/zope/2005-August/160762.html Klaus Happle -Ursprüngliche Nachricht- Von: Maan M. Hamze [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 2. Dezember 2007 20:29 An: zope-db@zope.org Cc: Happle Dr., Klaus Martin Betreff: AW: [Zope-DB] [ANN] Modified version of DCOracle2 is available - RE Dr. Klaus Happle fixes Hello - I was checking your fixes (Dr. Klaus Happle) for the two functions in dco2.c: (RE: http://mail.zope.org/pipermail/zope-db/2006-November/004812.html ) static PyObject *Cursor_ResultSet(Cursor *self, int count)and static PyObject *Cursor_fetch(Cursor *self, PyObject *args) I noticed that in the **original** dco2.c we have: 1. In static PyObject *Cursor_ResultSet(Cursor *self, int count): #ifndef ORACLE8i rs-fetchResultCode = OCI_SUCCESS; #endif 2. In static PyObject *Cursor_fetch(Cursor *self, PyObject *args): #ifndef ORACLE8i if (status == OCI_SUCCESS_WITH_INFO) { for (i = 0; i PyList_Size(self-results); i++) { rs = (ResultSet *) PyList_GetItem(self-results, i); rs-fetchResultCode=status; } } #endif In both cases, you got rid of #ifndef ORACLE8i in your fixes of the two functions. I am just curious as to why these ifndef's were removed. Can someone please clarifiy. Note: in dco2.c we have: #ifdef ORACLE9i # ifndef ORACLE8i # define ORACLE8i # endif #endif so with the #ifndef ORACLE8i, I imagine with the original code did not compile the statements above with Oracle 8 or Oracle 9 detected. I am curious how removing the #ifndef ORACLE8i condition in the fixes to the two functions would affect things at large. Thanks, Maan ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
Re: [Zope-DB] [ANN] Modified version of DCOracle2 is available
I still do not understand how to get hold of the new dco2.c file (along with other files in the DCOracle2 package). You state right from the start: ** Code is here: http://code.google.com/p/dcoracle2da/ Should be available via svn with: svn checkout http://dcoracle2da.googlecode.com/svn/trunk/ dcoracle2da ** Can someone give clear instructions on how to get these files? To get files you need to have Subversion (SVN) client installed on your machine. On modern linux you should already have it, otherwise it should be availaible from system repositories. Home page is http://subverstion.tigris.org To check if you have Subversion type in the console: svn If you have SVN client then simply type: svn checkout https://dcoracle2da.googlecode.com/svn/tags/1.0RC1 DCOracle2 This will get files from googlecode into folder named 'DCOracle2'. The addres above is to most current version I have although there may still be some errors. This version uses SQLAlchemy pool so if you want to use this with Zope you'll need to install SQLAlchemy from sqlalchemy.org too. See INSTALL file. Currently I had not much time to do something with this project, but I'll try to make it cleaner soon, write some tests (so far I was not able to run original tests...) and to put this into official Zope repositories. On a different note: The 'official' distribution of DCOracle2 (from zope.org) compiled fine with Oracle 9i on Solaris. However, with Oracle 10g on Solaris, I ran into a compilation error and I had to add the line: typedef unsigned int dword; I did not have the time to investigate the reason that this happened with Oracle 10g. Thanks for this info. We have this DCOracle2 compiled with Oracle10 on RedHatEnterprise 4. Unfortunatelly I have no Solaris. But would be nice if you can check dco2.c from this version on Solaris machine. At last I'll add a note about this Solaris issue into INSTALL file. -- Maciej Wisniowski ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
Re: AW: [Zope-DB] [ANN] Modified version of DCOracle2 is available
you remember my report http://mail.zope.org/pipermail/zope/2005-August/160762.html of an BUG for the handling of LONGs in DCO2? In fact I forgot about this... The consequence of this BUG is stochastic results for LONG fields We use an Fix of this BUG: I've put your code into dco2.c. Thank you very much for these fixes. -- Maciej Wisniowski ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
AW: [Zope-DB] [ANN] Modified version of DCOracle2 is available
); answer = self-results; if (!releaseresults) Py_INCREF(answer); else { self-results = NULL; /* Our caller gets our only copy*/ self-current = -1; } TRACE(T_EXIT,(sA, Cursor_fetch, answer)); return answer; } Klaus Happle -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Maciej Wisniowski Gesendet: Freitag, 17. November 2006 17:32 An: Zope-DB@zope.org Betreff: [Zope-DB] [ANN] Modified version of DCOracle2 is available Hi Due to discussion on Zope list and some work I did before I've published modified version of DCOracle2. What is in this version: 1. Bug fixes - StoredProcedures caused deadlocks in database - StoredProcedures caused conflict errors under heavy load removed self._errors reference and added _p_resolveConflict - other I don't remember now 2. Changes Changes are only in python files - DCOracle2 now uses connection pool Pool implementation is based on psycopg but it doesn't use volatile attributes. As a result: - Open/Close button in ZMI works as it should - DCOracle is possibly slower a bit - Ability to reconnect after the connection is broken When Oracle is restarted, connection is closed by firewall etc. Zope will show an error but only once for every broken connection. Second request will cause DCOracle2 to reconnect 3. To do: - Possibly useage of raise ConflictError may cause that there will be no errors shown during reconnect - Pool size attribute may be set via ZMI - Testing... This code is now in use at my company, but not yet in production environment. So far this works with Zope 2.8.x and Oracle9. If somebody knows better place for this code then let me know. Any ideas how should file headers (I mean licences) look? Comments are welcome Code is here: http://code.google.com/p/dcoracle2da/ Should be available via svn with: svn checkout http://dcoracle2da.googlecode.com/svn/trunk/ dcoracle2da THERE IS NO GUARANTEE THAT THIS WILL WORK FOR YOU, SO BE CAREFULL :) -- Maciej Wisniowski ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
Re: [Zope-DB] [ANN] Modified version of DCOracle2 is available
Eek! ZpsycopgDA is GPL'd! Does that mean you've put your version of DCOracle under GPL? But that aside I am not sure it is the best implementation of connection pooling out there. I don't want to reinvent the whell and create own pool management so I searched a bit and found something interesting. What do you think about SQLAlchemy? It has is nice (I think) pool implementation, which may be used separately. See: http://www.sqlalchemy.org/docs/pooling.myt I'm especially interested in licensing. SQLAlchemy is on MIT license, so I think if it will be possible to use SQLAlchemy pool implementation then then this DCOracle2 version may be ZPL. Am I right? I did very first attempt to use this with my version of DCOracle2 and so far I am able to connect to Oracle from Zope and do some queries with SQLAlchemy QueuePool in use. If somebody wants to take a look then SQLAlchemized version, with some code from ChrisW branch (reconnect after connection is broken) is now at: https://dcoracle2da.googlecode.com/svn/branches/sqlalchemypool In general all this code is considered 'under developement'. There is nothing in tags/ yet. -- Maciej Wisniowski ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
Re: [Zope-DB] [ANN] Modified version of DCOracle2 is available
I fear that there is a rule that everything in the Zope repositories should be ZPL -- to have a uniform license for all components from these repositories. Of course, if your DCO2 is not in the Zope repositories, you should be able to include MIT licensed code in a ZPL licensed version of DCO2. You are right but now I hope it is not necessary to put any MIT licensed code from SQLAlchemy into DCOracle2. Simple statement like: from SQLAlchemy.pool import QueuePool is enough. That just means that it is necessary to install SQLAlchemy to use this version of DCOracle2, but there are no parts of it's code here. Seems this is same as need to have Oracle Client installed in system in order to use DCOracle2. -- Maciej Wisniowski ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
Re: [Zope-DB] [ANN] Modified version of DCOracle2 is available
Yes. ZPsycopgDA can be under the ZPL because the ZPL is GPL-compatible. But if you directly include GPL'ed code you must use GPL. OK. Thanks for the answer. One more question. If I'll create application using ZPsycopgDA which is ZPL (but ZPsycopgDA uses psycopg which is GPL), then does my application have to be GPL too? Federico, as I see you're one of psycopg2 developers so a little question about this. I've found a bug in ZPsycopgDA. It should have one more statement when catching exceptions: if e.args[0].find(deadlock detected) -1: raise ConflictError There are two places in ZPsycopgDA/db.py where above code should be added. These are near: if e.args[0].find(concurrent update) -1: raise ConflictError Can I submit this issue somewhere (AFAIK there is no bugtracker at initd.org) or this e-mail is enough? The problem is in psycopg2. Zope3 psycopg implementation already has such statement. -- Maciej Wisniowski ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db
[Zope-DB] [ANN] Modified version of DCOracle2 is available
Hi Due to discussion on Zope list and some work I did before I've published modified version of DCOracle2. What is in this version: 1. Bug fixes - StoredProcedures caused deadlocks in database - StoredProcedures caused conflict errors under heavy load removed self._errors reference and added _p_resolveConflict - other I don't remember now 2. Changes Changes are only in python files - DCOracle2 now uses connection pool Pool implementation is based on psycopg but it doesn't use volatile attributes. As a result: - Open/Close button in ZMI works as it should - DCOracle is possibly slower a bit - Ability to reconnect after the connection is broken When Oracle is restarted, connection is closed by firewall etc. Zope will show an error but only once for every broken connection. Second request will cause DCOracle2 to reconnect 3. To do: - Possibly useage of raise ConflictError may cause that there will be no errors shown during reconnect - Pool size attribute may be set via ZMI - Testing... This code is now in use at my company, but not yet in production environment. So far this works with Zope 2.8.x and Oracle9. If somebody knows better place for this code then let me know. Any ideas how should file headers (I mean licences) look? Comments are welcome Code is here: http://code.google.com/p/dcoracle2da/ Should be available via svn with: svn checkout http://dcoracle2da.googlecode.com/svn/trunk/ dcoracle2da THERE IS NO GUARANTEE THAT THIS WILL WORK FOR YOU, SO BE CAREFULL :) -- Maciej Wisniowski ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db