Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > f8b7d8f355d7618a0725431daef6c72f > files > 93

kinterbasdb-3.3.0-0.mga1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>KInterbasDB Changelog &mdash; KInterbasDB v3.3.0 documentation</title>
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '3.3.0',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="top" title="KInterbasDB v3.3.0 documentation" href="index.html" />
    <link rel="next" title="KInterbasDB LICENSE" href="license.html" />
    <link rel="prev" title="KInterbasDB Links" href="links.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="license.html" title="KInterbasDB LICENSE"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="links.html" title="KInterbasDB Links"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">KInterbasDB v3.3.0 documentation</a> &raquo;</li> 
      </ul>
    </div>  
    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  
  <div class="section" id="kinterbasdb-changelog">
<h1>KInterbasDB Changelog<a class="headerlink" href="#kinterbasdb-changelog" title="Permalink to this headline">¶</a></h1>
<div class="section" id="version-3-3">
<h2>Version 3.3<a class="headerlink" href="#version-3-3" title="Permalink to this headline">¶</a></h2>
<div class="section" id="new-features">
<h3>New Features<a class="headerlink" href="#new-features" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">It is now possible to use multiple transactions simultaneously on a
single kinterbasdb.Connection.
See discussion:
<a class="reference external" href="http://sourceforge.net/forum/forum.php?thread_id=1597658&amp;forum_id=30917">http://sourceforge.net/forum/forum.php?thread_id=1597658&amp;forum_id=30917</a></p>
</li>
<li><p class="first">If a unicode object is passed as the SQL statement to any of</p>
<blockquote>
<ul class="simple">
<li>kinterbasdb.create_database</li>
<li>Connection.execute_immediate</li>
<li>Cursor.prep</li>
<li>Cursor.execute</li>
</ul>
</blockquote>
<p>KInterbasDB will attempt to encode it to the character set of file system
(in the case of kinterbasdb.create_database), or to the character set of
the connection, in the other cases.  Previously, only unicode objects
that could be encoded to ASCII were accepted.</p>
</li>
<li><p class="first">Documentation was extended and completely redone using reStructured text
and Sphinx (<a class="reference external" href="http://sphinx.pocoo.org">http://sphinx.pocoo.org</a>)</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="backward-incompatibilities">
<h3>Backward-incompatibilities<a class="headerlink" href="#backward-incompatibilities" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Default type conversion setting was changed to <cite>type_conv=200</cite>. Applications
that doesn&#8217;t call <a title="kinterbasdb.init" class="reference external" href="beyond-python-db-api.html#kinterbasdb.init"><tt class="xref docutils literal"><span class="pre">kinterbasdb.init()</span></tt></a> and rely on Python older than 2.4
and/or mx.DateTime and/or explicit unicode conversion must call
<a title="kinterbasdb.init" class="reference external" href="beyond-python-db-api.html#kinterbasdb.init"><tt class="xref docutils literal"><span class="pre">kinterbasdb.init()</span></tt></a> with <cite>type_conv=1</cite> as first thing after <cite>kinterbasdb</cite>
import. Applications that explicitly call <a title="kinterbasdb.init" class="reference external" href="beyond-python-db-api.html#kinterbasdb.init"><tt class="xref docutils literal"><span class="pre">kinterbasdb.init()</span></tt></a> doesn&#8217;t need
to be changed at all.</p>
<p>Details about new default setting are described in <cite>Parameter Conversion</cite> section
<cite>Deferred Loading of Dynamic Type Translators</cite> of KInterbasDB documentation.</p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-2-2">
<h2>Version 3.2.2<a class="headerlink" href="#version-3-2-2" title="Permalink to this headline">¶</a></h2>
<div class="section" id="bug-fixes">
<h3>Bug Fixes<a class="headerlink" href="#bug-fixes" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>Fixed bug with wrong Transaction Parameter Block structure. It surfaces with
Firebird 2.1 that&#8217;s more strict about TPB correctness.</li>
<li>Fixed bug with Services under Firebird 2.1.</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-2-1">
<h2>Version 3.2.1<a class="headerlink" href="#version-3-2-1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id1">
<h3>Bug Fixes<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Inadequate compatibility with Interbase 7&#8217;s boolean data type.
All official Win32 binaries are compiled and linked against Firebird, not
Interbase.  Typically, Interbase users either compile their own
KInterbasDB binaries or use the official Firebird 1.0-oriented binaries.
Previously, the latter were not fully compatible with Interbase 7&#8217;s
boolean type.</p>
<p><cite>Thanks to rmacdurmon for reporting this problem.</cite></p>
</li>
<li><p class="first">Conditionalized C reference to some constants not included in the
Interbase C API.</p>
<p>SF bug 1631461:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1631461&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1631461&amp;group_id=9913&amp;atid=109913</a></p>
</li>
<li><p class="first">The &#8220;Signature Specifications for Input and Output Translators&#8221; section
of the Usage Guide specified the Dynamic Type Translator signature of the
TIMESTAMP type incorrectly.</p>
<p>SF bug 1554643:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1554643&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1554643&amp;group_id=9913&amp;atid=109913</a></p>
</li>
<li><p class="first">Removed unnecessary reference to &lt;semaphore.h&gt; that prevented KInterbasDB
from compiling on some primitive Unixy operating systems.</p>
</li>
<li><p class="first">An assertion was triggered when BLOB DTT {&#8216;mode&#8217;: &#8216;materialized&#8217;} was set
explicitly.  This did not actually affect 3.2.0-final binaries, since
they were delivered with assertions off, but it is now fixed.</p>
<p>SF bug 1652413:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1652413&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1652413&amp;group_id=9913&amp;atid=109913</a></p>
</li>
<li><p class="first">KInterbasDB had various problems when any of the following were installed
at a path that contained non-ASCII characters:</p>
<blockquote>
<ul class="simple">
<li>Python</li>
<li>KInterbasDB</li>
<li>Firebird</li>
</ul>
</blockquote>
<p>It now works properly.
See discussion:
<a class="reference external" href="http://sourceforge.net/forum/forum.php?thread_id=1695175&amp;forum_id=30917">http://sourceforge.net/forum/forum.php?thread_id=1695175&amp;forum_id=30917</a></p>
<ul class="simple">
<li>As a side effect of that change, SF bug 1676482 was fixed:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1676482&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1676482&amp;group_id=9913&amp;atid=109913</a></li>
</ul>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-2">
<h2>Version 3.2<a class="headerlink" href="#version-3-2" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id2">
<h3>Bug Fixes<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">At concurrency_level 1, it was possible for a deadlock to occur if
KInterbasDB simultaneously raised an exception in one thread while
executing a SQL statement in another.  This problem did not affect
concurrency_level 2.</p>
<p><cite>Thanks to Atsuo Ishimoto for reporting this bug.</cite></p>
</li>
<li><p class="first">The official implementation of the automagic TEXT_UNICODE type translator
(in the kinterbasdb.typeconv_text_unicode module) was missing support for
the new character sets introduced in Firebird 2.0 (namely, the corrected
version of UTF8, plus KOI8-R, KOI8-U, and WIN1258).</p>
<p><cite>Thanks to Oleg Deribas for bringing this to my attention.</cite></p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-2rc1">
<h2>Version 3.2rc1<a class="headerlink" href="#version-3-2rc1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id3">
<h3>Bug Fixes<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">KInterbasDB&#8217;s &#8220;Implicit Conversion of Input Parameters from Strings&#8221; now
accepts not only str objects, but also unicode objects, as long as
they&#8217;re convertible to ASCII.</p>
<p><cite>Thanks to Ronald Lew for reporting this bug.</cite></p>
<p>For general info about the &#8220;Implicit Conversion of Input Parameters
from Strings&#8221; feature, see:
<a class="reference external" href="http://kinterbasdb.sf.net/dist_docs/usage.html#adv_param_conv_implicit_from_string">http://kinterbasdb.sf.net/dist_docs/usage.html#adv_param_conv_implicit_from_string</a></p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id4">
<h3>New Features<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">KInterbasDB now stores and retrieves the undocumented sub-second
component of TIME and TIMESTAMP fields.</p>
<p><cite>Thanks to Petr Jakes and Helen Borrie for bringing the availability of
the sub-second data to my attention.</cite></p>
</li>
<li><p class="first">Passing None to Cursor.execute (instead of a SQL string or a
PreparedStatement) now executes the most recently prepared/executed
statement, if any.  This can enhance convenience because it frees the
client programmer from the responsibility of separately tracking the most
recent statement in order to execute it again.</p>
<p><cite>Thanks to Igor Youdytsky for suggesting this feature.</cite></p>
</li>
<li><p class="first">PreparedStatements now have a read-only &#8216;description&#8217; property that
contains a Python DB API 2.0 description sequence of the same format as
Cursor.description.</p>
<p><cite>Thanks to Alexandr Zamaraev for suggesting this feature.</cite>
For more info, see:
<a class="reference external" href="http://kinterbasdb.sf.net/dist_docs/usage.html#PreparedStatement_description">http://kinterbasdb.sf.net/dist_docs/usage.html#PreparedStatement_description</a></p>
</li>
<li><p class="first">The following query and resolution methods for limbo transactions have
been added to the kinterbasdb.services.Connection class:
getLimboTransactionIDs, commitLimboTransaction, rollbackLimboTransaction.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id5">
<h3>Backward-incompatibilities<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>Dynamic Type Translators for TIME and TIMESTAMP fields must now
accomodate an additional tuple element:  an integer which represents
microseconds.  The official TIME and TIMESTAMP type translators in
typeconv_datetime_naked.py, typeconv_datetime_stdlib.py, and
typeconv_datetime_mx.py have been updated, and can be used as a guide.</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-2b1">
<h2>Version 3.2b1<a class="headerlink" href="#version-3-2b1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id6">
<h3>Bug Fixes<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>Previously, if KInterbasDB detected that the field to which a NULL value
was bound was defined as NOT NULL, KInterbasDB itself immediately raised
an exception.  This caused problems for fields defined as NOT NULL but
populated by BEFORE triggers, so KInterbasDB now submits the illegal NULL
and allows the database engine to make the decision.</li>
<li>Fixed an obscure memory leak in Connection.drop_database.</li>
<li>Fixed a few more compatibility problems with Interbase 7.x.</li>
<li>kinterbasdb.Cursor can again be used as a base class for user-defined
subclasses.  This capability had been removed in KInterbasDB 3.2a1.</li>
</ul>
</blockquote>
</div>
<div class="section" id="id7">
<h3>New Features<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Connection timeouts:  KInterbasDB connections can now be asked to time
out after a specified period of inactivity.  This feature is not
supported by the Firebird C API, so it is implemented entirely at the
KInterbasDB level.
For more info, see:
<a class="reference external" href="http://kinterbasdb.sf.net/dist_docs/usage.html#adv_ct">http://kinterbasdb.sf.net/dist_docs/usage.html#adv_ct</a></p>
</li>
<li><p class="first">Added a TPB class to assist with the construction of complex Transaction
Parameter Buffers.</p>
<p>This feature has not yet been documented.  In the meantime, you can
find example code in the test_transactions.py module of the KInterbasDB
test suite:
<a class="reference external" href="http://kinterbasdb.sf.net/test-suite/releases/">http://kinterbasdb.sf.net/test-suite/releases/</a></p>
</li>
<li><p class="first">Added methods Connection.transaction_info and Connection.trans_info.
transaction_info is a thin wrapper around the C function
isc_transaction_info, while trans_info is a Pythonic wrapper around
transaction_info.</p>
<p>This feature has not yet been documented.  In the meantime, you can
find example code in the test_services.py module of the KInterbasDB test
suite:
<a class="reference external" href="http://kinterbasdb.sf.net/test-suite/releases/">http://kinterbasdb.sf.net/test-suite/releases/</a></p>
</li>
<li><p class="first">Exposed the Firebird header constant FB_API_VER as
kinterbasdb.FB_API_VER.  This integer represents the version of Firebird
against which KInterbasDB was compiled, as follows:</p>
<blockquote>
<ul class="simple">
<li>Any version of Interbase, or Firebird 1.0.x:      10</li>
<li>Firebird 1.5.x:                                   15</li>
<li>Firebird 2.0.x:                                   20</li>
</ul>
</blockquote>
</li>
<li><p class="first">KInterbasDB now raises a kinterbasdb.TransactionConflict exception
(instead of the rather generic ProgrammingError) when it receives a
server-side transaction conflict notification.  This makes it easier for
the client programmer to detect and resolve deadlocks.</p>
<p>TransactionConflict is a subclass of kinterbasdb.OperationalError.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id8">
<h3>Backward-incompatibilities<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Client programs that encounter transaction conflicts in routine
operation, <em>and</em> which contain logic to deal with this type of exception
specifically (on the basis of the payload of the ProgrammingError) should
be updated to use:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">try</span><span class="p">:</span>
  <span class="o">...</span>
<span class="k">except</span> <span class="n">kinterbasdb</span><span class="o">.</span><span class="n">TransactionConflict</span><span class="p">:</span>
  <span class="o">...</span>
</pre></div>
</div>
<p>instead.</p>
<p>For more info, see the last item under &#8220;New Features&#8221; above.</p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-2a1">
<h2>Version 3.2a1<a class="headerlink" href="#version-3-2a1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id9">
<h3>New Features<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>Better concurrency support.  This requires a capable database client
library, and must be explicitly activated by specifying keyword argument
concurrency_level to function kinterbasdb.init.
For more info, see:
<a class="reference external" href="http://kinterbasdb.sf.net/dist_docs/usage.html#special_issue_concurrency">http://kinterbasdb.sf.net/dist_docs/usage.html#special_issue_concurrency</a></li>
<li>Streaming blob support (blobs can now be handled without fully
materializing them in memory).
For more info, see:
<a class="reference external" href="http://kinterbasdb.sf.net/dist_docs/usage.html#adv_param_conv_blobs">http://kinterbasdb.sf.net/dist_docs/usage.html#adv_param_conv_blobs</a></li>
<li>Support for manual creation and manipulation of prepared statements.
KInterbasDB has always used prepared statements under the hood, but now
they&#8217;re directly manipulable by the client programmer.  The implicit
prepared statement cache has also become more sophisticated.
For more info, see:
<a class="reference external" href="http://kinterbasdb.sf.net/dist_docs/usage.html#adv_prepared_statements">http://kinterbasdb.sf.net/dist_docs/usage.html#adv_prepared_statements</a></li>
<li>Database event system entirely rewritten.  Client programs can now create
any number of EventConduits per process, and a given conduit can listen
for more than 15 events (the limit is in the hundreds, but the specific
limit depends on the database server version and operating system rather
than on KInterbasDB).
For more info, see:
<a class="reference external" href="http://kinterbasdb.sf.net/dist_docs/usage.html#adv_event">http://kinterbasdb.sf.net/dist_docs/usage.html#adv_event</a></li>
<li>Added method Connection.db_info, a Pythonic wrapper around
Connection.database_info.  Thanks to Pavel Cisar for implementing this.
For more info, see:
<a class="reference external" href="http://kinterbasdb.sf.net/dist_docs/usage.html#adv_prog_maint_db_info">http://kinterbasdb.sf.net/dist_docs/usage.html#adv_prog_maint_db_info</a></li>
<li>Positional Dynamic Type Translation:  It&#8217;s now possible to specify DTT
settings at the Cursor-column level in addition to the previously
available levels.
For more info, see:
<a class="reference external" href="http://kinterbasdb.sf.net/dist_docs/usage.html#adv_param_conv_dynamic_type_translation_positional">http://kinterbasdb.sf.net/dist_docs/usage.html#adv_param_conv_dynamic_type_translation_positional</a></li>
<li>Added official support for the Python 2.4+ standard library decimal
module, including a new kinterbasdb.init(type_conv=200) convenience code.
For more info, see:
<a class="reference external" href="http://kinterbasdb.sf.net/dist_docs/usage.html#adv_param_conv_dynamic_type_translation_deferred_loading">http://kinterbasdb.sf.net/dist_docs/usage.html#adv_param_conv_dynamic_type_translation_deferred_loading</a></li>
<li>KInterbasDB now detects the &#8220;PSQL Stack Trace&#8221; generated by FB 2.0+, and
includes a nicely formatted rendition of the stack trace in the exception
message.
For more info, see:
Firebird 2.0 Release Notes, section &#8220;PSQL Stack Trace&#8221;</li>
</ul>
</blockquote>
</div>
<div class="section" id="id10">
<h3>Bug Fixes<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>KInterbasDB should now compile and run out of the box with Interbase
7.x.  DSR doesn&#8217;t have that version of Interbase, however, so KInterbasDB
is not actually tested with it.</li>
</ul>
</blockquote>
</div>
<div class="section" id="id11">
<h3>Backward-incompatibilities<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">KInterbasDB 3.2 has dropped support for Python versions earlier than 2.3,
and (officially) supports only Firebird 1.0 and later.  However,
Interbase 7.x support has been considerably enhanced, so it could be said
that Interbase is &#8220;unofficially&#8221; supported.</p>
</li>
<li><p class="first">Most Python classes in KInterbasDB have become new-style, for symmetry
with the new-style C classes added in 3.2.  Notably, kinterbasdb.Cursor
is now a new-style class written in pure C.</p>
<blockquote>
<p>Impact rating:  Low (There is practically no reason for a client
program to access the affected KInterbasDB classes in such a way that
this change would matter.)</p>
</blockquote>
</li>
<li><p class="first">Previously, the &#8220;infinite timeout value&#8221; for EventConduit.wait was 0.0.
The choice of that value was a terrible mistake, because attempting to
specify an extremely short timeout with a value such as 0.000000000000001
in fact created an infinite timeout.  The new &#8220;infinite timeout value&#8221; is
-1.0.</p>
<blockquote>
<p>Impact rating:  Low-Medium (The Usage Guide for KInterbasDB 3.1
specified that &#8220;The default timeout is infinite.&#8221;, but it did not
guarantee a particular value.  Client programs that use both events and
event timeouts should be checked, however.)</p>
</blockquote>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-3">
<h2>Version 3.1.3<a class="headerlink" href="#version-3-1-3" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id12">
<h3>Bug Fixes<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Fixed leak of weak reference objects used by a Connection to track its
Cursors.  These objects were collected when the Connection closed, but
never earlier.</p>
<p><cite>Thanks to Robby Dermody for reporting this bug.</cite>
Refs:
<a class="reference external" href="http://sf.net/forum/forum.php?thread_id=1380653&amp;forum_id=30917">http://sf.net/forum/forum.php?thread_id=1380653&amp;forum_id=30917</a></p>
</li>
<li><p class="first">The database engine&#8217;s Services API makes no provision for Unicode
handling.  kinterbasdb should have gracefully rejected Python unicode
objects submitted to the Services API, but instead, it choked.</p>
<p><cite>Thanks to Garrett Smith for reporting this bug.</cite>
Refs:
<a class="reference external" href="http://sf.net/forum/forum.php?thread_id=1366918&amp;forum_id=30917">http://sf.net/forum/forum.php?thread_id=1366918&amp;forum_id=30917</a></p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-2">
<h2>Version 3.1.2<a class="headerlink" href="#version-3-1-2" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id13">
<h3>Bug Fixes<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>Attempting to apply dynamic type translation settings dictionaries that
had non-string keys caused a segfault under some some circumstances.</li>
<li>kinterbasdb&#8217;s Services API infrastructure parsed integer results from
the engine as recommended by the IB 6 API Guide, but this was
inappropriate on non-Windows x86-64, and could cause invalid memory
access.</li>
<li>Input handling of INTEGER ARRAY fields did not work correctly on
non-Windows x86-64.</li>
<li>Overridding a connection&#8217;s dynamic type translation settings for a
particular slot with the &#8220;naked&#8221; translator by passing None as the
translator to Cursor.set_type_trans_[in|out] did not work.</li>
<li>The FIXED dynamic type translation slot was not handled properly on
dialect 1 connections (dialect 1 databases store NUMERIC/DECIMAL values
with precisions 10-18 internally as floating point).</li>
<li>Documentation bug:  The &#8220;Using KInterbasDB with Embedded Firebird&#8221;
section of the Usage Guide stated that the Services API did not work with
the embedded server architecture.  That was written when Firebird 1.5 was
in alpha; the Services API <em>does</em> work with embedded Firebird 1.5.2.</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-1">
<h2>Version 3.1.1<a class="headerlink" href="#version-3-1-1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id14">
<h3>Bug Fixes<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>kinterbasdb.init(type_conv=100|200) didn&#8217;t work under Python 2.4.
Late in the Python 2.4 development cycle, additional constraints were
introduced in Python&#8217;s funcobject.c that defeated kinterbasdb&#8217;s attempts
to manipulate the &#8216;func_code&#8217; attribute of some functions during the
execution of kinterbasdb.init.</li>
<li>C type ConnectionType&#8217;s destructor was called directly (rather than as a
result of DECREF) if an error arose in kinterbasdb.connect or
kinterbasdb.create_database.  This triggered a refcount assertion in
debug builds of Python.</li>
<li>Fixed a reference count leak in the C layer&#8217;s central exception-raising
function.</li>
<li>Fixed some potential memory handling problems in exceptional situations
in the event handling code.</li>
<li>A trivial problem prevented kinterbasdb 3.1 from compiling with the
prereleases of Firebird 2.0.</li>
</ul>
</blockquote>
</div>
<div class="section" id="id15">
<h3>New Features<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>In typeconv_text_unicode.py, enabled auto-translation of some Asian
Unicode codecs that didn&#8217;t enter the Python standard library until Python
2.4.</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1">
<h2>Version 3.1<a class="headerlink" href="#version-3-1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id16">
<h3>Bug Fixes<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>Fixed minor problems with the Connection.database_info method.</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-pre9">
<h2>Version 3.1_pre9<a class="headerlink" href="#version-3-1-pre9" title="Permalink to this headline">¶</a></h2>
<p>Version 3.1_pre9 is being released instead of 3.1 final primarily to test
Python 2.4 compatibility.  Since the first beta of Python 2.4 has now been
released, it is expected that these binaries will continue to work throughout
2.4&#8217;s lifespan (including maintenance releases - 2.4.x).</p>
<div class="section" id="id17">
<h3>New Features<a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>Python 2.4 support (that is, a few build script changes and the
availability of official Windows binaries for Python 2.4).</li>
</ul>
</blockquote>
</div>
<div class="section" id="id18">
<h3>Bug Fixes<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>kinterbasdb sometimes caused an exception to be raised during the Python
interpreter&#8217;s shutdown process.
Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1011513&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1011513&amp;group_id=9913&amp;atid=109913</a></li>
<li>Fixed a potential concurrency problem regarding memory allocation in
kinterbasdb&#8217;s event handling code.</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-pre8">
<h2>Version 3.1_pre8<a class="headerlink" href="#version-3-1-pre8" title="Permalink to this headline">¶</a></h2>
<p>Version 3.1_pre8 is the recommended stable version of kinterbasdb.</p>
<div class="section" id="id19">
<h3>New Features<a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>kinterbasdb._RowMapping has a richer dict-like interface (now implements
__len__, __getitem__, get, __contains__, keys, values, items, __iter__,
iterkeys, itervalues, iteritems).</li>
</ul>
</blockquote>
</div>
<div class="section" id="id20">
<h3>Bug Fixes<a class="headerlink" href="#id20" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>The kinterbasdb.typeconv_fixed_fixedpoint.fixed_conv_out_precise dynamic
type translator was unable to convert some NUMERIC/DECIMAL database
values.
Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=949669&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=949669&amp;group_id=9913&amp;atid=109913</a></li>
<li>The kinterbasdb.typeconv_text_unicode.unicode_conv_[in|out] dynamic type
translators did not work with non-default collations.
Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=876564&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=876564&amp;group_id=9913&amp;atid=109913</a></li>
<li>The kinterbasdb.services.Connection.getLog method should not have
accepted a database parameter; it no longer does.</li>
<li>The kinterbasdb.services.Connection.backup method now returns a
gbak-style log string (as the kinterbasdb.services.Connection.restore
method has done all along).</li>
<li>Applied Mac OS X compatibility patch to setup.py.
Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=909886&amp;group_id=9913&amp;atid=309913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=909886&amp;group_id=9913&amp;atid=309913</a></li>
<li>Ported to the AMD64 architecture.  Tested with a prerelease version of
Firebird 1.5.1/AMD64 on Fedora Core 1/AMD64.
Refs:
<a class="reference external" href="http://firebird.sourceforge.net/download/prerelease/1.5.1">http://firebird.sourceforge.net/download/prerelease/1.5.1</a>
<a class="reference external" href="http://firebird.sourceforge.net/download/prerelease/1.5.1/FirebirdSS-1.5.1.4424-public3.amd64.rpm">http://firebird.sourceforge.net/download/prerelease/1.5.1/FirebirdSS-1.5.1.4424-public3.amd64.rpm</a></li>
</ul>
</blockquote>
</div>
<div class="section" id="id21">
<h3>Backward-incompatibilities<a class="headerlink" href="#id21" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>The kinterbasdb.services.Connection.getEnvironmentMessage method has been
renamed to getMessageFileDir.</li>
<li>The kinterbasdb.services.Connection.getLog method should not have
accepted a database parameter; it no longer does.</li>
</ul>
</blockquote>
</div>
<div class="section" id="documentation-changes">
<h3>DOCUMENTATION CHANGES<a class="headerlink" href="#documentation-changes" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>Documented about 66% of the Services API (kinterbasdb.services module) in
the KInterbasDB Usage Guide.</li>
</ul>
</blockquote>
</div>
<div class="section" id="known-issues">
<h3>KNOWN ISSUES<a class="headerlink" href="#known-issues" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">The third-party fixedpoint.py module contains an incompatibility with
Python 2.1 that is exposed by a bugfix applied to the
kinterbasdb.typeconv_fixed_fixedpoint module in 3.1_pre8.</p>
<p>No attempt will be made to fix this problem (which is a fixedpoint bug,
not a kinterbasdb bug); users should either upgrade to a newer version of
Python or refrain from using fixedpoint.</p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-pre7">
<h2>Version 3.1_pre7<a class="headerlink" href="#version-3-1-pre7" title="Permalink to this headline">¶</a></h2>
<p>Version 3.1_pre7 should be considered a release candidate.  It is thought
to be ready for production use.</p>
<div class="section" id="id22">
<h3>New Features<a class="headerlink" href="#id22" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Introduced dynamic type translation slot TEXT_UNICODE, which applies to
all CHAR/VARCHAR fields except those with character sets NONE, OCTETS,
or ASCII.  Used in combination with the official translators in the
kinterbasdb.typeconv_text_unicode module, TEXT_UNICODE enables automatic
encoding/decoding of Unicode values.</p>
<p>This translator is not active by default except when kinterbasdb is
initialized with kinterbasdb.init(type_conv=100); the backward
compatibility implications are discussed in detail in the
Backward-incompatibilities section below.</p>
<p>Refs:
docs/usage.html#faq_fep_unicode</p>
</li>
<li><p class="first">Added read-only .charset attribute to Connection.</p>
</li>
<li><p class="first">On Windows, kinterbasdb now conforms to the client library loading scheme
introduced in FB 1.5 RC7, so fbclient.dll need not be explicitly placed
in a directory on the PATH if the registry settings are present.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id23">
<h3>Bug Fixes<a class="headerlink" href="#id23" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>The type slot in cursor.description is now updated dynamically to reflect
dynamic type translation settings.
Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=814276&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=814276&amp;group_id=9913&amp;atid=109913</a></li>
<li>Added logic to prevent inappropriate calls to isc_dsql_free_statement,
which were observed to cause a segfault in a heavily multithreaded
environment.</li>
<li>Added special case to field precision determination code to accommodate
the database client library&#8217;s irregular handling of RDB$DATABASE.RDB$DB_KEY
Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=818609&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=818609&amp;group_id=9913&amp;atid=109913</a></li>
</ul>
</blockquote>
</div>
<div class="section" id="id24">
<h3>Backward-incompatibilities<a class="headerlink" href="#id24" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Programs that use BOTH of the following:</p>
<blockquote>
<ul class="simple">
<li>the TEXT dynamic type translation slot</li>
<li>unicode database fields</li>
</ul>
</blockquote>
<p>will need to be updated to take the new TEXT_UNICODE slot into account.
Since the TEXT slot is not particularly useful, this incompatibility is
expected to affect very few existing programs.</p>
<p>Refs:
docs/usage.html#faq_fep_unicode</p>
</li>
<li><p class="first">Convenience code 100 for the kinterbasdb.init function now activates the
new TEXT_UNICODE translation slot, so unicode values are automatically
encoded and decoded.</p>
<p>Convenience code 1 remains the default, however, and it does not
activate the TEXT_UNICODE slot.  Programs that do BOTH of the following:</p>
<blockquote>
<ul class="simple">
<li>invoke kinterbasdb.init(type_conv=100)</li>
<li>use unicode database fields</li>
</ul>
</blockquote>
<p>will need to be updated to take the new TEXT_UNICODE slot into account.</p>
<p>Refs:
docs/usage.html#adv_param_conv_dynamic_type_translation_tbl_convenience_codes</p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-pre6">
<h2>Version 3.1_pre6<a class="headerlink" href="#version-3-1-pre6" title="Permalink to this headline">¶</a></h2>
<p>Version 3.1_pre6 should be considered a release candidate.  It is thought
to be stable.</p>
<div class="section" id="id25">
<h3>New Features<a class="headerlink" href="#id25" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Added support for manual control over the phases of two-phase commit.
The client programmer now has the option of triggering the first phase
manually via Connection.prepare() or ConnectionGroup.prepare().</p>
<p>This is useful when integrating with third-party transaction managers.</p>
</li>
<li><p class="first">KInterbasDB can now be compiled &#8220;out of the box&#8221; with MinGW when building
against Firebird 1.5 (but not Firebird 1.0 or Interbase).</p>
<p>See docs/installation-source.html for instructions.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id26">
<h3>Bug Fixes<a class="headerlink" href="#id26" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Connection.drop_database() now rolls back the connection&#8217;s active
transaction (if any) before dropping the database.</p>
<p>Previously, the database could be dropped with the transaction still
active; when the connection was subsequently garbage collected, a rollback
request was issued for the transaction (in a nonexistent database),
resulting in memory corruption.</p>
</li>
<li><p class="first">String values returned by input dynamic type translators were sometimes
prematurely garbage collected before the database engine had read their
contents.</p>
</li>
<li><p class="first">SQL fields with dynamic definitions (such as expressions in a SELECT list)
that involved fixed point data types (NUMERIC or DECIMAL) didn&#8217;t get
passed through the FIXED dynamic type translator because the database
engine does not flag dynamically defined fields properly.</p>
<p>Though this is a bug in the database engine rather than KInterbasDB, a
workaround was added to KInterbasDB.</p>
<p><cite>Thanks to Bert Hughes for reporting this bug.</cite></p>
</li>
<li><p class="first">The installation action of the setup script (&#8216;setup.py install&#8217;) did not
place the supporting files (documentation) in the proper directory on
Linux.</p>
<p><cite>Thanks to Treeve Jelbert for reporting this bug.</cite></p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-pre5">
<h2>Version 3.1_pre5<a class="headerlink" href="#version-3-1-pre5" title="Permalink to this headline">¶</a></h2>
<p>Version 3.1_pre5 should be considered a release candidate.  It is thought
to be stable.</p>
<div class="section" id="id27">
<h3>New Features<a class="headerlink" href="#id27" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Deferred loading of dynamic type translators:</p>
<p>KInterbasDB&#8217;s choice of initial dynamic type translators for date/time
and fixed point types is now deferred as late as possible, and the
programmer has the <em>option</em> of controlling the choice via the type_conv
parameter of the new kinterbasdb.init function.</p>
<p>This feature is documented in the Usage Guide at:
usage.html#adv_param_conv_dynamic_type_translation_deferred_loading</p>
</li>
<li><p class="first">KInterbasDB&#8217;s setup script is now capable of compiling the source
distribution &#8220;out of the box&#8221; with MinGW on Windows, but only with
Firebird 1.5 or later (Borland C++ can be used with Firebird 1.0).</p>
<p>This feature is documented in the installation guide for the source
distribution at:</p>
<p>installation-source.html#compiler_specific_compilation_notes</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id28">
<h3>Bug Fixes<a class="headerlink" href="#id28" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>During blob insertion, not enough memory was allocated to hold the
blob ID returned by the database engine, resulting in an overflow.</li>
<li>Implicit conversion of DATE/TIME/TIMESTAMP input parameters from strings
to the appropriate internal types was accidentally disallowed in
3.1_pre4.  This feature has been enabled again.</li>
<li>The Services API method kinterbasdb.services.Connection.restore was
incapable of restoring a backup into a multi-file database because it
sent the wrong cluster identifier for destination file page counts.</li>
</ul>
</blockquote>
</div>
<div class="section" id="id29">
<h3>Backward-incompatibilities<a class="headerlink" href="#id29" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Because of the new &#8220;Deferred loading of dynamic type translators&#8221; feature,
the DB API type comparison singleton kinterbasdb.DATETIME will not compare
equal to <em>any</em> type until the kinterbasdb.init function has been called
(whether explicitly or implicitly).</p>
<p>This issue&#8211;which is expected to affect little or no existing code&#8211;is
documented in the Usage Guide at:</p>
<p>usage.html#adv_param_conv_dynamic_type_translation_deferred_loading_backcompat</p>
</li>
<li><p class="first">The dynamic type translation module typeconv_preferred has been renamed
to typeconv_23plus.</p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-pre4">
<h2>Version 3.1_pre4<a class="headerlink" href="#version-3-1-pre4" title="Permalink to this headline">¶</a></h2>
<p>Version 3.1_pre4 should be considered a late beta release.  It is thought
to be stable, and there are no plans to add new features before 3.1 final
(only to fix bugs and finish updating the documentation).</p>
<p>Note that the KInterbasDB Usage Guide has been considerably updated, though
it is not quite complete.  When complete, it will document all of the
numerous new features in kinterbasdb 3.1; it&#8217;s a &#8220;must read&#8221; even now.</p>
<p>The Usage Guide is distributed with KInterbasDB
(kinterbasdb-installation-dir/docs/usage.html), and is available online at:
<a class="reference external" href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/</a><em>checkout</em>/kinterbasdb/Kinterbasdb-3.0/docs/usage.html</p>
<div class="section" id="id30">
<h3>New Features<a class="headerlink" href="#id30" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">DATABASE EVENT HANDLING has been reinstated, ported to POSIX, and timeout
support has been added.</p>
<p>This feature is thoroughly documented in the updated Usage Guide.</p>
<p>Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=637796&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=637796&amp;group_id=9913&amp;atid=109913</a></p>
</li>
<li><p class="first">DISTRIBUTED TRANSACTIONS are now supported via the
kinterbasdb.ConnectionGroup class.</p>
<p>Although the Usage Guide does not yet fully document this feature, it
does contain an example program and a few hints:
<a class="reference external" href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/</a><em>checkout</em>/kinterbasdb/Kinterbasdb-3.0/docs/usage.html#adv_trans_control_distributed</p>
</li>
<li><p class="first">DYNAMIC TYPE TRANSLATION</p>
<p>KInterbasDB 3.1_pre4 implements two-way &#8220;dynamic type translation&#8221;.
This feature allows the client programmer to change the type conversion
methods for specific SQL data types and achieve complete &#8220;type
transparency&#8221;.  For example, KInterbasDB 3.1_pre4 includes reference
implementations of converters for both input and output of
&#8216;mx.DateTime&#8217; and Python 2.3 stdlib &#8216;datetime&#8217; for TIME/DATE/TIMESTAMP
fields.</p>
<p>One consequence of two-way dynamic type translation support is that
KInterbasDB 3.1_pre4 can be used with Python 2.3&#8217;s datetime module
occupying the former role mx.DateTime.  For backward compatibility,
mx.DateTime is still the default, and it will remain so.</p>
<p>This feature is documented in the updated Usage Guide.</p>
</li>
<li><p class="first">Cursor.rowcount support has been added (insofar as the database engine
supports it).</p>
<p>This feature is documented in the updated Usage Guide.</p>
<p>Refs:
<a class="reference external" href="http://sourceforge.net/forum/forum.php?thread_id=866629&amp;forum_id=30917">http://sourceforge.net/forum/forum.php?thread_id=866629&amp;forum_id=30917</a></p>
</li>
<li><p class="first">SAVEPOINTs (a Firebird 1.5 feature) are exposed at the Python level via
the Connection.savepoint(savepoint=&#8217;name&#8217;) method and the optional
$savepoint argument to the Cursor.rollback method.</p>
<p>This feature is documented in the updated Usage Guide.</p>
</li>
<li><p class="first">New attributes suggested by the &#8220;Optional DB API Extensions&#8221; section
of PEP 249:</p>
<blockquote>
<ul class="simple">
<li>Access to a cursor&#8217;s connection via the Cursor.connection attribute.</li>
<li>Access to kinterbasdb&#8217;s exception classes via connection attributes.</li>
</ul>
</blockquote>
<p>Refs:
<a class="reference external" href="http://www.python.org/peps/pep-0249.html">http://www.python.org/peps/pep-0249.html</a></p>
</li>
<li><p class="first">A cursor can now be reused after it has caused an exception.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id31">
<h3>Bug Fixes<a class="headerlink" href="#id31" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Passing the wrong number of parameters for a parameterized SQL statement
sometimes caused a crash instead of an exception with kinterbasdb 3.1_pre3.
This would not have affected client programs that were written correctly,
but it was still a bug.</p>
</li>
<li><p class="first">The kinterbasdb.create_database function leaked memory if it encountered
an error.</p>
</li>
<li><p class="first">Additional Windows binaries are being released to avoid dynamic linking
problems with Interbase 5.5 and Firebird 1.5-embedded.</p>
<p>Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=707644&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=707644&amp;group_id=9913&amp;atid=109913</a>
<a class="reference external" href="http://sourceforge.net/forum/forum.php?thread_id=855348&amp;forum_id=30917">http://sourceforge.net/forum/forum.php?thread_id=855348&amp;forum_id=30917</a></p>
</li>
<li><p class="first">kinterbasdb now builds with less hassle on FreeBSD.</p>
<p>Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=720021&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=720021&amp;group_id=9913&amp;atid=109913</a></p>
</li>
<li><p class="first">Whenever a transactional context is needed, a transaction is now started
implicitly if the Python programmer has not started one explicitly
with Connection.begin.  This implicit behavior is implicitly required
by the Python DB API specification.</p>
<p>Refs:
<a class="reference external" href="http://mail.python.org/pipermail/db-sig/2003-February/003158.html">http://mail.python.org/pipermail/db-sig/2003-February/003158.html</a></p>
</li>
<li><p class="first">The mapping objects returned from the Cursor.fetch*map() method now
accept &#8220;double-quoted&#8221; field names (lookup keys).  If the field name is
double-quoted, its original case will be preserved&#8211;instead of being
normalized to upper case&#8211;when the result set is searched for a field
with that name.</p>
<p>For example, if a table were defined this way:</p>
<div class="highlight-python"><pre>create table tbl ("sTRanGelyCasEDfieldnAme" integer)</pre>
</div>
<p>and the statement:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">cur</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="s">&quot;select * from tbl&quot;</span><span class="p">)</span>
</pre></div>
</div>
<p>were executed against it, the mapping objects returned by:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">cur</span><span class="o">.</span><span class="n">fetchonemap</span><span class="p">()</span>
</pre></div>
</div>
<p>would have rejected the lookup key &#8216;sTRanGelyCasEDfieldnAme&#8217;, converting
it instead to &#8216;STRANGELYCASEDFIELDNAME&#8217; and then failing to find the
upper-cased field name.</p>
<p>The solution available in 3.1_pre4 is to perform the lookup this way:</p>
<div class="highlight-python"><pre>cur.execute("select * from tbl")
mapping = cur.fetchonemap()
mapping['"sTRanGelyCasEDfieldnAme"']
         ^-----double-quoted-----^</pre>
</div>
<p>which will force the preservation of the field name&#8217;s case.</p>
<p>An easy way to avoid problems such as this is to refrain from using
quoted identifiers; in that case, the database engine will treat
identifiers in a case-insensitive manner.</p>
<p>Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=720130&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=720130&amp;group_id=9913&amp;atid=109913</a></p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="internal-changes">
<h3>INTERNAL CHANGES<a class="headerlink" href="#internal-changes" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">kinterbasdb now implements its standard date/time and fixed point
handling via the new, general-purpose dynamic type translation feature.</p>
<p>This eliminates the C-compile-time dependency on mx.DateTime.  Although
mx.DateTime (for date/time types) and Connection.precision_mode (for
precise fixed point types) still function as before, dynamic type
translation allows other types to be transparently substituted (such as
those in Python 2.3&#8217;s standard library datetime module for date/time
types, or those in the fixedpoint module for precise fixed point types).</p>
<p>For more information, see the Usage Guide.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id32">
<h3>Backward-incompatibilities<a class="headerlink" href="#id32" title="Permalink to this headline">¶</a></h3>
<blockquote>
<p>There are no outright incompatibilities, but there is one deprecation:</p>
<ul>
<li><p class="first">Although Connection.precision_mode continues to function as in earlier
versions, it is deprecated in favor of dynamic type translation.  The
functionality that Connection.precision_mode delivers (precise I/O of
fixed point values) is now implemented at the Python level via dynamic
type translation, rather than at the C level.</p>
<p>If you explicitly use both Connection.precision_mode <em>and</em> dynamic
type translation, beware that changing the value of
<cite>Connection.precision_mode</cite> will cause changes to the registered dynamic
type converters under the hood.</p>
<p>For more information, see the INTERNAL CHANGES section above, and the
Usage Guide.</p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-pre3">
<h2>Version 3.1_pre3<a class="headerlink" href="#version-3-1-pre3" title="Permalink to this headline">¶</a></h2>
<p>Version 3.1_pre3 should be considered a beta release.</p>
<div class="section" id="id33">
<h3>New Features<a class="headerlink" href="#id33" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">database array support</p>
<p>Database arrays are mapped from Python sequences (except strings) on
input; to Python lists on output.  On output, the lists will be nested
if the database array has multiple dimensions.</p>
<p>I&#8217;m not impressed by the Interbase/Firebird implementation of database
arrays.  The database engine claims to support up to 16 dimensions, but
actually malfunctions catastrophically* above 10.</p>
<p>The arrays are of fixed size, with a predeclared number of dimensions
and number of elements per dimension.  Individual array elements cannot
be set to NULL/None**, so the mapping between Python lists (which have
dynamic length and are therefore not normally null-padded) and
non-trivial database arrays is clumsy.</p>
<p>Arrays cannot be passed as parameters to, or returned from, stored
procedures.</p>
<p>Finally, many interface libraries, GUIs, and even the isql command line
utility do not support arrays.
Refs:</p>
<blockquote>
<blockquote>
<ul class="simple">
<li><a class="reference external" href="http://sourceforge.net/tracker/?func=detail&amp;aid=659610&amp;group_id=9028&amp;atid=109028">http://sourceforge.net/tracker/?func=detail&amp;aid=659610&amp;group_id=9028&amp;atid=109028</a></li>
</ul>
</blockquote>
<p>** Interbase 6 API Guide page 153.</p>
</blockquote>
</li>
<li><p class="first">retaining commit/retaining rollback</p>
<p>The commit() and rollback() methods of kinterbasdb.Connection now
accept an optional boolean parameter &#8216;retaining&#8217; (default False).  If
retaining is True, the infrastructural support for the transaction active
at the time of the method call will be &#8220;retained&#8221; (efficiently and
transparently recycled) after the database server has committed or rolled
back the conceptual transaction.</p>
<p>In code that commits or rolls back frequently, &#8216;retaining&#8217; the
transaction yields considerably better performance.  &#8216;retaining&#8217; will
become the default at some point in the future if the switch can be made
without serious backward compatibility issues.</p>
<p>Refs:
<a class="reference external" href="http://sourceforge.net/forum/forum.php?thread_id=799246&amp;forum_id=30917">http://sourceforge.net/forum/forum.php?thread_id=799246&amp;forum_id=30917</a>
Interbase 6 API Guide page 74.</p>
</li>
<li><p class="first">unicode strings can now be executed via:</p>
<blockquote>
<ul class="simple">
<li>kinterbasdb.Cursor.execute[many]()</li>
<li>kinterbasdb.Cursor.callproc()</li>
<li>kinterbasdb.Connection.execute_immediate()</li>
</ul>
</blockquote>
<p>However, the encoding of the incoming unicode string is rather
simplistic&#8211;via PyUnicode_AsASCIIString.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id34">
<h3>Bug Fixes<a class="headerlink" href="#id34" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Addressed buffer overflow potential in:</p>
<ul class="simple">
<li>kinterbasdb.create_database()</li>
<li>kinterbasdb.connect()</li>
<li>kinterbasdb.Connection.begin()</li>
<li>kinterbasdb.Connection.execute_immediate()</li>
<li>kinterbasdb.Cursor.execute() (and thence, executemany() and callproc())</li>
</ul>
</li>
<li><p class="first">Fixed reference count leaks in:</p>
<ul class="simple">
<li>exception handling (_exception_functions.c)</li>
<li>field precision determination (_kiconversion_field_precision.c)</li>
</ul>
</li>
<li><p class="first">Fixed kinterbasdb.Connection.close() bug:  The physical connection to
the database server was not actually closed until the
kinterbasdb.Connection instance was garbage collected.</p>
</li>
<li><p class="first">Fixed a bug in the kinterbasdb.services.Connection.userExists() method.
Usernames are now normalized to upper case.</p>
</li>
<li><p class="first">Database version compatibility:</p>
<ul>
<li><p class="first">kinterbasdb compiles properly against Firebird 1.5.</p>
</li>
<li><p class="first">kinterbasdb compiles against and ought to work with (but has not been
tested with) Interbase 5.5, albeit with some lost functionality,
namely:</p>
<blockquote>
<ul class="simple">
<li>field precision determination (the precision entry in cursor.description)</li>
<li>Services API support</li>
<li>retaining rollback</li>
<li>various data storage options, such as precise 64-bit integer storage
of NUMERIC and DECIMAL values (IB 5.5 uses doubles instead, which
is not really adequate) and more diverse date/time types.</li>
</ul>
</blockquote>
</li>
</ul>
<p>Refs:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=627816&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=627816&amp;group_id=9913&amp;atid=109913</a>
IB 6 Data Definition Guide page 65.</p>
</li>
<li><p class="first">Improved DB API compliance:</p>
<ul class="simple">
<li>Now, there need not be an active transaction before any execute(),
commit(), or rollback() call; transaction establishment is implicit in
these cases.</li>
<li>Cursors no longer need to be discarded after an exception; the same
cursor can be reused.  Of course if the cursor was in the process of
fetching a result set, the remainder of the set will not be available
after the exception.</li>
</ul>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id35">
<h3>INTERNAL CHANGES<a class="headerlink" href="#id35" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>Numerous modest optimizations, especially with regard to memory handling.
Among these is a move to take advantage of Python 2.3&#8217;s specialized,
Python-oriented memory manager.</li>
<li>MAJOR code refactoring and tidying.</li>
</ul>
</blockquote>
</div>
<div class="section" id="id36">
<h3>Backward-incompatibilities<a class="headerlink" href="#id36" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Invalid argument combinations to the connect() function now raise a
ProgrammingError rather than an InterfaceError.  Note that this refers to
invalid <em>combinations</em> of arguments, not necessarily to invalid <em>values</em>
for those arguments.</p>
</li>
<li><p class="first">Non-keyword-argument forms of connect() are now deprecated; passing
non-keyword arguments to connect() results in a DeprecationWarning being
issued via the standard Python warning framework.  This is a warning, not
an incompatibility in the strict sense.</p>
<p>Refs:
<a class="reference external" href="http://www.python.org/doc/current/lib/module-warnings.html">http://www.python.org/doc/current/lib/module-warnings.html</a></p>
</li>
<li><p class="first">Official support for database event handling has been deferred until 3.2.
A Win32-only prototype will still be included with the kinterbasdb 3.1
source distribution (but not compiled by default).</p>
<p>Refs:
docs/usage.html#database_events_unsupported</p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-pre2">
<h2>Version 3.1_pre2<a class="headerlink" href="#version-3-1-pre2" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id37">
<h3>New Features<a class="headerlink" href="#id37" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Global Interpreter Lock management</p>
<p>Previously, kinterbasdb operated in a serial manner, with the sole
exception of the event handling code, whose parallelism is &#8220;under the
hood&#8221;.  Aside from event handling, all kinterbasdb operations, including
potentially long-running Firebird API calls, were serialized by the
Python GIL.</p>
<p>With the advent of kinterbasdb 3.1_pre2, kinterbasdb releases the GIL
where appropriate&#8211;that is, when it is about to make a potentially long-
running Firebird API call, and can do so without invoking the Python API,
or otherwise operating on Python structures.</p>
<p>However, the Firebird client library itself is not threadsafe, so
Firebird API calls must also be serialized.  To that end, kinterbasdb
maintains a process-wide thread lock around which all Firebird API calls
are serialized.</p>
<p>When kinterbasdb is about to make a potentially long-running Firebird
API call, it follows these steps:</p>
<blockquote>
<ol class="arabic">
<li><p class="first">Extract necessary parameter data from Python structures</p>
</li>
<li><p class="first">Release the Python GIL</p>
</li>
<li><p class="first">Acquire the kinterbasdb process-wide Firebird client thread lock</p>
</li>
<li><p class="first">Execute the Firebird API call</p>
</li>
<li><p class="first">Release the kinterbasdb process-wide Firebird client thread lock</p>
</li>
<li><p class="first">Acquire the Python GIL</p>
</li>
<li><dl class="first docutils">
<dt>Modify Python structures to reflect the results of the Firebird API</dt>
<dd><p class="first last">call</p>
</dd>
</dl>
</li>
</ol>
</blockquote>
<p>The addition of GIL management should improve kinterbasdb&#8217;s maximum
possible throughput for multi-threaded Python programs on multi-processor
systems (one processor can run the Python interpreter while another
executes a Firebird client library operation).  GIL management may also
yield greater &#8220;responsiveness&#8221; for multi-threaded Python programs running
on single-processor systems.</p>
<p>The addition of GIL management required fairly extensive internal
changes, and therefore warranted a whole prerelease version virtually
unto itself.</p>
</li>
<li><p class="first">Cursor name support</p>
<p>The read/write property Cursor.name allows the Python programmer to
perform scrolling UPDATEs or DELETions via the &#8220;SELECT ... FOR UPDATE&#8221;
syntax.  If you don&#8217;t know what this means, refer to the database SQL
syntax documentation of the FOR UPDATE clause of the SELECT statement.
The Cursor.name property can be ignored entirely if you don&#8217;t need to
use it.</p>
<p>Here&#8217;s an example code fragment:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">con</span> <span class="o">=</span> <span class="o">...</span> <span class="c"># establish a kinterbasdb.Connection</span>
<span class="n">curScroll</span> <span class="o">=</span> <span class="n">con</span><span class="o">.</span><span class="n">cursor</span><span class="p">()</span>
<span class="n">curUpdate</span> <span class="o">=</span> <span class="n">con</span><span class="o">.</span><span class="n">cursor</span><span class="p">()</span>

<span class="n">curScroll</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="s">&#39;select city from customer for update&#39;</span><span class="p">)</span>
<span class="n">curScroll</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s">&#39;city_scroller&#39;</span>
<span class="n">update</span> <span class="o">=</span> <span class="s">&#39;update customer set city=? where current of &#39;</span> <span class="o">+</span> <span class="n">curScroll</span><span class="o">.</span><span class="n">name</span>

<span class="k">for</span> <span class="p">(</span><span class="n">city</span><span class="p">,)</span> <span class="ow">in</span> <span class="n">curScroll</span><span class="p">:</span>
    <span class="n">city</span> <span class="o">=</span> <span class="o">...</span> <span class="c"># make some changes to city</span>
    <span class="n">curUpdate</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span> <span class="n">update</span><span class="p">,</span> <span class="p">(</span><span class="n">city</span><span class="p">,)</span> <span class="p">)</span>
</pre></div>
</div>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-1-pre1">
<h2>Version 3.1_pre1<a class="headerlink" href="#version-3-1-pre1" title="Permalink to this headline">¶</a></h2>
<p>Version 3.1_pre1 should be considered an early alpha release.</p>
<div class="section" id="id38">
<h3>New Features<a class="headerlink" href="#id38" title="Permalink to this headline">¶</a></h3>
<p>This list of new features represents the state of kinterbasdb 3.1_pre1,
which does not include some features slated for inclusion in the final
release of kinterbasdb 3.1.  For a discussion of the ultimate goals of
version 3.1, see:
<a class="reference external" href="http://sourceforge.net/forum/forum.php?thread_id=696302&amp;forum_id=30917">http://sourceforge.net/forum/forum.php?thread_id=696302&amp;forum_id=30917</a></p>
<p>Also, the documentation has not yet been updated to cover these new
features, nor will it be for at least another month.  In the meantime,
those who need to use the new features must refer to the source code.</p>
<blockquote>
<ul>
<li><dl class="first docutils">
<dt>Cursor Iteration Support</dt>
<dd><p class="first last">When used with Python 2.2 or later, kinterbasdb&#8217;s Cursors now support</p>
</dd>
</dl>
<p>&#8220;natural&#8221; iteration.  For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># Index-based field lookup (based on Cursor.fetchone):</span>
<span class="n">cur</span> <span class="o">=</span> <span class="n">con</span><span class="o">.</span><span class="n">cursor</span><span class="p">()</span>
<span class="n">cur</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="s">&quot;select col1, col2 from the_table&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">cur</span><span class="p">:</span>
    <span class="n">col1</span> <span class="o">=</span> <span class="n">row</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span>

<span class="c"># Key-based field lookup (based on Cursor.fetchonemap):</span>
<span class="n">cur</span> <span class="o">=</span> <span class="n">con</span><span class="o">.</span><span class="n">cursor</span><span class="p">()</span>
<span class="n">cur</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="s">&quot;select col1, col2 from the_table&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">rowMap</span> <span class="ow">in</span> <span class="n">cur</span><span class="o">.</span><span class="n">itermap</span><span class="p">():</span>
    <span class="n">col1</span> <span class="o">=</span> <span class="n">rowMap</span><span class="p">[</span><span class="s">&#39;col1&#39;</span><span class="p">]</span>
</pre></div>
</div>
<p>The iterator-based pattern supercedes the ugly fetch pattern of old
(though of course the old pattern will still work):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># Index-based field lookup (based on Cursor.fetchone):</span>
<span class="n">cur</span> <span class="o">=</span> <span class="n">con</span><span class="o">.</span><span class="n">cursor</span><span class="p">()</span>
<span class="n">cur</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="s">&quot;select col1, col2 from the_table&quot;</span><span class="p">)</span>
<span class="k">while</span> <span class="mf">1</span><span class="p">:</span>
    <span class="n">row</span> <span class="o">=</span> <span class="n">cur</span><span class="o">.</span><span class="n">fetchone</span><span class="p">()</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">row</span><span class="p">:</span>
        <span class="k">break</span>

    <span class="n">col1</span> <span class="o">=</span> <span class="n">row</span><span class="p">[</span><span class="mf">0</span><span class="p">]</span>
</pre></div>
</div>
</li>
<li><p class="first">Implicit Parameter Conversion</p>
<p>Implicit parameter conversion allows any SQL datatype supported by
kinterbasdb to be passed to the database engine as a Python string.</p>
<p>This is especially useful for parameterized statements that involve
date/time datatypes, because they can now accept server-computed &#8220;magic&#8221;
values such as &#8216;now&#8217; and &#8216;current_date&#8217; more naturally.  Implicit
parameter conversion is also likely to yield a speedup for programs that
load external data from flat files into the database, since the incoming
values do not need to be converted from their original string
representation into an acceptable Python type before being forwarded to
the database.</p>
<p>For a more thorough discussion of this new feature, see:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=531828&amp;group_id=9913&amp;atid=309913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=531828&amp;group_id=9913&amp;atid=309913</a></p>
</li>
<li><p class="first">Services API Support (see IB 6 API Guide Chapter 12)</p>
<p>The database engine provides an API (the Services API) to facilitate
programmatic invocation of the maintenance tasks available through the
command-line tools gbak, gfix, etc.</p>
<p>I&#8217;ve wrapped nearly the entire Services API in a thick Python API of
my own design.  My API design is only provisional; I seek feedback as
to how it could be made more elegant.  The Services API support is
accessible via the kinterbasdb.services module.</p>
</li>
<li><p class="first">Database Event Support (see IB 6 API Guide Chapter 11)</p>
<p>The database engine allows client programs to register to be informed
of the occurrence of database events, which can be raised with the
POST_EVENT statement in stored procedures or triggers.  kinterbasdb 3.1
supports a subset of this functionality (synchronous waiting only) via
the Connection.wait(eventNames) method.</p>
<p>The current implementation is only a rough prototype; though usable,
it is not recommended for production environments.</p>
<p>The current implementation suffers from a major limitation:  only one
thread per process is allowed to listen for event notification.  This is
so because the current implementation resorts to some roundabout trickery
to circumvent the lack of database API support for synchronous event
notification on Windows.  Because the database API only starts one
asynchronous event handler thread per process, I doubt that support for
multiple event-listening threads in a single process will materialize.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id39">
<h3>Bug Fixes<a class="headerlink" href="#id39" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">In the past, the opaque mapping object returned by the Cursor.fetch*map
methods returned None when asked for a field not in its select list,
rather than raising a KeyError.  It now raises a KeyError in such a case.
For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">cur</span> <span class="o">=</span> <span class="n">con</span><span class="o">.</span><span class="n">cursor</span><span class="p">()</span>
<span class="n">cur</span><span class="o">.</span><span class="n">execute</span><span class="p">(</span><span class="s">&quot;select col1, col2 from the_table&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">rowMap</span> <span class="ow">in</span> <span class="n">cur</span><span class="o">.</span><span class="n">itermap</span><span class="p">():</span>
    <span class="n">x</span> <span class="o">=</span> <span class="n">rowMap</span><span class="p">[</span><span class="s">&#39;col3&#39;</span><span class="p">]</span> <span class="c"># Used to return None.  Now raises KeyError,</span>
                       <span class="c"># because col3 was not SELECTed.</span>
</pre></div>
</div>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id40">
<h3>Backward-incompatibilities<a class="headerlink" href="#id40" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>Although kinterbasdb 3.1 is significantly different internally, there is
only one known API incompatibility with version 3.0.2.  It would only arise
in code that relies on the erroneous behavior of the mapping-fetch bug
mentioned above.</li>
<li>Python versions prior to 2.1 are no longer officially supported.
Although kinterbasdb might still compile against Python 2.0 and earlier,
I will not go out of my way to ensure that it does.</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-0-2">
<h2>Version 3.0.2<a class="headerlink" href="#version-3-0-2" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id41">
<h3>Bug Fixes<a class="headerlink" href="#id41" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Fixed a CHAR-handling bug that caused CHAR values inserted into the
database to lack their trailing spaces.  Instead, the values were null-
terminated.  This left CHAR values inserted by kinterbasdb incompatible
with standard tools, which expect trailing spaces.</p>
<p>For more information, see
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=594908&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=594908&amp;group_id=9913&amp;atid=109913</a></p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-0-1">
<h2>Version 3.0.1<a class="headerlink" href="#version-3-0-1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id42">
<h3>Bug Fixes<a class="headerlink" href="#id42" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Adjusted input handling of NULL values.  The new scheme raises an
exception immediately when it detects that a Python None value has
arrived for storage in a database field or parameter that disallows
NULL values.</p>
<p>The old scheme simply accepted the Python None value and then tried
to execute the query, relying on the database API to detect the error.
With certain data types, the database API would silently insert a bogus
value rather than detecting the error.</p>
</li>
<li><p class="first">Scrutinized the datetime input/output facilities, found some
incompatibilities with the DB API, and corrected them.  These changes
are backward-incompatible, but are warranted because the previous
behavior was in defiance of the specification.  See further notes about
the nature of these changes in the backward-incompatibilities section.</p>
</li>
<li><p class="first">Fixed a memory leak that affected the storage of Python string input
parameters in BLOB fields.</p>
</li>
<li><p class="first">Fixed a rollback-related bug that arose if a connection to a database
was established, but a transaction was never started on that connection.
In such a case, a spurious exception was raised when the connection was
garbage collected.</p>
<p>Normal code would not have invoked this bug, but it was still a bug.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id43">
<h3>Backward-incompatibilities<a class="headerlink" href="#id43" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Datetime input/output has changed to better comply with the DB API (see
datetime bugfix discussion above).</p>
<p>Code that uses the mx.DateTime module directly (rather than the
kinterbasdb DB API datetime constructors) should not be affected.</p>
<p>For details, see the comments in the code block in __init__.py tagged
with &#8220;DSR:2002.07.19&#8221;.</p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-0-1-pre3">
<h2>Version 3.0.1_pre3<a class="headerlink" href="#version-3-0-1-pre3" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id44">
<h3>Bug Fixes<a class="headerlink" href="#id44" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">Bug #572326 (which was not present in kinterbasdb 3.0 and never affected
Python 2.2+) caused several numeric types to not be transferred from
Python to the database engine when they were passed as query parameters.</p>
<p>This was a serious bug; it caused even such fundamental operations as:
cursor.execute(&#8220;insert into the_table values (?)&#8221;, (1,))
to not work correctly.</p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-0-1-pre2">
<h2>Version 3.0.1_pre2<a class="headerlink" href="#version-3-0-1-pre2" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id45">
<h3>Bug Fixes<a class="headerlink" href="#id45" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">CHAR output now doesn&#8217;t have such problems with multibyte character sets
and values shorter than the maximum declared length of the field.</p>
<p>CHARs are no longer returned with their trailing blanks intact.  The
trailing blanks have been abandoned because they were in fact NULL
characters, not spaces.  kinterbasdb would fill in the spaces manually,
except for the problems that approach causes with multibyte character
sets.</p>
</li>
<li><p class="first">Fixed a potential buffer overflow, but the fix only applies when compiled
against Python 2.2 or later.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="id46">
<h3>Backward-incompatibilities<a class="headerlink" href="#id46" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>See coverage of CHAR output changes in the &#8216;Bug Fixes&#8217; section.  In a
nutshell:  CHAR output values no longer have trailing NULL bytes.</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-0-1-pre1">
<h2>Version 3.0.1_pre1<a class="headerlink" href="#version-3-0-1-pre1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id47">
<h3>New Features<a class="headerlink" href="#id47" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul class="simple">
<li>It is now possible to connect to a database under a specific role by using
the &#8216;role&#8217; keyword argument of the kinterbasdb.connect function.</li>
<li>The following methods now accept any sequence except a string for their
&#8216;parameter&#8217; argument, rather than demanding a tuple:  Cursor.execute,
Cursor.executemany and Cursor.callproc.</li>
</ul>
</blockquote>
</div>
<div class="section" id="id48">
<h3>Bug Fixes<a class="headerlink" href="#id48" title="Permalink to this headline">¶</a></h3>
<blockquote>
<ul>
<li><p class="first">kinterbasdb supports IB 5.x again.</p>
<p>Various identifiers specific to IB 6.x/Firebird had crept into unguarded
areas of __init__.py and _kinterbasdb.c, but this has been changed so
that kinterbasdb compiles gracefully with IB 5.x.
See:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=553184&amp;group_id=9913&amp;atid=209913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=553184&amp;group_id=9913&amp;atid=209913</a></p>
</li>
<li><p class="first">The distutils setup script no longer raises a ValueError on Windows 2000
or XP.</p>
</li>
<li><p class="first">The precision slot in Cursor.description was always zero.  It now contains
the correct value if that value can reasonably be determined.</p>
<p>Note that the database engine records the precision of some fields as
zero (e.g., FLOAT), and the slot will also be zero in cases where the
database engine does not expose the precision of the field (e.g., dynamic
fields such as &#8220;SELECT 33.5 FROM RDB$DATABASE&#8221;).</p>
<p>Since the database API does not provide the field&#8217;s precision figure in
the XSQLVAR structure, it is necessary to query the system tables.  In
order to minimize the performance hit, precision figures are cached per
Connection; the determination of a given field&#8217;s precision figure in the
context of a given Connection will require only dictionary lookups after
it is determined the first time with a system table query.</p>
<p>An unfortunate side effect of this caching is that if a field&#8217;s
precision is altered after the figure has been cached in by a Connection,
cursors based on that Connection will still show the old precision figure.
In practice, this situation will almost never arise.
See:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=549982&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=549982&amp;group_id=9913&amp;atid=109913</a></p>
</li>
<li><p class="first">On Linux, attempting to fetch immediately after having executed a
non-query statement resulted in a segfault.  An exception is now raised
instead.  The problem did not afflict Windows, which always raised the
exception.
See:
<a class="reference external" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=551098&amp;group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?func=detail&amp;aid=551098&amp;group_id=9913&amp;atid=109913</a></p>
<ul class="simple">
<li>The message carried by this exception grew without bound in on both
Windows and Linux.  It no longer does.</li>
</ul>
</li>
<li><p class="first">Under some circumstances, the fetched values of CHAR fields were
incorrect.  CHAR values now appear as expected (they are left-padded with
spaces and always of length equal to their field&#8217;s designated maximum
length).</p>
</li>
<li><p class="first">Cursor.fetchmany raised an error if there were no remaining values to
fetch.  It now returns an empty sequence instead, as required by the DB
API Specification.</p>
</li>
<li><p class="first">Field domains are checked more strictly.  It is now impossible to (for
example) issue a statement that attempts to insert a 12-character string
into a 10-character CHAR field without encountering an exception.</p>
<p>This checking is not perfect, since it validates against the field&#8217;s
internal storage type rather than the field&#8217;s declared type.  For example,
a NUMERIC(1,1), which is stored internally as a short, will erroneously
accept the value 12.5 because 125 fits in a short.</p>
</li>
<li><p class="first">When operating in imprecise mode (connection.precision_mode == 0),
kinterbasdb 3.0 sometimes interpreted integer values as though it were
operating in precise mode.</p>
</li>
</ul>
</blockquote>
</div>
</div>
<div class="section" id="version-3-0-versus-2-0-0-3-1">
<h2>Version 3.0 versus 2.0-0.3.1<a class="headerlink" href="#version-3-0-versus-2-0-0-3-1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id49">
<h3>New Features<a class="headerlink" href="#id49" title="Permalink to this headline">¶</a></h3>
<blockquote>
The new features are thoroughly documented in the KInterbasDB Usage Guide
(usage.html); they need not be reiterated here.
However, backward-incompatible changes <em>have</em> been documented in this
changelog (see the Backward-incompatibilities section).</blockquote>
</div>
<div class="section" id="id50">
<h3>Bug Fixes<a class="headerlink" href="#id50" title="Permalink to this headline">¶</a></h3>
<blockquote>
<p>Many bugs have been fixed, including (but not limited to) the following,
which were registered with the KInterbasDB bug tracker at SourceForge
( <a class="reference external" href="http://sourceforge.net/tracker/index.php?group_id=9913&amp;atid=109913">http://sourceforge.net/tracker/index.php?group_id=9913&amp;atid=109913</a> ):</p>
<blockquote>
<ul class="simple">
<li>433090  cannot connect to firebird server</li>
<li>438130  cursor.callproc not adding param code</li>
<li>468304  fetchmany return all record</li>
<li>498086  ignores column aliases in select</li>
<li>498403  fetching after a callproc hangs program</li>
<li>498414  execute procedure message length error</li>
<li>505950  inconsistent fetch* return types</li>
<li>515974  Wrong decoding of FB isc_version</li>
<li>517093  broken fixed-point handling in 3.0</li>
<li>517840  C function normalize_double inf. loop</li>
<li>517842  fetch bug - program hangs</li>
<li>520793  poor DB API compliance
^ a <em>BIG</em> fix that entailed many changes</li>
<li>522230  error with blobs larger than (2^16) - 1</li>
<li>522774  inconsistent fixed-point conv in 3.0-rc2</li>
<li>523348  memory leak in Blob2PyObject</li>
<li>immediate execution facilities unreliable in 2.x</li>
</ul>
</blockquote>
</blockquote>
</div>
<div class="section" id="id51">
<h3>Backward-incompatibilities<a class="headerlink" href="#id51" title="Permalink to this headline">¶</a></h3>
<blockquote>
<p>As a result of the changes required for some of the bugfixes (especially
#520793 - &#8220;poor DB API compliance&#8221;) and general reengineering, several
areas of backward-incompatibility have arisen:</p>
<blockquote>
<ul>
<li><p class="first">fetch* return types</p>
<p>The standard fetch(one|many|all) methods now return just a sequence,
not a combined sequence/mapping.  If you want a mapping, use one of
the fetch(one|many|all)map methods.</p>
<p>Note the &#8220;&#8216;absolutely no guarantees&#8217; except...&#8221; caveats in the
KInterbasDB Usage Guide regarding the return types of the
Cursor.fetch* methods and the contents of the Cursor.description
attribute.</p>
<p>This is a significant backward-incompatibility, and was not
undertaken without serious consideration (for evidence see
<a class="reference external" href="http://sourceforge.net/forum/forum.php?thread_id=622782&amp;forum_id=30919">http://sourceforge.net/forum/forum.php?thread_id=622782&amp;forum_id=30919</a>
).</p>
</li>
<li><p class="first">Fixed point number handling</p>
<p>Fixed point number handling has been remodelled.  By default, fixed
point numbers (NUMERIC/DECIMAL field values) are now represented
(with a potential loss of precision) as Python floats.</p>
<p>A Connection.precision_mode attribute has been added so that precise
representation of fixed point values as scaled Python integers (as in
KInterbasDB 2.x) can be used at will.</p>
<p>For more information, see the KInterbasDB Usage Guide.</p>
</li>
<li><p class="first">Connection.dialect</p>
<p>In KInterbasDB 2.x, the default connection dialect was 1 (the
backward-compatibility dialect for use with Interbase 5.5 and earlier).</p>
<p>KInterbasDB 3.0 is being released into quite a different climate.
Interbase 6.0 was released nearly two years ago, and Firebird 1.0 has
recently been released.  Because it is expected that KInterbasDB 3.0
will be used most frequently with Interbase 6.0+ and Firebird, the
default connection dialect is 3.</p>
<p>Using KInterbasDB 3.0 with Interbase 5.5 and earlier is still
possible, though untested by the developers of KInterbasDB 3.0.  See
the Connection.dialect documentation in the KInterbasDB Usage Guide
for an explanation of how to initialize a connection with a dialect
other than 3.</p>
</li>
<li><p class="first">Connection.server_version</p>
<p>The Connection.server_version attribute is now a string rather than
an integer.  An integer simply was not expressive enough to represent
the numerous Interbase variants that exist today (including Firebird,
which does not fit neatly into the Interbase version progression).</p>
<p>For more information, see the KInterbasDB Usage Guide.</p>
</li>
<li><p class="first">kinterbasdb.execute_immediate</p>
<p>The kinterbasdb.execute_immediate function has been removed.  A
similar function named kinterbasdb.create_database has been added.
The primary differences between kinterbasdb.execute_immediate and
kinterbasdb.create_database are:</p>
<blockquote>
<ul class="simple">
<li>kinterbasdb.create_database is not as general</li>
<li>kinterbasdb.create_database actually works</li>
</ul>
</blockquote>
<p>The execute_immediate method of the Connection class has been
retained.</p>
<p>For more information, see the KInterbasDB Usage Guide.</p>
</li>
</ul>
</blockquote>
</blockquote>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h3><a href="index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference external" href="">KInterbasDB Changelog</a><ul>
<li><a class="reference external" href="#version-3-3">Version 3.3</a><ul>
<li><a class="reference external" href="#new-features">New Features</a></li>
<li><a class="reference external" href="#backward-incompatibilities">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-2-2">Version 3.2.2</a><ul>
<li><a class="reference external" href="#bug-fixes">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-2-1">Version 3.2.1</a><ul>
<li><a class="reference external" href="#id1">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-2">Version 3.2</a><ul>
<li><a class="reference external" href="#id2">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-2rc1">Version 3.2rc1</a><ul>
<li><a class="reference external" href="#id3">Bug Fixes</a></li>
<li><a class="reference external" href="#id4">New Features</a></li>
<li><a class="reference external" href="#id5">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-2b1">Version 3.2b1</a><ul>
<li><a class="reference external" href="#id6">Bug Fixes</a></li>
<li><a class="reference external" href="#id7">New Features</a></li>
<li><a class="reference external" href="#id8">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-2a1">Version 3.2a1</a><ul>
<li><a class="reference external" href="#id9">New Features</a></li>
<li><a class="reference external" href="#id10">Bug Fixes</a></li>
<li><a class="reference external" href="#id11">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-3">Version 3.1.3</a><ul>
<li><a class="reference external" href="#id12">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-2">Version 3.1.2</a><ul>
<li><a class="reference external" href="#id13">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-1">Version 3.1.1</a><ul>
<li><a class="reference external" href="#id14">Bug Fixes</a></li>
<li><a class="reference external" href="#id15">New Features</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1">Version 3.1</a><ul>
<li><a class="reference external" href="#id16">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-pre9">Version 3.1_pre9</a><ul>
<li><a class="reference external" href="#id17">New Features</a></li>
<li><a class="reference external" href="#id18">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-pre8">Version 3.1_pre8</a><ul>
<li><a class="reference external" href="#id19">New Features</a></li>
<li><a class="reference external" href="#id20">Bug Fixes</a></li>
<li><a class="reference external" href="#id21">Backward-incompatibilities</a></li>
<li><a class="reference external" href="#documentation-changes">DOCUMENTATION CHANGES</a></li>
<li><a class="reference external" href="#known-issues">KNOWN ISSUES</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-pre7">Version 3.1_pre7</a><ul>
<li><a class="reference external" href="#id22">New Features</a></li>
<li><a class="reference external" href="#id23">Bug Fixes</a></li>
<li><a class="reference external" href="#id24">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-pre6">Version 3.1_pre6</a><ul>
<li><a class="reference external" href="#id25">New Features</a></li>
<li><a class="reference external" href="#id26">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-pre5">Version 3.1_pre5</a><ul>
<li><a class="reference external" href="#id27">New Features</a></li>
<li><a class="reference external" href="#id28">Bug Fixes</a></li>
<li><a class="reference external" href="#id29">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-pre4">Version 3.1_pre4</a><ul>
<li><a class="reference external" href="#id30">New Features</a></li>
<li><a class="reference external" href="#id31">Bug Fixes</a></li>
<li><a class="reference external" href="#internal-changes">INTERNAL CHANGES</a></li>
<li><a class="reference external" href="#id32">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-pre3">Version 3.1_pre3</a><ul>
<li><a class="reference external" href="#id33">New Features</a></li>
<li><a class="reference external" href="#id34">Bug Fixes</a></li>
<li><a class="reference external" href="#id35">INTERNAL CHANGES</a></li>
<li><a class="reference external" href="#id36">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-pre2">Version 3.1_pre2</a><ul>
<li><a class="reference external" href="#id37">New Features</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-1-pre1">Version 3.1_pre1</a><ul>
<li><a class="reference external" href="#id38">New Features</a></li>
<li><a class="reference external" href="#id39">Bug Fixes</a></li>
<li><a class="reference external" href="#id40">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-0-2">Version 3.0.2</a><ul>
<li><a class="reference external" href="#id41">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-0-1">Version 3.0.1</a><ul>
<li><a class="reference external" href="#id42">Bug Fixes</a></li>
<li><a class="reference external" href="#id43">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-0-1-pre3">Version 3.0.1_pre3</a><ul>
<li><a class="reference external" href="#id44">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-0-1-pre2">Version 3.0.1_pre2</a><ul>
<li><a class="reference external" href="#id45">Bug Fixes</a></li>
<li><a class="reference external" href="#id46">Backward-incompatibilities</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-0-1-pre1">Version 3.0.1_pre1</a><ul>
<li><a class="reference external" href="#id47">New Features</a></li>
<li><a class="reference external" href="#id48">Bug Fixes</a></li>
</ul>
</li>
<li><a class="reference external" href="#version-3-0-versus-2-0-0-3-1">Version 3.0 versus 2.0-0.3.1</a><ul>
<li><a class="reference external" href="#id49">New Features</a></li>
<li><a class="reference external" href="#id50">Bug Fixes</a></li>
<li><a class="reference external" href="#id51">Backward-incompatibilities</a></li>
</ul>
</li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="links.html" title="previous chapter">KInterbasDB Links</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="license.html" title="next chapter">KInterbasDB LICENSE</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="_sources/changelog.txt">Show Source</a></li>
            </ul>
          <h3>Quick search</h3>
            <form class="search" action="search.html" method="get">
              <input type="text" name="q" size="18" /> <input type="submit" value="Go" />
              <input type="hidden" name="check_keywords" value="yes" />
              <input type="hidden" name="area" value="default" />
            </form>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="license.html" title="KInterbasDB LICENSE"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="links.html" title="KInterbasDB Links"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">KInterbasDB v3.3.0 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2009, David Rushby, Pavel Cisar.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.1.
    </div>
  </body>
</html>