waliwali / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

Implement IBM_DB_SA for the current version of SQLAlchemy #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Python 2.5.4/Win XP/DB2 v8.1.17.789, SQLAlchemy-0.5.4p2, ibm_db-0.7.2.1-
py2.5-win32, ibm_db_sa-0.1.6-py2.5 installed
2. Trying to run `IBM_DB SA adapter sanity test` from http://
code.google.com/p/ibm-db/wiki/README

What is the expected output? What do you see instead?
    Traceback (most recent call last):
      File "test1.py", line 3, in <module>
        import ibm_db_sa.ibm_db_sa
      File "c:\python25\lib\site-packages\ibm_db_sa-0.1.6-py2.5.egg
\ibm_db_sa\ibm_db_sa.py", line 24, in <module>
        from sqlalchemy import sql, engine, schema, exceptions, logging
    ImportError: cannot import name logging

Original issue reported on code.google.com by goog...@gmail.com on 1 Jun 2009 at 3:08

GoogleCodeExporter commented 9 years ago
Would it be possible to get an updated ETA on this issue? 

Original comment by bhorns...@gmail.com on 16 Apr 2010 at 2:02

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Found a solution to this. Edit the following file (or equivalent on your OS): 
/usr/local/lib/python2.6/dist-packages/ibm_db_sa-0.1.6-py2.6.egg/ibm_db_sa/ibm_d
b_sa.py and replace all instances of "logging" with "log". This module was 
renamed in SQLAlchemy 0.5 and therefore cannot be found under "logging".

Original comment by nasm...@gmail.com on 18 Aug 2010 at 1:02

GoogleCodeExporter commented 9 years ago
Would anybody know whether an update for current version of SQLAlchemy (0.6.5 
at the moment) is planned any time soon or whether the ibm_db_sa project was 
abandoned? Thanks!

Original comment by vladimir...@gmail.com on 27 Dec 2010 at 4:00

GoogleCodeExporter commented 9 years ago
ibm_db_sa patch for SQLAlchemy 0.6.x is available on 
http://codereview.appspot.com/1659042/show. This one is not developed and 
tested by us but you can give a try to this.

Original comment by rahul.pr...@in.ibm.com on 29 Dec 2010 at 6:29

GoogleCodeExporter commented 9 years ago
Dear rahul, what's the status of this topic ?
Do you plan any ibm_db_sa update to match sqlalchemy development ?

Original comment by julien.c...@gmail.com on 3 Nov 2011 at 10:35

GoogleCodeExporter commented 9 years ago
You can get the current development version of ibm_db_sa which supports 
SQLAlchemy 0.6/0.7 from 
http://code.google.com/p/ibm-db/source/browse/#svn%2Fbranches%2Fibm_db_sa.

This one is not developed by us but you can give one try and in case of any 
problem you can create an issue here. Jaimy Azle will take care of these issue 
as he has developed and maintain this branch.

Original comment by rahul.pr...@in.ibm.com on 15 Nov 2011 at 6:53

GoogleCodeExporter commented 9 years ago
Hi, 

any idea if this branch get released. How can i contribute to that branch?

Thing is i want to use DB2Connect to access a DB2 Database on a AS400 System.
I have this simple patch which seems to work. Maybe someone can check if it's 
ok?

But with DB2Connect it should work. So i made this simple patch:

Index: ibm_db_sa/base400.py
===================================================================
--- ibm_db_sa/base400.py (Revision 157)
+++ ibm_db_sa/base400.py (Arbeitskopie)
@@ -289,3 +289,10 @@
                           'unique': r[1] == 'Y'
                       }
     return [value for key, value in indexes.iteritems()]
+
+
+from ibm_db_sa.ibm_db import IBM_DB_SADialect
+class MyIBM_DB400Dialect(IBM_DB400Dialect, IBM_DB_SADialect):
+    pass
+
+dialect = MyIBM_DB400Dialect
Index: setup.py
===================================================================
--- setup.py (Revision 157)
+++ setup.py (Arbeitskopie)
@@ -35,6 +35,7 @@
                         ('', ['./LICENSE']) ],
        entry_points = {
          'sqlalchemy.dialects': ['ibm_db_sa = ibm_db_sa.base:dialect',
+                                 'ibm_db_sa400 = ibm_db_sa.base400:dialect',
                                  'ibm_db_sa.zxjdbc = ibm_db_sa.zxjdbc:dialect',
                                  'ibm_db_sa.pyodbc = ibm_db_sa.pyodbc:dialect',
                                  'ibm_db_sa.zxjdbc400 = ibm_db_sa.zxjdbc400:dialect',

Thanks in advance
Christian

Original comment by gosc...@googlemail.com on 10 Jan 2012 at 2:33

GoogleCodeExporter commented 9 years ago
This branch is owned by Jaimy (jaimy.azle@gmail.com), you can directly ask him 
regarding the release. I don't know exactly when he is planning to release this 
branch.

We can happily accept your patch once you will sign the contribution agreement.
Please go through our wiki page 
http://code.google.com/p/ibm-db/wiki/Contributions to understand and sign 
contribution agreement.

Once we receive your singed CLA, you can also start contributing on this branch 

Original comment by rahul.pr...@in.ibm.com on 24 Jan 2012 at 12:31

GoogleCodeExporter commented 9 years ago
ibm_db_sa-0.3.0 has been released with SQLALchemy-0.7.3 and above support.

Original comment by rahul.pr...@in.ibm.com on 4 Mar 2013 at 5:21