Issue 13445: Enable linking the module pysqlite with Berkeley DB SQL instead of SQLite (original) (raw)

Created on 2011-11-21 16:55 by Lauren.Foutz, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
msg148058 - (view) Author: Lauren Foutz (Lauren.Foutz) Date: 2011-11-21 16:55
Before the pysqlite module was made standard it could be edited to link with Berkeley DB SQL instead of SQLite. I am requesting that the Python build add the ability to link with BDBSQL instead of SQLite.
msg148059 - (view) Author: Lauren Foutz (Lauren.Foutz) Date: 2011-11-21 16:58
Before the pysqlite module was made standard it could be edited to link with Berkeley DB SQL instead of SQLite. I am requesting that the Python build add the ability to link with BDBSQL instead of SQLite. Below is a description of how to link pysqlite with BDBSQL Download and unpack the latest version of pysqlite. Download and unpack the latest release of Berkeley Db (at least db-5.0 or higher). Build bdb using the following: cd db/build_unix ../dist/configure --enable-sql-compat --prefix= make make install Next change to the top pysqlite directory. There edit the file setup.cfg to the following: [build_ext] #define= include_dirs=/include library_dirs=/lib libraries=sqlite3 define=SQLITE_OMIT_LOAD_EXTENSION Note, make sure you uncomment the lines with "include_dirs" and "library_dirs" Next, build and install the python sqlite3 library using: python setup.py build python setup.py install
msg148089 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-11-21 21:16
Support for Berkeley DB (the bsddb) was removed from the standard library in Python 3 and replaced by a third-party module (bsddb3) listed in PyPI which is better able to keep up with changes in the various BDB releases. http://docs.python.org/py3k/whatsnew/3.0.html#library-changes http://pypi.python.org/pypi/bsddb3/ What would be the reason for bringing back a dependency on BDB into the standard library? Wouldn't this better be handled in the standalone pysqlite package?
msg148091 - (view) Author: Lauren Foutz (Lauren.Foutz) Date: 2011-11-21 21:31
Berkeley DB SQL is a separate library from Berkeley DB. It is an SQL engine that uses the same API as SQLite and uses Berkeley DB as its backend. The modules that support Berkeley DB lack all of the SQL features and cannot be used to operate on a Berkeley DB SQL databases.
msg152500 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-02-03 09:17
Is it possible to compile pysqlite so that it links with both, or so that the linking type can be changed at run time? I'm -1 on adding a compile-time option to switch the storage backend to Python itself, but a runtime flag or a separate connection class for the sqlite3 module would do.
msg161370 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-05-22 18:49
Still waiting for the info about whether this can be done at run-time.
msg161374 - (view) Author: Lauren Foutz (Lauren.Foutz) Date: 2012-05-22 19:13
It is not possible to compile pysqlite to link with both, and even if it was it would not be a good idea, since databases created by bdbsql cannot be accessed by sqlite, and visa versa. Because of the incompatibility I think a runtime flag would lead to a lot of user error, but a separate connection class in the sqlite3 module might work, but because the libraries share the same external functions, linking them both with the python library will be difficult if not impossible. Lauren On Fri, Feb 3, 2012 at 4:17 AM, Petri Lehtinen <report@bugs.python.org>wrote: > > Petri Lehtinen <petri@digip.org> added the comment: > > Is it possible to compile pysqlite so that it links with both, or so that > the linking type can be changed at run time? > > I'm -1 on adding a compile-time option to switch the storage backend to > Python itself, but a runtime flag or a separate connection class for the > sqlite3 module would do. > > ---------- > nosy: +petri.lehtinen > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue13445> > _______________________________________ >
msg161444 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-05-23 18:05
Ok. Closing as wontfix then.
History
Date User Action Args
2022-04-11 14:57:24 admin set github: 57654
2012-05-23 18:05:06 petri.lehtinen set status: open -> closedresolution: wont fixmessages: + stage: resolved
2012-05-22 19:13:10 Lauren.Foutz set status: pending -> openmessages: +
2012-05-22 18:49:17 petri.lehtinen set status: open -> pendingmessages: +
2012-02-03 09:17:34 petri.lehtinen set nosy: + petri.lehtinenmessages: +
2011-11-21 21:31:19 Lauren.Foutz set messages: +
2011-11-21 21:16:14 ned.deily set nosy: + jcea, ned.deilymessages: +
2011-11-21 20:12:08 eric.snow set nosy: + eric.snow
2011-11-21 16:58:56 pitrou set nosy: + ghaeringversions: + Python 3.3
2011-11-21 16:58:37 Lauren.Foutz set messages: +
2011-11-21 16:55:14 Lauren.Foutz create