From sable at users.sourceforge.net Fri Feb 2 17:47:36 2007 From: sable at users.sourceforge.net (=?ISO-8859-1?Q?S=E9bastien_Sabl=E9?=) Date: Fri, 02 Feb 2007 17:47:36 +0100 Subject: [DB-SIG] Sybase module 0.38pre2 released Message-ID: <45C36B28.1020608@users.sourceforge.net> WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. The module is available here: http://downloads.sourceforge.net/python-sybase/python-sybase-0.38pre2.tar.gz The module home page is here: http://python-sybase.sourceforge.net/ CHANGES SINCE 0.38pre1: * Add structured error information to Sybase.DatabaseError thanks to patch provided by Gregory Bond (close tracker 1631902) * Resurrected Sybase.Bulkcopy functionality thanks to patch provided by Gregory Bond (close tracker 1632916) * Corrected AttributeError when locking is off (close tracker 1637942 reported by Jim Nusbaum) * Corrected incorrect type mx.DateTime.DateTime returned by Sybase.Date() in "mx" datetime mode. This type is not supported by DataBuf. * Corrected crash on a BLK object when debug is enabled (close tracker 1630941 reported by Gregory Bond) * rowcount is now propagated to Cursor (corrects tracker 1621003) * Added support for python datetime type in DataBuf and as parameter of Cursor.execute() * Corrected Date, Time and Timestamp functions when using mx.DateTime or native python datetime types * Corrected DATETIME as cursor.description still returns native Sybase datetime types * Corrected blk_describe always returns (status, None) thanks to patch by Phil Porter * Patch to handle CS_LONG type based on patch by Paul Rensing MAJOR CHANGES SINCE 0.37: * This release works with python 2.5 * It also works with sybase 15 * It works with 64bits clients * It can be configured to return native python datetime objects * The bug "This routine cannot be called because another command structure has results pending." which appears in various cases has been corrected * It includes a unitary test suite based on the dbapi2.0 compliance test suite From haraldarminmassa at gmail.com Wed Feb 7 19:19:32 2007 From: haraldarminmassa at gmail.com (Harald Armin Massa) Date: Wed, 7 Feb 2007 19:19:32 +0100 Subject: [DB-SIG] cx_Oracle: getting names of present TNS entries Message-ID: <7be3f35d0702071019q801fa63i6491b2382e2e771e@mail.gmail.com> Hello, is there a fine method to query the defined TNS-names on a computer? with "fine" I am asking for something higherlevel then "find tnsnames.ora, parse it" Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Reinsburgstra?e 202b 70197 Stuttgart 0173/9409607 fx 01212-5-13695179 - Python: the only language with more web frameworks than keywords. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/db-sig/attachments/20070207/fe6eda00/attachment.htm From phd at phd.pp.ru Thu Feb 8 17:05:32 2007 From: phd at phd.pp.ru (Oleg Broytmann) Date: Thu, 8 Feb 2007 19:05:32 +0300 Subject: [DB-SIG] SQLObject 0.8.0b3 Message-ID: <20070208160532.GB24594@phd.pp.ru> Hello! I'm pleased to announce the 0.8.0b3 release of SQLObject. What is SQLObject ================= SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started with. SQLObject supports a number of backends: MySQL, PostgreSQL, SQLite, and Firebird. It also has newly added support for Sybase, MSSQL and MaxDB (also known as SAPDB). Where is SQLObject ================== Site: http://sqlobject.org Development: http://sqlobject.org/devel/ Mailing list: https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss Archives: http://news.gmane.org/gmane.comp.python.sqlobject Download: http://cheeseshop.python.org/pypi/SQLObject/0.8.0b3 News and changes: http://sqlobject.org/devel/News.html What's New ========== News since 0.8.0b2 ------------------ * Separate "docs" subdirectory instead of the shared external one. For a more complete list, please see the news: http://sqlobject.org/devel/News.html Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru Programmers don't die, they just GOSUB without RETURN. From root at cargoa2b.com Thu Feb 8 19:39:49 2007 From: root at cargoa2b.com (Tommy) Date: Thu, 8 Feb 2007 18:39:49 +0000 (UTC) Subject: [DB-SIG] MySQLdb execute hangs on INSERT Message-ID: Hello! I have a question that maybe someone can answer me... When I do like this """ db = MySQLdb.connect( host = "localhost", user = "root", passwd = "****" ) cur = db.cursor() cur.execute( "INSERT INTO `mytest`.`clients` ( `SessionID`,`InitialLogin`,`LastActivity` ) VALUES ( %s, %s, %s )", ( sessID, timed, timed ) ) """ the script hangs.. while doing the exact same within IDLE it just runs and inserts the row as expected even within a function or class MySQL 5.0.27 Python 2.4 MySQL-python.exe-1.2.1_p2.win32-py2.4 WindowsXP SP2 By the way, using _mysql within the script and the same statement works fine Hope to get som answers, Have a nice day. Tommy From andy47 at halfcooked.com Sat Feb 10 08:55:59 2007 From: andy47 at halfcooked.com (Andy Todd) Date: Sat, 10 Feb 2007 18:55:59 +1100 Subject: [DB-SIG] cx_Oracle: getting names of present TNS entries In-Reply-To: <7be3f35d0702071019q801fa63i6491b2382e2e771e@mail.gmail.com> References: <7be3f35d0702071019q801fa63i6491b2382e2e771e@mail.gmail.com> Message-ID: <45CD7A8F.8080200@halfcooked.com> Harald Armin Massa wrote: > Hello, > > is there a fine method to query the defined TNS-names on a computer? > > with "fine" I am asking for something higherlevel then "find > tnsnames.ora, parse it" > > Harald > > > -- > GHUM Harald Massa > persuadere et programmare > Harald Armin Massa > Reinsburgstra?e 202b > 70197 Stuttgart > 0173/9409607 > fx 01212-5-13695179 > - > Python: the only language with more web frameworks than keywords. > Not to my knowledge no. As far as I'm aware both SQL Developer and TOAD do exactly that. Of course it gets trickier if you've got multiple Oracle homes and therefore more than one tnsnames.ora file. It also depends on what you are trying to find out. Don't forget that tnsnames.ora entries are essentially just aliases and any given tnsnames.ora file can contain multiple entries pointing to the same physical database. Also that it is possible to have a 'name' in your tnsnames.ora file that is completely different to the one the database knows itself as. If you are trying to find out 'which aliases does this computer know about that I can connect to' then you can just parse the file. If it's 'what databases can I get to' then you need to parse the file and then verify which database each entry is connecting to (either through the details of the entry in the file or actually connecting and interrogating something like V$DATABASE). HTH, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ From haraldarminmassa at gmail.com Sun Feb 11 11:37:57 2007 From: haraldarminmassa at gmail.com (Harald Armin Massa) Date: Sun, 11 Feb 2007 11:37:57 +0100 Subject: [DB-SIG] cx_Oracle: getting names of present TNS entries In-Reply-To: <45CD7A8F.8080200@halfcooked.com> References: <7be3f35d0702071019q801fa63i6491b2382e2e771e@mail.gmail.com> <45CD7A8F.8080200@halfcooked.com> Message-ID: <7be3f35d0702110237l55ece994r49c9ebf37d96bae8@mail.gmail.com> Andy, Anthony, thank you very much for your information. > > > Not to my knowledge no. As far as I'm aware both SQL Developer and TOAD > do exactly that. > > Of course it gets trickier if you've got multiple Oracle homes and > therefore more than one tnsnames.ora file. That was what I had in mind --- TOAD displays the Oraclehomes, and partially also the TNS-names. I was really hoping there is a way to detect that; building a setup helper for an application. So, thanks for sparing me the futil search ! Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Reinsburgstra?e 202b 70197 Stuttgart 0173/9409607 fx 01212-5-13695179 - Python: the only language with more web frameworks than keywords. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/db-sig/attachments/20070211/d073ac25/attachment.htm From phd at phd.pp.ru Mon Feb 12 18:09:46 2007 From: phd at phd.pp.ru (Oleg Broytmann) Date: Mon, 12 Feb 2007 20:09:46 +0300 Subject: [DB-SIG] SQLObject 0.8.0 Message-ID: <20070212170946.GC31186@phd.pp.ru> Hello! I'm pleased to announce the 0.8.0 release of SQLObject. What is SQLObject ================= SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started with. SQLObject supports a number of backends: MySQL, PostgreSQL, SQLite, and Firebird. It also has newly added support for Sybase, MSSQL and MaxDB (also known as SAPDB). Where is SQLObject ================== Site: http://sqlobject.org Development: http://sqlobject.org/devel/ Mailing list: https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss Archives: http://news.gmane.org/gmane.comp.python.sqlobject Download: http://cheeseshop.python.org/pypi/SQLObject/0.8.0 News and changes: http://sqlobject.org/News.html What's New ========== News since 0.7 -------------- Features & Interface -------------------- * It is now possible to create tables that reference each other. Constraints (in the DBMSes that support constraints) are added after the tables have been created. * Added ``createSQL`` as an option for sqlmeta. Here you can add related SQL you want executed by sqlobject-admin create after table creation. createSQL expects a string, list, or dictionary. If using a dictionary the key should be a dbName value (ex. 'postgres') and the value should be a string or list. Examples in sqlobject/tests/test_sqlobject_admin.py or at * Added method ``sqlhub.doInTransaction(callable, *args, **kwargs)``, to be used like:: sqlhub.doInTransaction(process_request, os.environ) This will run ``process_request(os.environ)``. The return value will be preserved. * Added method ``.getOne([default])`` to ``SelectResults`` (these are the objects returned by ``.select()`` and ``.selectBy()``). This returns a single object, when the query is expected to return only one object. The single argument is the value to return when zero results are found (more than one result is always an error). If no default is given, it is an error if no such object exists. * Added a WSGI middleware (in ``sqlobject.wsgi_middleware``) for configuring the database for the request. Also handles transactions. Available as ``egg:SQLObject`` in Paste Deploy configuration files. * New joins! ManyToMany and OneToMany; not fully documented yet, but still more sensible and smarter. * SELECT FOR UPDATE * New module dberrors.py - a hierarchy of exceptions. Translation of DB API module's exceptions to the new hierarchy is performed for SQLite and MySQL. * SQLiteConnection got a new keyword "factory" - a name or a reference to a factory function that returns a connection class; useful for implementing functions or aggregates. See test_select.py and test_sqlite_factory.py for examples. * SQLObject now disallows columns with names that collide with existing variables and methods, such as "_init", "expire", "set" and so on. Small Features -------------- * Configurable client character set (encoding) for MySQL. * Added a close option to .commit(), so you can close the transaction as you commit it. * DecimalValidator. * Added .expireAll() methods to sqlmeta and connection objects, to expire all instances in those cases. * String IDs. * FOREIGN KEY for MySQL. * Support for sqlite3 (a builtin module in Python 2.5). * SelectResults cannot be queried for truth value; in any case it was meaningless - the result was always True; now __nonzero__() raises NotImplementedError in case one tries bool(MyTable.select()) or "if MyTable.select():..." * With empty parameters AND() and OR() returns None. * Allows to use set/frozenset sets/Set/ImmutableSet sets as sequences passed to the IN operator. * ID columns are now INT UNSIGNED for MySQL. Bug Fixes --------- * Fixed problem with sqlite and threads; connections are no longer shared between threads for sqlite (except for :memory:). * The reference loop between SQLObject and SQLObjectState eliminated using weak references. * Another round of bugfixes for MySQL errors 2006 and 2013 (SERVER_GONE, SERVER_LOST). * Fixed a bug in MSSQLConnection caused by column names being unicode. * Fixed a bug in FirebirdConnection caused by column names having trailing spaces. * Order by several columns with inheritance. * Fixed aggregators and accumulators with inheritance. For a more complete list, please see the news: http://sqlobject.org/News.html Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru Programmers don't die, they just GOSUB without RETURN.