[ANN] pysqlite 2.5.2

  • Thread starter Gerhard Häring
  • Start date
G

Gerhard Häring

pysqlite 2.5.2 released
=======================

Release focus: minor bugfixes, minor new features.

pysqlite is a DB-API 2.0-compliant database interface for SQLite.

SQLite is a in-process library that implements a self-contained,
serverless, zero-configuration, transactional SQL database
engine.

Go to http://pysqlite.org/ for downloads, online documentation and
for reporting bugs.

Changes
=======

- Like on Connection.rollback(), Connection.commit() now resets
all statements associated to the connection, so that the
commit() should always succeed (unless other connections create
trouble).

- pysqlite used to deliver bogus results on cursors that still
have unfetched data when a rollback() was done on the
connection. A commit() or rollback() now puts the cursor into a
"reset" state. If you try to fetch data after commit() or
rollback() you will now get an InterfaceError exception instead
of bogus data.

- For better DB-API compliance, operations on closed cursors now
raise exceptions.

- Add amalgamation directory to include path when building
statically against amalgamation files.

Otherwise, building against the amalgamation only worked if you
already had the SQLite3 header files in the search path. Like
on my development system ;-)

- Made sure HAVE_LOAD_EXTENSION is not defined twice. Also made
sure that it's OFF if the OMIT macro is defined.

- Fixed check if non-UTF8 strings are acceptable input. The check
was wrong for OptimizedUnicode. Also added the missing tests
for this feature.

- Wrap routine sqlite3_load_extension as method load_extension of
the Connection object.

Compatibility
=============

The fact that commit() and rollback() now reset all associated cursors
changes
the behaviour of pysqlite. Some code that previously worked will now raise
InterfaceError exceptions. OTOH the code did not really *work*, because it
produced wrong results.

In previous pysqlite versions:
insert into t(c) values (2); insert into t(c) values (3);")
[(1,), (1,), (2,), (3,)]

^ ^

!! Notice the duplicate rows with values (1,) !! This code produced
wrong results.


With this release, the last cur.fetchall() will raise an exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pysqlite2.dbapi2.InterfaceError: Cursor needed to be reset because of
commit/rollback and can no longer be fetched from.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top