Issue1682864
Created on 2007-03-17.21:39:30 by dubnerm, last changed 2018-03-23.08:40:14 by jeff.allen.
File name |
Uploaded |
Description |
Edit |
Remove |
_sqlite3.py
|
dubnerm,
2007-03-17.21:39:30
|
Lib/sqlite3/_sqlite3.py |
|
|
msg2691 (view) |
Author: Michael Dubner (dubnerm) |
Date: 2007-03-17.21:39:30 |
|
CPython 2.5 has new package in standard library 'sqlite3'. Here is compatibility module '_sqlite3' implementation using 'javasqlite' [http://www.ch-werner.de/javasqlite/].
|
msg4238 (view) |
Author: Jim Baker (zyasoft) |
Date: 2009-03-12.08:01:38 |
|
Deferred to 2.5.1
|
msg4943 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2009-07-25.23:26:10 |
|
The SQLiteJDBC project came out shortly after this patch was created: http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC
The javasqlite it uses can be painful to install because it requires
compiling its JNI linkages
SQLiteJDBC however works out of the box, it includes pre-compiled shims
for the popular platforms and falls back to the slower NestedVM
emulation on other platforms. It also seems well maintained, however
javasqlite looks to still be maintained too
I would love to see this module tweaked to use SQLiteJDBC instead. This
will require some work however as its api is different from javasqlite's
|
msg8756 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-06-19.16:38:52 |
|
Should revisit, among other things this would support https://bitbucket.org/jython/jython/pull-request/14/for-discussion-changes-to-support-ipython/
Some things to explore here:
* sqlitejava is clearly closer to the underlying SQLite, as a simple wrapper; it's also what Michael Dubner contributed a Python wrapper for.
* Xerial seems to be much more supported, and doesn't have native dependencies for us to consider.
It's pretty clear we need to go with the Xerial solution - we don't have the engineering resources to manage native dependencies.
Note that custom functions (UDFs) can be done with Xerial, https://bitbucket.org/xerial/sqlite-jdbc/src/975459c6e053b850404c04bc4bc3f5e52dcd8686/src/test/java/org/sqlite/UDFTest.java?at=default#cl-47
Likewise, there appears to be support for callback functions as well, by perusing some of the commits. I wasn't able to find any real docs however, so we will have to look at source code to go past JDBC.
|
msg8757 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-06-19.16:41:14 |
|
Probably the best way to do this is develop outside of Jython's development process, much like jyjdbc or Clamp
|
msg8931 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2014-08-19.18:08:15 |
|
There's another option, albeit a distant one for providing sqlite3 -- implementing a cffi backend and providing cffi, which is something we'd like to do anyway. Then we could use PyPy's _sqlite3 impl:
https://bitbucket.org/pypy/pypy/src/8bc429151c06505db6f2393fcd9f35a91971c510/lib_pypy/_sqlite3.py?at=default
|
msg9104 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-10-06.03:44:25 |
|
2.7.1 or later
|
msg10018 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-05-04.16:54:00 |
|
In msg8757, I proposed implementing outside of Jython's development process. However, given that we are planning to move to a 6 month release cycle, this doesn't seem to be so important - when the implementation of sqlite3 is done, we can make it part of the next 2.7.x release.
I also examined Xerial's support for what is required. As far as I can tell, all necessary functionality is implemented, including extension loading. Testing varies in the Python 2.7 test suite - there's no testing at all for extensions (see https://github.com/python/cpython/commit/b53996dead8c6a602d3f4f6c73bdd4573d0e49ef), but most other testing seems to be more than adequate.
|
msg10453 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-11-11.21:21:13 |
|
Moving to 2.7.2 (or later)
|
msg10887 (view) |
Author: Stefan Richthofer (stefan.richthofer) |
Date: 2016-08-01.04:05:36 |
|
Did someone take a look at this repository?
https://github.com/anthonyhendrickson/jython-sqlite3
It's only 3 weeks old, but might be promising.
Also. I was able to do some basic stuff with sqlite3 on Linux using JyNI. Importing works out of the box, creating, a db, cursor, execute simple sql-commands works. Some unittests crash JVM with a segfault (5 or so). If I remove these crashing tests, about 70% of the remaining unittests succeed. So, making this bulletproof would require some serious work. Maybe it would be more valuable to make cffi bulletproof and go the PyPy-path. As of this writing I wouldn't want to go through the failing tests to clean up support. However if one of them should turn out to be crucial for some actual use-case, e.g. to support some dependent framework, let me know: Then I will fix it with priority.
|
msg10888 (view) |
Author: Jim Baker (zyasoft) |
Date: 2016-08-01.09:52:39 |
|
I like https://github.com/anthonyhendrickson/jython-sqlite3 in terms of its packaging, but it doesn't port the sqlite3 module. Instead it makes sqlite3 available as a DBI2 compatible package. So separate goals.
Using JyNI could be a good alternative, but I think this port would be straightforward to Jython. Just requires a bit of time - I'm estimating a solid week of work.
|
|
Date |
User |
Action |
Args |
2018-03-23 08:40:14 | jeff.allen | set | milestone: Jython 2.7.2 -> |
2016-08-01 09:52:39 | zyasoft | set | messages:
+ msg10888 |
2016-08-01 04:05:36 | stefan.richthofer | set | nosy:
+ stefan.richthofer messages:
+ msg10887 |
2015-11-11 21:21:14 | zyasoft | set | messages:
+ msg10453 milestone: Jython 2.7.1 -> Jython 2.7.2 |
2015-05-04 16:54:00 | zyasoft | set | messages:
+ msg10018 |
2015-04-20 23:42:38 | zyasoft | set | title: sqlite3 package (for python2.5 compatibility) -> sqlite3 package versions:
+ Jython 2.7, - Jython 2.5 |
2015-04-20 23:42:26 | zyasoft | set | milestone: Jython 2.7.1 |
2014-10-06 03:44:25 | zyasoft | set | messages:
+ msg9104 |
2014-08-19 18:08:16 | pjenvey | set | messages:
+ msg8931 |
2014-08-18 11:20:11 | pdina | set | nosy:
+ pdina |
2014-06-19 16:41:14 | zyasoft | set | messages:
+ msg8757 |
2014-06-19 16:38:52 | zyasoft | set | messages:
+ msg8756 |
2013-02-25 19:05:11 | fwierzbicki | set | versions:
+ Jython 2.5, - 2.5.1 |
2012-08-10 18:16:25 | fwierzbicki | set | nosy:
+ fwierzbicki |
2012-06-18 18:50:34 | Arfrever | set | nosy:
+ Arfrever |
2010-09-09 05:53:03 | zyasoft | set | assignee: zyasoft -> |
2009-12-17 14:47:28 | pjac | set | nosy:
+ pjac |
2009-07-25 23:26:10 | pjenvey | set | nosy:
+ pjenvey messages:
+ msg4943 |
2009-03-12 08:01:38 | zyasoft | set | priority: normal -> low messages:
+ msg4238 versions:
+ 2.5.1 |
2008-12-15 18:43:24 | fwierzbicki | set | components:
+ Library, - None |
2008-09-14 16:51:18 | zyasoft | set | assignee: zyasoft nosy:
+ zyasoft |
2007-03-17 21:39:30 | dubnerm | create | |
|