Roger Binns | 27 May 2013 09:38

APSW 3.7.17-r1 released


APSW 3.7.17-r1 is now available. The home page is at
http://code.google.com/p/apsw/ which includes full documentation, source
and binary distributions for Windows (Python 2.3 onwards including Python 3).

APSW is a wrapper around SQLite that provides all SQLite API functionality
in Python. It is not DBAPI compliant as it provides SQLite semantics.
pysqlite provides DBAPI semantics. You can see the two approaches
contrasted at http://apidoc.apsw.googlecode.com/hg/pysqlite.html

Changelist is below and a clickable version at
http://apidoc.apsw.googlecode.com/hg/changes.html

Removed tests that checked directly calling VFS read/write with negative
offsets or amounts returns errors. This version of SQLite no longer
returns errors in those circumstances and typically crashes instead.

Various new constants.

Roger
Roger Binns | 15 Apr 2013 02:04

APSW 3.7.16.2-r1 Released


APSW 3.7.16.2-r1 is now available. The home page is at
http://code.google.com/p/apsw/ which includes full documentation, source
and binary distributions for Windows (Python 2.3 onwards including Python 3).

APSW is a wrapper around SQLite that provides all SQLite API functionality
in Python. It is not DBAPI compliant as it provides SQLite semantics.
pysqlite provides DBAPI semantics. You can see the two approaches
contrasted at http://apidoc.apsw.googlecode.com/hg/pysqlite.html

Changelist is below and a clickable version at
http://apidoc.apsw.googlecode.com/hg/changes.html

No APSW changes - just a binary rebuild. Windows users are recommended to
upgrade their SQLite version.

Roger
Roger Binns | 31 Mar 2013 10:46

APSW 3.7.16.1-r1 released


APSW 3.7.16.1-r1 is now available. The home page is at
http://code.google.com/p/apsw/ which includes full documentation, source
and binary distributions for Windows (Python 2.3 onwards including Python 3).

APSW is a wrapper around SQLite that provides all SQLite API functionality
in Python. It is not DBAPI compliant as it provides SQLite semantics.
pysqlite provides DBAPI semantics. You can see the two approaches
contrasted at http://apidoc.apsw.googlecode.com/hg/pysqlite.html

Changelist is below and a clickable version at
http://apidoc.apsw.googlecode.com/hg/changes.html

Updated tables of functions and pragmas in the Shell to match current
SQLite version.

Roger
Roger Binns | 25 Mar 2013 02:16

APSW 3.7.16-r1 released


APSW 3.7.16-r1 is now available. The home page is at
http://code.google.com/p/apsw/ which includes full documentation, source
and binary distributions for Windows (Python 2.3 onwards including Python 3).

APSW is a wrapper around SQLite that provides all SQLite API functionality
in Python. It is not DBAPI compliant as it provides SQLite semantics.
pysqlite provides DBAPI semantics. You can see the two approaches
contrasted at http://apidoc.apsw.googlecode.com/hg/pysqlite.html

Changelist is below and a clickable version at
http://apidoc.apsw.googlecode.com/hg/changes.html

Adjust to different SQLite download URLs

Added SQLITE_CONSTRAINT_* and SQLITE_READONLY_ROLLBACK extended error codes

Removed CouchDB virtual table

Roger
Sriram Karra | 7 Mar 2013 14:06
Picon

Using apsw with pysqlite2 through static bundling of libsqlite3.a?


Roger - with your help I have managed to compile apsw and pysqlite2 with the same shared libsqlite3.dylib shared library. This is fine, except that it presents problems with distribution as it presupposes availability of the shared library at a fixed location.

The constraints of my application are:

a) Developed on Mac but expected to run on Mac and Windows
b) Self-contained with all required non-standard libraries and modules
c) Should not require any installation or super user privilges

How can I bundle up pysqlite2 and apsw such that the all of the above could be achieved? I was trying to explore if we can statically link all of them into a single module. Can you give some pointers on whether that is possible, and if yes how?

-Karra

--
 
---
You received this message because you are subscribed to the Google Groups "python-sqlite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-sqlite+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Sriram Karra | 7 Feb 2013 12:39
Picon

Using pysqlite2 with apsw



I am having a lot of trouble using apsw with pysqlite2. I downloaded the latest versions of both, and built them both against the latest amalgamation of sqlite3. Yet I am having trouble creating a dbapi2 connection on top of a apsw connection. 

Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysqlite2 import dbapi2 as sqlite3
>>> print sqlite3.sqlite_version
3.7.15.2
>>> import apsw
>>> print apsw.sqlitelibversion()
3.7.15.2
>>> apsw_con = apsw.Connection(":memory:")
>>> apsw_con.createscalarfunction("times_two", lambda x: 2*x, 1)
>>> con = sqlite3.connect(apsw_con)
Segmentation fault: 11

As you can see the sqlite version is the same. I read in the docs that apsw and pysqlite have to be build against the same sqlite dynamic library. So I began to wonder if compiling them separately against the same verstion but different physical instances of the sqlite3.c file could be the problem. Then again, I could not find way of (a) building a standalone sqlite3.so and (b) an option in the build scripts of either apsw or pysqlite to use an external shared library for sqlite3. Can someone please help with this problem?

Thanks
Sriram

--
 
---
You received this message because you are subscribed to the Google Groups "python-sqlite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-sqlite+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
mrtnlstr | 27 Jan 2013 19:45
Picon

pysqlite connection


Hi, i'm new to sqlite and pysqlite, and have a simple question: is a connection in pysqlite persistent? in other words, if i make a connection to the db, and do nothing, would that connection be dropped after a period of idleness? Some other dbs may enforce a timeout option on connections, which drops idle connections periodically.

--
 
 
 
Roger Binns | 16 Jan 2013 23:00

APSW 3.7.15.2-r1 released


APSW 3.7.15.2-r1 is now available. The home page is at
http://code.google.com/p/apsw/ which includes full documentation, source
and binary distributions for Windows (Python 2.3 onwards including Python 3).

APSW is a wrapper around SQLite that provides all SQLite API functionality
in Python. It is not DBAPI compliant as it provides SQLite semantics.
pysqlite provides DBAPI semantics. You can see the two approaches
contrasted at http://apidoc.apsw.googlecode.com/hg/pysqlite.html

Changelist is below and a clickable version at
http://apidoc.apsw.googlecode.com/hg/changes.html

No changes - SQLite version bump

Roger
Roger Binns | 22 Dec 2012 20:26

APSW 3.7.15.1-r1 released


APSW 3.7.15.1-r1 is now available. The home page is at
http://code.google.com/p/apsw/ which includes full documentation, source
and binary distributions for Windows (Python 2.3 onwards including Python 3).

APSW is a wrapper around SQLite that provides all SQLite API functionality
in Python. It is not DBAPI compliant as it provides SQLite semantics.
pysqlite provides DBAPI semantics. You can see the two approaches
contrasted at http://apidoc.apsw.googlecode.com/hg/pysqlite.html

Changelist is below and a clickable version at
http://apidoc.apsw.googlecode.com/hg/changes.html

Bump for new SQLite version

Use https (SSL) for SQLite web site references (downloads and
documentation links). On some platforms/versions/SSL libraries, Python’s
SSL module doesn’t work with the SQLite website so a fallback to http is
used - the downloads still have their checksum verified.

Roger
Roger Binns | 16 Dec 2012 10:21

APSW 3.7.15-r1 Released


APSW 3.7.15-r1 is now available. The home page is at
http://code.google.com/p/apsw/ which includes full documentation, source
and binary distributions for Windows (Python 2.3 onwards including Python 3).

APSW is a wrapper around SQLite that provides all SQLite API functionality
in Python. It is not DBAPI compliant as it provides SQLite semantics.
pysqlite provides DBAPI semantics. You can see the two approaches
contrasted at http://apidoc.apsw.googlecode.com/hg/pysqlite.html

Changelist is below and a clickable version at
http://apidoc.apsw.googlecode.com/hg/changes.html

Work around changed semantics for error handling when the VFS xDelete
method is asked to delete a file that does not exist.

Completely removed all AsyncVFS related code. This extension is no longer
maintained nor supported by the SQLite team. WAL is a good way of getting
similar functionality.

Added config() support for SQLITE_CONFIG_COVERING_INDEX_SCAN.

Added several new constants: SQLITE_CONFIG_COVERING_INDEX_SCAN,
SQLITE_CONFIG_SQLLOG, SQLITE_FCNTL_BUSYHANDLER, SQLITE_FCNTL_TEMPFILENAME,
SQLITE_CANTOPEN_FULLPATH, SQLITE_IOERR_DELETE_NOENT

Roger
Patrick Olsen | 26 Nov 2012 14:43
Picon

Linux issues: pysqlite2.dbapi2.DatabaseError: file is encrypted or is not a database

I'm having some issues with Firefox and pysqlite2. Both versions are running Python 2.7 from what I can tell.

If I run this on Linux:

$ python firefox.py -d /home/<username>/Desktop/ -b Firefox -p bookmark
Traceback (most recent call last):
  File "barff_0_rev3_firefox.py", line 241, in <module>
    main()
  File "barff_0_rev3_firefox.py", line 237, in main
    bookmark = browser.get_bookmarks()
  File "barff_0_rev3_firefox.py", line 154, in get_bookmarks
    cursor.execute('SELECT datetime(moz_bookmarks.dateAdded/1000000, \'unixepoch\') AS \'Date Added\', moz_bookmarks.title AS \'Title\', moz_places.url AS \'URL\', moz_places.visit_count AS \'Count\' FROM moz_bookmarks, moz_places WHERE moz_places.id = moz_bookmarks.fk ORDER BY moz_bookmarks.dateAdded ASC')

If I run it on Windows:

>firefox.py -b Firefox -d C:\Users\<username>\Desktop -p bookmark
2012-11-22 20:58:53 | Getting Started | http://www.mozilla.com/en-US/firefox/central/ | 0
2012-11-22 20:58:53 | Help and Tutorials | http://www.mozilla.com/en-US/firefox/help/ | 0
2012-11-22 20:58:53 | Customize Firefox | http://www.mozilla.com/en-US/firefox/customize/ | 0
2012-11-22 20:58:53 | Get Involved | http://www.mozilla.com/en-US/firefox/community/ | 0

Here is the code doing the parsing:

# Firefox browser class    
class Firefox(browserCommon):
    def __init__(self, profile_directory):
        browserCommon.__init__(self, profile_directory)
        
    def get_bookmarks(self):
        res = []
        (conn, cursor) = self.get_conn_cursor('places.sqlite')
        cursor.execute('SELECT datetime(moz_bookmarks.dateAdded/1000000, \'unixepoch\') AS \'Date Added\', moz_bookmarks.title AS \'Title\', moz_places.url AS \'URL\', moz_places.visit_count AS \'Count\' FROM moz_bookmarks, moz_places WHERE moz_places.id =      moz_bookmarks.fk ORDER BY moz_bookmarks.dateAdded ASC')
        for (dateAdded, title, url, visit_count) in cursor.fetchall():
            res.append(bookmarksEntry(dateAdded, title, url, visit_count))
        return res

Program Imports:

import datetime, time
import sys, getopt, os
from cStringIO import StringIO
from pysqlite2 import dbapi2 as sqlite
from django.utils.encoding import smart_str

Gmane