From vernondcole at gmail.com Fri May 2 02:48:34 2014 From: vernondcole at gmail.com (Vernon D. Cole) Date: Thu, 1 May 2014 18:48:34 -0600 Subject: [DB-SIG] Announcing adodbapi version 2.6 Message-ID: For more information, see http://adodbapi.sourceforge.net Tests were run against various combinations of: [Python2.5, Python2.7, Python3.3, Python3.4, IronPython2.7] [32-bit, 64-bit] [local, remote] [Access database, SQL Server, PostgreSQL, MySQL] This release adds prepared query support using the api we have discussed recently on this forum: >>> crsr = conn.cursor() >>> crsr.prepare('select * from sometable where whatever = ?') >>> crsr.execute(crsr.command, [param]) I have also done more experimentation and enhancement with the user-definable paramstyle. This version adds support for setting the paramstyle to 'pyformat', which is implemented as a synonym of 'format'. The 'format' SQL-mangling subroutine now uses introspection to determine whether to use %(keyword)s or %s positional parameters. I believe that several of the popular api implementations work that way. I also wanted to try a similar feature between 'qmark' and 'named', but without having to use introspection. Here is how the code turned out: def _reformat_operation(self, operation, parameters): > ..if self.paramstyle in ('format', 'pyformat'): # convert %s to ? > ....operation, self._parameter_names = api.changeFormatToQmark(operation) > ..elif self.paramstyle == 'named' or (self.paramstyle == 'dynamic' and > isinstance(parameters, Mapping)): > ....operation, self._parameter_names = api.changeNamedToQmark(operation) # > convert :name to ? > ..return operation > I also had to import 'Mapping' and add 'dynamic' to the list of accepted paramstyles, so the entire feature changed or added three lines of Python. [Restriction: There is a bug in pywin32 version 218 for Python3.4 which causes a unittest failure. The fix should be released in a few days.] -------------- next part -------------- An HTML attachment was scrubbed... URL: From phd at phdru.name Thu May 15 17:57:36 2014 From: phd at phdru.name (Oleg Broytman) Date: Thu, 15 May 2014 17:57:36 +0200 Subject: [DB-SIG] SQLObject 1.6.0 Message-ID: <20140515155736.GA30962@phdru.name> Hello! I'm pleased to announce version 1.6.0, the first stable release of branch 1.6 of SQLObject. What's new in SQLObject ======================= Features & Interface -------------------- * Python 2.4 is no longer supported. The minimal supported version is Python 2.5. * Support for Python 2.5 is declared obsolete and will be removed in the next release. * Upgrade ez_setup to 1.4.2. * Adapt duplicate error message strings for SQLite 3.8. Contributor for this release is Neil Muller. For a more complete list, please see the news: http://sqlobject.org/News.html 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, Firebird, 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: https://pypi.python.org/pypi/SQLObject/1.6.0 News and changes: http://sqlobject.org/News.html Oleg. -- Oleg Broytman http://phdru.name/ phd at phdru.name Programmers don't die, they just GOSUB without RETURN. From info at egenix.com Wed May 28 10:14:27 2014 From: info at egenix.com (eGenix Team: M.-A. Lemburg) Date: Wed, 28 May 2014 10:14:27 +0200 Subject: [DB-SIG] ANN: eGenix mxODBC Connect 2.1.0 - Python ODBC Database Interface Message-ID: <53859AE3.6000307@egenix.com> ________________________________________________________________________ ANNOUNCING eGenix.com mxODBC Connect Python ODBC Database Interface Version 2.1.0 mxODBC Connect is our commercially supported client-server product for connecting Python applications to relational databases in a truly platform independent way. This announcement is also available on our web-site for online reading: http://www.egenix.com/company/news/eGenix-mxODBC-Connect-2.1.0-GA.html ________________________________________________________________________ INTRODUCTION The mxODBC Connect Database Interface for Python allows users to easily connect Python applications to all major databases on the market today in a highly portable, convenient and secure way. Python Database Connectivity the Easy Way ----------------------------------------- Unlike our mxODBC Python extension, mxODBC Connect is designed as client-server application, so you no longer need to find production quality ODBC drivers for all the platforms you target with your Python application. Instead you use an easy to install royalty-free Python client library which connects directly to the mxODBC Connect database server over the network. This makes mxODBC Connect a great basis for writing cross-platform multi-tier database applications and utilities in Python, especially if you run applications that need to communicate with databases such as MS SQL Server and MS Access, Oracle Database, IBM DB2 and Informix, Sybase ASE and Sybase Anywhere, MySQL, PostgreSQL, SAP MaxDB and many more, that run on Windows or Linux machines. Ideal for Database Driven Client Applications --------------------------------------------- By removing the need to install and configure ODBC drivers on the client side and dealing with complicated network setups for each set of drivers, mxODBC Connect greatly simplifies deployment of database driven client applications, while at the same time making the network communication between client and database server more efficient and more secure. For more information, please have a look at the mxODBC Connect product page, in particular, the full list of available features. For more information, please see the product page: http://www.egenix.com/products/python/mxODBCConnect/ ________________________________________________________________________ NEWS mxODBC Connect 2.1.0 is a new minor release of our successful mxODBC Connect product. These are the changes compared to mxODBC Connect 2.0.5. Update to the mxODBC 3.3 API ---------------------------- mxODBC Connect 2.1 upgrades the mxODBC Connect Client to the new mxODBC 3.3. APIs and enhancements. Stored Procedures * mxODBC Connect now has full support for input, output and input/output parameters in stored procedures and stored functions, allowing easy integration with existing databases systems. User Customizable Row Objects * Added support for user customizable row objects by adding cursor/connection .rowfactory and .row constructor attributes. When set, these are used to wrap the normal row tuples returned by the .fetch*() methods into dynamically created row objects. * Added new RowFactory classes to support cursor.rowfactory and cursor.row. These allow dynamically creating row classes that provide sequence as well as mapping and attribute access to row fields - similar to what namedtuples implements, but more efficient and specific to result sets. Fast Cursor Types * Switched to forward-only cursor types for all database backends, since this provides a much better performance for MS SQL Server and IBM DB2 drivers. * Added a new .cursortype attribute to allow adjusting and inspecting the ODBC cursor type to be used for an mxODBC Connect cursor object. Default is to use forward-only cursors, but mxODBC also support several other useful cursor types such as static cursors with full support for result set scrolling. More new Features * Enhanced cursor.prepare() to allow querying cursor.description right after the prepare step and not only after calling a cursor.execute*() method. * Added iterator/generator support to .executemany(). The parameters list can now be an iterator/generator, if needed. * Added new connection.dbapi property to easily access module level symbols from the connection object. * Timestamp seconds fraction resolution is now determined from the scale of a datetime/timestamp SQL column, using the connection.timestampresolution as lower bound, when using SQL type binding. In Python type binding mode, the connection.timestampresolution determines the scale with which a variable is bound. This allows for greater flexibility when dealing with database backends that don't provide full nano-second second resolution, such as e.g. MS SQL Server. * mxODBC Connect accepts Unicode string values for date/time/datetime/timestamp column types in SQL type binding mode. Previous versions already did in Python type binding mode. * mxODBC Connect uses unicode(obj, encoding) semantics when binding Python objects to SQLWCHAR Unicode database parameters to provide better compatibility with Python objects. Additionally, it ignores the encoding in case obj is a number, to avoid conversion errors. * Added new cursor.encoding attribute. This gets its default values from the connection the cursor was created on and allows for per-cursor encoding settings. * Added cursor.bindmethod which inherits from connection.bindmethod when creating the cursor. This allows adjusting the variable bind method on a per-cursor basis, rather than only on a per connection basis as in previous mxODBC Connect versions. mxODBC Connect API Enhancements ------------------------------- * The SQL lookup object is cached on the client side to avoid frequent roundtrips when using symbols which are needed for stored procedures with input/output parameters. * The SQL lookup object received support for new ODBC 3.8 symbols and values, including driver specific symbols used by the MS SQL Server Native Client and IBM DB2 ODBC drivers. * Improved the server side object management to simplify client side garbage collection considerations. Even though we still encourage using explicit garbage collection of cursors, connections and server sessions on the client side, mxODBC Connect Server will now handle most situations even without these explicit calls. Asynchronous Processing ----------------------- * Tested with the latest gevent and greenlet packages. mxODBC Connect Client will happily work together with the asynchronous libraries gevent. All it takes is a single configuration entry in the client side config file. Security Enhancements --------------------- * Changed the way passwords are stored in the server's authorized-users.txt file in order to make password storage more secure. * User authentication now uses salted SHA-256 password hashes when transferring the login data from the client to the server. This provides better protection when using plain text client server setups and additional security over SSL network connections. ODBC Driver/Manager Compatibility Enhancements ---------------------------------------------- unixODBC * mxODBC Connect Server is now built against unixODBC 2.3.2 on Linux. DataDirect * Updated the DataDirect binding to version 7.1.2 of the DataDirect ODBC manager on Linux. Oracle * Added work-around for Oracle Instant Client to be able to use integer output parameters. * Added a work-around for Oracle Instant Client to have it return output parameters based on the input placeholder Python parameter types. It would otherwise return all parameters as strings. Disabled a test for Oracle Instant Client which tries to set a pre-connect connection option for timeouts, since the ODBC driver segfaults with this option. MS SQL Server * mxODBC Connect Server 2.1 defaults to 100ns connection.timestampresolution for MS SQL Server 2008 and later, and 1ms resolution for MS SQL server 2005 and earlier. This simplifies interfacing to SQL Server timestamp columns by preventing occasional precision errors. * Tested mxODBC Connect Server successfully with new MS SQL Server Native Client 11 for Linux. Unicode connection strings still don't work, but everything else does. * Added documentation on how to use Kerberos with mxODBC and SQL Server for authentication on both Windows and Linux to the mxODBC User Manual. * Added note about problems of the FreeTDS ODBC driver dealing with TIME and DATE columns. Sybase ASE * Added work-around for the Sybase ASE ODBC driver, which doesn't always pass back NULL correctly to mxODBC Connect Server on 64-bit Unix systems. * Changed the variable type binding mode default for the Sybase ASE ODBC driver from Python type binding to SQL type binding, which resolves issues with e.g. the Unicode support for that driver. * Added note about a segfault problem with the Sybase ASE 15.7 ODBC driver which is caused by the driver corrupting the heap. IBM DB2 * Added work-around for the IBM DB2 ODBC driver, which doesn't always pass back NULL correctly to mxODBC Connect Server on 64-bit Unix systems. PostgreSQL * Added work-around to force Python type binding for the PostgreSQL ODBC drivers. More recent versions of the driver report supporting SQL type binding, but they don't implement it. * Added work-around to have PostgreSQL ODBC drivers properly work with binary data for BYTEA columns. MySQL * mxODBC Connect Server now supports native Unicode with the recent MySQL ODBC drivers - provided you use the Unicode variants of the drivers. * Changed the default binding mode for MySQL ODBC drivers to Python type binding. This works around a problem with date/time values when talking to MySQL 5.6 servers. For the full set of changes, including those of the 2.0 series of mxODBC Connect, please check the mxODBC Connect change log. http://www.egenix.com/products/python/mxODBCConnect/changelog.html ________________________________________________________________________ UPGRADING You are encouraged to upgrade to this latest mxODBC Connect release. When upgrading, please always upgrade both the server and the client installations to the same version - even for patch level releases. We will give out 20% discount coupons for upgrade purchases going from mxODBC Connect Server 1.x to 2.1 and 50% coupons for upgrades from mxODBC 2.x to 2.1. Please contact the eGenix.com Sales Team (sales at egenix.com) with your existing license serials for details. Users of our stand-alone mxODBC product will have to purchase new licenses from our online shop in order to use mxODBC Connect. You can request free 30-day evaluation licenses by visiting our web-site or writing to sales at egenix.com, stating your name (or the name of the company) and the number of eval licenses that you need. http://www.egenix.com/products/python/mxODBCConnect/#Evaluation ________________________________________________________________________ DOWNLOADS The download archives as well as instructions for installation and configuration of the product can be found on the product page: http://www.egenix.com/products/python/mxODBCConnect/ If you want to try the package, jump straight to the download instructions: https://cms.egenix.com/products/python/mxODBCConnect/#Download Fully functional evaluation licenses for the mxODBC Connect Server are available free of charge: http://www.egenix.com/products/python/mxODBCConnect/#Evaluation mxODBC Connect Client is always free of charge. _______________________________________________________________________ SUPPORT Commercial support for this product is available from eGenix.com. Please see http://www.egenix.com/services/support/ for details about our support offerings. _______________________________________________________________________ INFORMATION About Python (http://www.python.org/): Python is an object-oriented Open Source programming language which runs on all modern platforms. By integrating ease-of-use, clarity in coding, enterprise application connectivity and rapid application design, Python establishes an ideal programming platform for today's IT challenges. About eGenix (http://www.egenix.com/): eGenix is a software project, consulting and product company focusing on expert project services and professional quality products for companies, Python users and developers. Enjoy, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 28 2014) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/