If no objections I agree.
On Jun 5, 4:40 am, Markus Gritsch <m.grit...@gmail.com> wrote:
> Hi,
>
> Python 2.5 ships with SQLite. Since the version of this library
> included in Python 2.5 is quite dated now, some users might prefer
> installing a more recent version
> fromhttp://oss.itsystementwicklung.de/trac/pysqlite/
>
> Unfortunately gluon/sql.py tries to import sqlite3 first, so the
> manually installed library does not get used.
>
> * I suggest to reverse the order in which sqlite3 and pysqlite2 is
> tried to be imported to allow the users of web2py to install a more
> recent version of the SQLite library.
>
> Further, I do not see any reason why sqlite3 is appended to the
> drivers variable as 'SQLite3' but pysqlite2 as 'SQLite2'. pysqlite2
> is merely the name of the Python module, not the version number of the
> underlying SQLite library which is of course also SQLite 3.
>
> * I suggest not to distinguish between the two cases whether the
> Library which ships with Python or a manually installed one is used
> and add both as 'SQLite'.
>
> The patch for both changes looks like this:
>
> try:
> from pysqlite2 import dbapi2 as sqlite3
> drivers.append('SQLite')
> except:
> try:
> import sqlite3
> drivers.append('SQLite')
> except:
> logging.debug('no sqlite3 driver')
>
> Kind regards,
> Markus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---