diff options
author | wiz <wiz@pkgsrc.org> | 2008-09-06 16:12:44 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2008-09-06 16:12:44 +0000 |
commit | 92208d78bfac5d4111cef86ddd186d3bc14b4486 (patch) | |
tree | 38cbc451638aec7a04ec6b80f0688f988f67bf2a /databases/py-sqlite2 | |
parent | 347711d3643599777df94352259760ce10f5feb9 (diff) | |
download | pkgsrc-92208d78bfac5d4111cef86ddd186d3bc14b4486.tar.gz |
Found a new homepage, and an even newer version, including changelogs:
2.5.0:
- Windows binaries are now cross-built using mingw on Linux
- import various fixes from Python 2.6 version
- Connection has new method iterdump() that allows you to create a script file
that can be used to clone a database
- the docs are now built using Sphinx and were imported from Python 2.6's
sqlite3 module
- Connection.enable_load_extension(enabled) to allow/disallow extension
loading. Allows you to use fulltext search extension, for example ;-)
- Give the remaining C functions used in multiple .c source files the pysqlite_
prefix.
- Release GIL during sqlite3_prepare() calls for better concurrency.
- Automatically download the SQLite amalgamation when building statically.
2.4.1:
- Made unicode strings for the database parameter in connect() work again
- Removed bad defaults from setup.cfg
2.4.0:
- Implemented context managers. pysqlite's connections can now be used as
context managers with Python 2.5 or later:
from __future__ import with_statement
from pysqlite2 import dbapi2 as sqlite
con = sqlite.connect(":memory:")
con.execute("create table person (id integer primary key, firstname varchar unique)")
# Successful, con.commit() is called automatically afterwards
with con:
con.execute("insert into person(firstname) values (?)", ("Joe",))
# con.rollback() is called after the with block finishes with an exception, the
# exception is still raised and must be catched
try:
with con:
con.execute("insert into person(firstname) values (?)", ("Joe",))
except sqlite.IntegrityError:
print "couldn't add Joe twice"
- pysqlite connections can now be created from APSW connections. This enables
users to use APSW functionality in applications using the DB-API from
pysqlite:
from pysqlite2 import dbapi2 as sqlite
import apsw
apsw_con = apsw.Connection(":memory:")
apsw_con.createscalarfunction("times_two", lambda x: 2*x, 1)
# Create pysqlite connection from APSW connection
con = sqlite.connect(apsw_con)
result = con.execute("select times_two(15)").fetchone()[0]
assert result == 30
con.close()
Caveat: This will only work if both pysqlite and APSW are dynamically
linked against the same SQLite shared library. Otherwise you will
experience a segfault.
- Fixed shuffled docstrings for fetchXXX methods.
- Workaround for SQLite 3.5.x versions which apparently return NULL for
"no-operation" statements.
- Disable the test for rollback detection on old SQLite versions. This prevents
test failures on systems that ship outdated SQLite libraries like MacOS X.
- Implemented set_progress_handler for progress callbacks from SQLite. This is
particularly useful to update GUIs during long-running queries. Thanks to
exarkun for the original patch.
Diffstat (limited to 'databases/py-sqlite2')
-rw-r--r-- | databases/py-sqlite2/Makefile | 10 | ||||
-rw-r--r-- | databases/py-sqlite2/PLIST | 8 | ||||
-rw-r--r-- | databases/py-sqlite2/distinfo | 8 |
3 files changed, 16 insertions, 10 deletions
diff --git a/databases/py-sqlite2/Makefile b/databases/py-sqlite2/Makefile index 0b67f4d1489..e1ba7388ac3 100644 --- a/databases/py-sqlite2/Makefile +++ b/databases/py-sqlite2/Makefile @@ -1,12 +1,12 @@ -# $NetBSD: Makefile,v 1.12 2008/09/06 16:03:09 wiz Exp $ +# $NetBSD: Makefile,v 1.13 2008/09/06 16:12:44 wiz Exp $ -DISTNAME= pysqlite-2.4.1 -PKGNAME= ${PYPKGPREFIX}-sqlite2-2.4.1 +DISTNAME= pysqlite-2.5.0 +PKGNAME= ${PYPKGPREFIX}-sqlite2-2.5.0 CATEGORIES= databases python -MASTER_SITES= http://initd.org/pub/software/pysqlite/releases/2.4/2.4.1/ +MASTER_SITES= http://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.0/ MAINTAINER= tsarna@NetBSD.org -HOMEPAGE= http://initd.org/tracker/pysqlite +HOMEPAGE= http://pysqlite.org/ COMMENT= SQLite database adapter for Python PKG_DESTDIR_SUPPORT= user-destdir diff --git a/databases/py-sqlite2/PLIST b/databases/py-sqlite2/PLIST index 18de101d6a0..26a8f9682fb 100644 --- a/databases/py-sqlite2/PLIST +++ b/databases/py-sqlite2/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 2008/09/06 16:03:09 wiz Exp $ +@comment $NetBSD: PLIST,v 1.4 2008/09/06 16:12:44 wiz Exp $ ${PYSITELIB}/pysqlite2/__init__.py ${PYSITELIB}/pysqlite2/__init__.pyc ${PYSITELIB}/pysqlite2/__init__.pyo @@ -6,12 +6,18 @@ ${PYSITELIB}/pysqlite2/_sqlite.so ${PYSITELIB}/pysqlite2/dbapi2.py ${PYSITELIB}/pysqlite2/dbapi2.pyc ${PYSITELIB}/pysqlite2/dbapi2.pyo +${PYSITELIB}/pysqlite2/dump.py +${PYSITELIB}/pysqlite2/dump.pyc +${PYSITELIB}/pysqlite2/dump.pyo ${PYSITELIB}/pysqlite2/test/__init__.py ${PYSITELIB}/pysqlite2/test/__init__.pyc ${PYSITELIB}/pysqlite2/test/__init__.pyo ${PYSITELIB}/pysqlite2/test/dbapi.py ${PYSITELIB}/pysqlite2/test/dbapi.pyc ${PYSITELIB}/pysqlite2/test/dbapi.pyo +${PYSITELIB}/pysqlite2/test/dump.py +${PYSITELIB}/pysqlite2/test/dump.pyc +${PYSITELIB}/pysqlite2/test/dump.pyo ${PYSITELIB}/pysqlite2/test/factory.py ${PYSITELIB}/pysqlite2/test/factory.pyc ${PYSITELIB}/pysqlite2/test/factory.pyo diff --git a/databases/py-sqlite2/distinfo b/databases/py-sqlite2/distinfo index c89821ef3a4..51ec5ee6d4a 100644 --- a/databases/py-sqlite2/distinfo +++ b/databases/py-sqlite2/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.5 2008/09/06 16:03:09 wiz Exp $ +$NetBSD: distinfo,v 1.6 2008/09/06 16:12:44 wiz Exp $ -SHA1 (pysqlite-2.4.1.tar.gz) = 03d2c52c65e017e657d852c0583aa39bb6563a73 -RMD160 (pysqlite-2.4.1.tar.gz) = 693f4d789388ef0456449d01b0d342aaf1990832 -Size (pysqlite-2.4.1.tar.gz) = 84996 bytes +SHA1 (pysqlite-2.5.0.tar.gz) = 37234af4996a42e08db1f8d1fdd7999b2dcb912c +RMD160 (pysqlite-2.5.0.tar.gz) = 08c3342706992c3f4b5ec63182beb2b1cbf46d52 +Size (pysqlite-2.5.0.tar.gz) = 56644 bytes SHA1 (patch-aa) = b9804c6a35f591b0f7b3f72efccbe9e3327469d1 |