Index
2013-05-15 05:53 – Sibylle Koczian : [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?
2013-05-15 07:58 – Werner F. Bruhin : Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?
2013-05-16 06:47 – Sibylle Koczian : Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?
2013-05-16 07:18 – Werner F. Bruhin : Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?
2013-05-16 08:27 – Sibylle Koczian : Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?
2013-05-16 08:37 – Werner F. Bruhin : Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?
2013-05-18 05:43 – Sibylle Koczian : Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?
2013-05-22 07:28 – Sibylle Koczian : Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?
2013-05-29 14:29 – Ed Leafe : Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?
2013-05-30 05:03 – Sibylle Koczian : Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?
Back to top
[dabo-users] Firebird: kinterbasdb not maintained, fdb usable?

Author: Sibylle Koczian

Posted: 2013-05-15 05:53:20   Link

Hello,

I've installed a new virtual machine with OpenSuse and now I've got a

problem using Dabo with Firebird:

While Ubuntu still offers a kinterbasdb 3.3 package, Suse never had

this, so I always had to install from source. But now I can't find

version 3.3, on SourceForge there is only version 3.2 and earlier. I

didn't use Suse for some years, so this comes as a surprise.

As kinterbasdb isn't maintained any more: has anybody tried to use Dabo

with FDB, the new Python driver for Firebird?

Thank you for help,

Sibylle

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/51936920.9000605@t-online.de

©2013 Sibylle Koczian
Back to top
Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?

Author: Werner F. Bruhin

Posted: 2013-05-15 07:58:04   Link

On 15/05/2013 12:53, Sibylle Koczian wrote:

> Hello,

>

> I've installed a new virtual machine with OpenSuse and now I've got a

> problem using Dabo with Firebird:

>

> While Ubuntu still offers a kinterbasdb 3.3 package, Suse never had

> this, so I always had to install from source. But now I can't find

> version 3.3, on SourceForge there is only version 3.2 and earlier. I

> didn't use Suse for some years, so this comes as a surprise.

You should be able to get kinterbasdb 3.3 from the Firebird SQL site:

http://www.firebirdsql.org/en/python-driver/

But it would obviously be good if FDB would get more testing and Pavel

seems to do a good job to keep on top of issues as I see regular fixes

posted on the list: firebird-python@yahoogroups.com

Werner

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/5193865C.9020406@free.fr

©2013 Werner F. Bruhin
Back to top
Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?

Author: Sibylle Koczian

Posted: 2013-05-16 06:47:37   Link

Am 15.05.2013 14:58, schrieb Werner F. Bruhin:

> On 15/05/2013 12:53, Sibylle Koczian wrote:

> You should be able to get kinterbasdb 3.3 from the Firebird SQL site:

>

> http://www.firebirdsql.org/en/python-driver/

>

With that link I only could find version 3.2. Uwe Grauer sent me another

which led to 3.3:

http://www.ibphoenix.com/download/connectivity/python

> But it would obviously be good if FDB would get more testing and Pavel

> seems to do a good job to keep on top of issues as I see regular fixes

> posted on the list: firebird-python@yahoogroups.com

>

Quite right. I'll try that first, put FDB into dbfirebird.py, look at

results and tell about them here.

Using FDB in my console applications for Firebird works well, with and

without SQLAlchemy. But sometimes I need a GUI.

Greetings,

Sibylle

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/5194C759.7050406@t-online.de

©2013 Sibylle Koczian
Back to top
Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?

Author: Werner F. Bruhin

Posted: 2013-05-16 07:18:52   Link

On 16/05/2013 13:47, Sibylle Koczian wrote:

> Am 15.05.2013 14:58, schrieb Werner F. Bruhin:

>> On 15/05/2013 12:53, Sibylle Koczian wrote:

>> You should be able to get kinterbasdb 3.3 from the Firebird SQL site:

>>

>> http://www.firebirdsql.org/en/python-driver/

First link in the middle of that page shows for me:

Current Release: KInterbasDB 3.3 dated Jan 9, 2009 with a link to a

tar.bz2 file which seems to be 3.3.

...

>

> Quite right. I'll try that first, put FDB into dbfirebird.py, look at

> results and tell about them here.

>

> Using FDB in my console applications for Firebird works well, with and

> without SQLAlchemy. But sometimes I need a GUI.

Did you get FDB to work with SA - have that on my list to try. If yes,

what version os SA?

See you

Werner

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/5194CEAC.3050907@free.fr

©2013 Werner F. Bruhin
Back to top
Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?

Author: Sibylle Koczian

Posted: 2013-05-16 08:27:48   Link

Am 16.05.2013 14:18, schrieb Werner F. Bruhin:

> On 16/05/2013 13:47, Sibylle Koczian wrote:

>> Am 15.05.2013 14:58, schrieb Werner F. Bruhin:

>>> On 15/05/2013 12:53, Sibylle Koczian wrote:

>>> You should be able to get kinterbasdb 3.3 from the Firebird SQL site:

>>>

>>> http://www.firebirdsql.org/en/python-driver/

> First link in the middle of that page shows for me:

> Current Release: KInterbasDB 3.3 dated Jan 9, 2009 with a link to a

> tar.bz2 file which seems to be 3.3.

>

You're quite right. I tried from this page:

http://www.firebirdsql.org/en/development-python-driver/

and overlooked the difference to your link.

> Did you get FDB to work with SA - have that on my list to try. If yes,

> what version os SA?

>

SQLAlchemy 8.1, FDB 1.1, Python 3.3.1, on Windows 7, not yet tried out

on Linux and with Python 2. With SQLAlchemy 8.0 support for FDB became

official.

Greetings,

Sibylle

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/5194DED4.4040402@t-online.de

©2013 Sibylle Koczian
Back to top
Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?

Author: Werner F. Bruhin

Posted: 2013-05-16 08:37:35   Link

On 16/05/2013 15:27, Sibylle Koczian wrote:

...

>> Did you get FDB to work with SA - have that on my list to try. If yes,

>> what version os SA?

>>

>

> SQLAlchemy 8.1, FDB 1.1, Python 3.3.1, on Windows 7, not yet tried out

> on Linux and with Python 2. With SQLAlchemy 8.0 support for FDB became

> official.

The SA 8.0 support put it on my todo/try list:-) , but just didn't find

the time yet. Good to know that it works for you with SA 8.1 as I have

recently upgraded to that - so maybe I don't need that much time.;-)

Werner

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/5194E11F.6060908@free.fr

©2013 Werner F. Bruhin
Back to top
Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?

Author: Sibylle Koczian

Posted: 2013-05-18 05:43:30   Link

Am 16.05.2013 13:47, schrieb Sibylle Koczian:

> Am 15.05.2013 14:58, schrieb Werner F. Bruhin:

>> But it would obviously be good if FDB would get more testing and Pavel

>> seems to do a good job to keep on top of issues as I see regular fixes

>> posted on the list: firebird-python@yahoogroups.com

>>

>

> Quite right. I'll try that first, put FDB into dbfirebird.py, look at

> results and tell about them here.

>

First results: doesn't work out of the box. From dbFirebird.py I removed

line 25 to 43, as fdb doesn't need the initialization. Replaced

"kinterbasdb" with "fdb", didn't change anything else.

No problems creating the .cnxml file, test connection successful. Then I

used a very small test application which works with kinterbasdb, but got

this:

sib@gespenst-suse:~/bin> ./testnumtx_fb.py

/home/sib/src/dabo-master/dabo/lib/SimpleCrypt.py:52: UserWarning:

WARNING: SimpleCrypt is not secure. Please see

http://wiki.dabodev.com/SimpleCrypt for more information

warnings.warn("WARNING: SimpleCrypt is not secure. Please see

http://wiki.dabodev.com/SimpleCrypt for more information")

Traceback (most recent call last):

File "./testnumtx_fb.py", line 106, in <module>

app.start()

File "/home/sib/src/dabo-master/dabo/dApp.py", line 388, in start

self.setup()

File "/home/sib/src/dabo-master/dabo/dApp.py", line 340, in setup

self.initUIApp()

File "/home/sib/src/dabo-master/dabo/dApp.py", line 380, in initUIApp

self.uiApp.setup()

File "/home/sib/src/dabo-master/dabo/ui/uiwx/uiApp.py", line 432, in

setup

frm = self.dApp.MainForm = mfc()

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dForm.py", line 1043, in

__init__

*args, **kwargs)

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dForm.py", line 40, in

__init__

attProperties=attProperties, *args, **kwargs)

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dFormMixin.py", line 76,

in __init__

attProperties=attProperties, *args, **kwargs)

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dPemMixin.py", line 202,

in __init__

self._afterInit()

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dForm.py", line 58, in

_afterInit

super(BaseForm, self)._afterInit()

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dFormMixin.py", line

124, in _afterInit

self.createBizobjs()

File "./testnumtx_fb.py", line 45, in createBizobjs

conn = self.Application.getConnectionByName("FB_Foo")

File "/home/sib/src/dabo-master/dabo/dApp.py", line 1020, in

getConnectionByName

self.dbConnections[connName] = dabo.db.dConnection(ci)

File "/home/sib/src/dabo-master/dabo/db/dConnection.py", line 32, in

__init__

self._connection = self._openConnection(**kwargs)

File "/home/sib/src/dabo-master/dabo/db/dConnection.py", line 85, in

_openConnection

return

self._connectInfo.getConnection(forceCreate=self._forceCreate, **kwargs)

File "/home/sib/src/dabo-master/dabo/db/dConnectInfo.py", line 79, in

getConnection

return self._backendObject.getConnection(self, **kwargs)

File "/home/sib/src/dabo-master/dabo/db/dbFirebird.py", line 43, in

getConnection

password=password, database=database, **kwargs)

TypeError: connect() got an unexpected keyword argument 'forceCreate'

Should I put the changed dbFirebird.py to codepad?

Greetings,

Sibylle

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/51975B52.3050205@t-online.de

©2013 Sibylle Koczian
Back to top
Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?

Author: Sibylle Koczian

Posted: 2013-05-22 07:28:40   Link

Hello,

I still can't get Dabo to work with fdb.

Am 18.05.2013 12:43, schrieb Sibylle Koczian:

> First results: doesn't work out of the box. From dbFirebird.py I removed

> line 25 to 43, as fdb doesn't need the initialization. Replaced

> "kinterbasdb" with "fdb", didn't change anything else.

>

Next change, again in dbFirebird.py, put "forceCreate=False" into the

parameter list for getConnection:

getConnection(self, connectInfo, forceCreate=False, **kwargs)

Like dbMSSQL.py and dbSQLite.py.

> No problems creating the .cnxml file, test connection successful.

Same now, after the second change. Trying my test application I got a

new exception:

sib@gespenst-suse:~/bin> ./testnumtx_fb.py

/home/sib/src/dabo-master/dabo/lib/SimpleCrypt.py:52: UserWarning:

WARNING: SimpleCrypt is not secure. Please see

http://wiki.dabodev.com/SimpleCrypt for more information

warnings.warn("WARNING: SimpleCrypt is not secure. Please see

http://wiki.dabodev.com/SimpleCrypt for more information")

Traceback (most recent call last):

File "./testnumtx_fb.py", line 106, in <module>

app.start()

File "/home/sib/src/dabo-master/dabo/dApp.py", line 388, in start

self.setup()

File "/home/sib/src/dabo-master/dabo/dApp.py", line 340, in setup

self.initUIApp()

File "/home/sib/src/dabo-master/dabo/dApp.py", line 380, in initUIApp

self.uiApp.setup()

File "/home/sib/src/dabo-master/dabo/ui/uiwx/uiApp.py", line 432, in

setup

frm = self.dApp.MainForm = mfc()

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dForm.py", line 1043, in

__init__

*args, **kwargs)

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dForm.py", line 40, in

__init__

attProperties=attProperties, *args, **kwargs)

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dFormMixin.py", line 76,

in __init__

attProperties=attProperties, *args, **kwargs)

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dPemMixin.py", line 202,

in __init__

self._afterInit()

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dForm.py", line 58, in

_afterInit

super(BaseForm, self)._afterInit()

File "/home/sib/src/dabo-master/dabo/ui/uiwx/dFormMixin.py", line

124, in _afterInit

self.createBizobjs()

File "./testnumtx_fb.py", line 46, in createBizobjs

biz = BizFoo(conn)

File "/home/sib/src/dabo-master/dabo/biz/dBizobj.py", line 56, in

__init__

self.setConnection(conn)

File "/home/sib/src/dabo-master/dabo/biz/dBizobj.py", line 137, in

setConnection

self.createCursor()

File "/home/sib/src/dabo-master/dabo/biz/dBizobj.py", line 270, in

createCursor

crs = cf.getCursor(cursorClass)

File "/home/sib/src/dabo-master/dabo/db/dConnection.py", line 52, in

getCursor

return self.getBackendObject().getCursor(cursorClass)

File "/home/sib/src/dabo-master/dabo/db/dBackend.py", line 63, in

getCursor

return cursorClass(self._connection)

File "/home/sib/src/dabo-master/dabo/biz/dBizobj.py", line 300, in

__init__

apply(secondary.__init__, (self,) + args, kwargs)

TypeError: __init__() takes exactly 3 arguments (2 given)

What is happening here? What is "secondary" and what is its __init__ method?

Btw, my 2.7 documentation says about "apply": deprecated since version

2.3. I suppose that's when using "function(*args, **kwargs)" was introduced.

Thank you for help,

Sibylle

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/519CB9F8.60908@t-online.de

©2013 Sibylle Koczian
Back to top
Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?

Author: Ed Leafe

Posted: 2013-05-29 14:29:53   Link

On May 22, 2013, at 7:28 AM, Sibylle Koczian <Sibylle.Koczian@t-online.de> wrote:

> File "/home/sib/src/dabo-master/dabo/biz/dBizobj.py", line 300, in __init__

> apply(secondary.__init__, (self,) + args, kwargs)

> TypeError: __init__() takes exactly 3 arguments (2 given)

>

> What is happening here? What is "secondary" and what is its __init__ method?

'secondary' is the cursor class for the particular backend; in your case, Firebird. Apparently the Firebird cursor requires more than the standard arguments. Can you look at the kinterbasdb and/or fdb code to see what arguments are required for the cursor class's __init__() method?

> Btw, my 2.7 documentation says about "apply": deprecated since version 2.3. I suppose that's when using "function(*args, **kwargs)" was introduced.

When that code was written, we were probably using 2.2 or 2.3. It's been working fine all these years, so we never updated it. But even if we removed the use of 'apply', there would still be only 2 arguments being supplied.

-- Ed Leafe

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/EA2AB08F-2237-4B1F-A3D1-E21A77D4DFAE@leafe.com

©2013 Ed Leafe
Back to top
Re: [dabo-users] Firebird: kinterbasdb not maintained, fdb usable?

Author: Sibylle Koczian

Posted: 2013-05-30 05:03:15   Link

Am 29.05.2013 21:29, schrieb Ed Leafe:

> On May 22, 2013, at 7:28 AM, Sibylle

> Koczian<Sibylle.Koczian@t-online.de> wrote:

>

>> File "/home/sib/src/dabo-master/dabo/biz/dBizobj.py", line 300, in

>> __init__ apply(secondary.__init__, (self,) + args, kwargs)

>> TypeError: __init__() takes exactly 3 arguments (2 given)

>>

>> What is happening here? What is "secondary" and what is its

>> __init__ method?

>

> 'secondary' is the cursor class for the particular backend; in your

> case, Firebird. Apparently the Firebird cursor requires more than the

> standard arguments. Can you look at the kinterbasdb and/or fdb code

> to see what arguments are required for the cursor class's __init__()

> method?

>

I didn't find that code in the kinterbasdb package - could it be

contained in _kinterbasdb.so?

FDB: The arguments seem to be "connection" and "transaction" (and self,

of course). Could the "transaction" parameter be new?

class Cursor(object):

"""Represents a database cursor, which is used to execute SQL

statement and

manage the context of a fetch operation.

.. important::

DO NOT create instances of this class directly! Use only

:meth:`Connection.cursor`, :meth:`Transaction.cursor` and

:meth:`ConnectionGroup.cursor` to get Cursor instances that

operate in

desired context.

.. note::

Cursor is actually a high-level wrapper around

:class:`PreparedStatement`

instance(s) that handle the actual SQL statement execution and

result

management. Cursor has an internal cache of PreparedStatements,

so when

the same SQL statement is executed repeatedly, related

PreparedStatement

is re-used, which enhances performance. This convenient

enhancement has

a side effect: Cursor that was used to perform many different

SQL statements

may hold very large cache of PerapedStatements. To clear the

cache, you'll

need to call :meth:`clear_cache`.

.. tip::

Cursor supports the iterator protocol, yielding tuples of values

like

:meth:`fetchone`.

"""

#: (Read/Write) As required by the Python DB API 2.0 spec, the

value of this

#: attribute is observed with respect to the :meth:`fetchmany`

method. However,

#: changing the value of this attribute does not make any

difference in fetch

#: efficiency because the database engine only supports fetching a

single row

#: at a time.

arraysize = 1

def __init__(self, connection, transaction):

"""

.. important::

The association between a Cursor and its

:class:`Transaction` and

:class:`Connection` is set when the Cursor is created, and

cannot be

changed during the lifetime of that Cursor.

:param connection: :class:`Connection` instance this cursor

should be bound to.

:param transaction: :class:`Transaction` instance this cursor

should be bound to.

"""

self._prepared_statements = {}

self._connection = connection

self._transaction = transaction

self._ps = None # current prepared statement

Possibly this might be helpful (from the FDB documentation):

Distributed transactions

Support for Distributed Transactions works in slightly differently than

in KDB. FDB uses ConnectionGroup class like KDB with the same interface,

but DT is not bound to main transaction of individual connections

managed by group. That means that Cursor instances obtained from

Connection don’t work in DT if connection is part of ConnectionGroup,

but work normally in connection context. To get Cursor for specific

connection that works in DT, use fdb.ConnectionGroup.cursor() method and

pass the connection as parameter. We believe that this arrangement is

more logical and flexible than KDB’s way.

Transaction context for cursor objects depends on how cursor is

obtained/created:

fdb.Connection.cursor() - Works in context of “main” transaction

for connection.

fdb.Transaction.cursor() - Works in context of this transaction.

fdb.ConnectionGroup.cursor() - Works in context of Distributed

Transaction

Thank you,

Sibylle

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/51A723E3.3040002@t-online.de

©2013 Sibylle Koczian