patch

1 view
Skip to first unread message

Florian Bösch

unread,
Feb 14, 2008, 9:31:19 PM2/14/08
to ibm...@googlegroups.com
Hi,

I noticed you attempt some weird stuff with your package, like lopsided monkey patching by way of setuptools (which is why it wasn't working for me).

I suggest the attached patch.

Cheers,
Florian
ibm_db.patch.tgz

Alex P

unread,
Feb 14, 2008, 10:35:22 PM2/14/08
to ibm_db
Hi Florian,

Now I'm in trouble :-) ... and not because I monkeyed with the
packaging, but for having to explain how much we appreciate the
feedback, and your gracious help & patch provided... while not being
able to even open that patch you sent in.

So, let me try to layout from the very beginning the current rules on
this project, assuming of course the risk of not being entirely
understood or even worse:
1. We really appreciate your feedback in reporting errors and issues
with this work-in-progress (alpha quality nonetheless)
2. We will do our best to provide timely fixes to any reported
problems as we would do with any other IBM product
3. At this time we do not have legal clearance to take in
contributions (we may in the future), therefore we would not be able
to even open and read patches sent in. Therefore we would be really
grateful if you can describe the problem, so we can provide an
independent solution.

We really appreciate your understanding on this rather complicated (if
not plainly silly) approach :-S

Thanks,
Alex

P.S. Please open a bug and describe the issues you are having in order
to provide the solution. The solution we initialy provide may not be
as good/elegant as yours from the very beginning, but we'll do our
best to reach that level. Thanks again.

__doc__

unread,
Feb 15, 2008, 4:39:41 AM2/15/08
to ibm_db
On Feb 15, 4:35 am, Alex P <apiti...@ca.ibm.com> wrote:
> 3. At this time we do not have legal clearance to take in
> contributions (we may in the future), therefore we would not be able
> to even open and read patches sent in. Therefore we would be really
> grateful if you can describe the problem, so we can provide an
> independent solution.
>
> We really appreciate your understanding on this rather complicated (if
> not plainly silly) approach :-S
It's indeed a bit funny. Well, I needed the fix, and I thought (as it
usually is with opensource projects) that patches are welcome. Also, I
usually prefer patching over forking.

> P.S. Please open a bug and describe the issues you are having in order
> to provide the solution. The solution we initialy provide may not be
> as good/elegant as yours from the very beginning, but we'll do our
> best to reach that level. Thanks again.
The issue is described in the issue list (issue #1).

The solution I propose is to introduce a setuptools entry point for
sqlalchemy.databases that points to your dialect class. Also I
reformatted the setup.py and reorganized the package as I didn't see
the point of having it deeply nested in folders.

Cheers,
Florian

Alex P

unread,
Feb 15, 2008, 7:24:55 AM2/15/08
to ibm_db
On Feb 15, 4:39 am, __doc__ <pya...@gmail.com> wrote:
>
> The issue is described in the issue list (issue #1).
>
> The solution I propose is to introduce a setuptools entry point for
> sqlalchemy.databases that points to your dialect class. Also I
> reformatted the setup.py and reorganized the package as I didn't see
> the point of having it deeply nested in folders.

OK. I think I understand now what the problem is and we'll have a fix
out for your review shortly, to address both the apparently
unnecessary folder nesting and the loading of the dialect.

Thanks again for being so patient with us,
Alex

Alex P

unread,
Feb 16, 2008, 12:10:47 AM2/16/08
to ibm_db
I believe we've cleaned up the .egg setup mess from the first code
drop, but if you
find the "broom missed some filthy corner", please let us know :-)

Now the attempt to install remotely IBM_DB_SA adapter should behave as
below:
$ sudo easy_install ibm_db_sa
Searching for ibm-db-sa
Reading http://pypi.python.org/simple/ibm_db_sa/
Reading http://code.google.com/p/ibm-db/downloads/list
Best match: ibm-db-sa 0.1.1
Downloading http://ibm-db.googlecode.com/files/ibm_db_sa-0.1.1-py2.5.egg
Processing ibm_db_sa-0.1.1-py2.5.egg
creating /usr/lib/python2.5/site-packages/ibm_db_sa-0.1.1-
py2.5.egg
Extracting ibm_db_sa-0.1.1-py2.5.egg to /usr/lib/python2.5/site-
packages
Adding ibm-db-sa 0.1.1 to easy-install.pth file

Installed /usr/lib/python2.5/site-packages/ibm_db_sa-0.1.1-
py2.5.egg
Reading http://pypi.python.org/pypi/ibm_db/
Reading http://pypi.python.org/pypi/SQLAlchemy/
Processing dependencies for ibm-db-sa
Searching for ibm-db>=0.2.5
Best match: ibm-db 0.2.6
Downloading http://ibm-db.googlecode.com/files/ibm_db-0.2.6-py2.5-linux-i686.egg
Processing ibm_db-0.2.6-py2.5-linux-i686.egg
creating /usr/lib/python2.5/site-packages/ibm_db-0.2.6-py2.5-linux-
i686.egg
Extracting ibm_db-0.2.6-py2.5-linux-i686.egg to /usr/lib/python2.5/
site-packages
Adding ibm-db 0.2.6 to easy-install.pth file

Installed /usr/lib/python2.5/site-packages/ibm_db-0.2.6-py2.5-
linux-i686.egg
Finished processing dependencies for ibm-db-sa

We also provided some simple sanity test in the README to verify once
installed:
http://code.google.com/p/ibm-db/source/browse/trunk/IBM_DB/ibm_db_sa/README

Bring up Python console and input:
import sqlalchemy
from sqlalchemy import *
import ibm_db_sa.ibm_db_sa
db2 = sqlalchemy.create_engine('ibm_db_sa://
userid:sec...@host.name.com:50000/pydev')
metadata = MetaData()
users = Table('users', metadata,
Column('user_id', Integer, primary_key = True),
Column('user_name', String(16), nullable = False),
Column('email_address', String(60), key='email'),
Column('password', String(20), nullable = False)
)
metadata.bind = db2
metadata.create_all()
users_table = Table('users', metadata, autoload=True,
autoload_with=db2)
users_table

Michael Bayer

unread,
Feb 16, 2008, 1:11:57 AM2/16/08
to ibm_db
looks great, glad we put in the entry point support some time ago (i
think it was to accommodate the MySQL-NDB driver to start with).
Anything I can do to help with this driver, just give a holler.

thanks for the great work from the IBM team !

- mike

Alex P

unread,
Feb 19, 2008, 11:27:09 AM2/19/08
to ibm_db
Michael, your nice words mean a lot of encouragement to us, especially
when coming from the author of the most complete, world-class SQL tool-
set built for the Python community. We also appreciate a lot the
support provided through entry points, and your willingness to further
help in the future.

Many thanks and congratulation on your exquisite Python ORM framework.
Alex P
Reply all
Reply to author
Forward
0 new messages