3 ms·
json1 [1] is basically part of SQLite3 those days and I don't see the -DSQLITE_OMIT_JSON flag on this code. I find the choice of building and bundling yet-anot
by ElectricalUnion 3y ago
json1 [1] is basically part of SQLite3 those days and I don't see the -DSQLITE_OMIT_JSON flag on this code.
I find the choice of building and bundling yet-another-thing that specifically is already "there" (not sure if by mistake or intentionally) on a minimalist system very strange.
I also trust things in the SQLite3 codebase way more that my own code.
[1] https://www.sqlite.org/json1.html https://www.sqlite.org/json1.html
- fbdab103 3y agoA fun new feature is that Python 3.12 now includes a command line switch to call SQLite directly: `python -m sqlite3` https://docs.python.org/dev/library/sqlite3.html#sqlite3-cli https://docs.python.org/dev/library/sqlite3.html#sqlite3-cli
- vsnf 3y agoMy knowledge of SQLite features kind of got frozen in time when I stopped doing python work as frequently as I used to a few years ago. I recall lamenting that I couldn't use their fancy new features because I was more or less constrained to whatever version Python bundled for its default. Can I now trust modern python installations to have native-json enabled sqlite built in?
- dragonwriter 3y ago> My knowledge of SQLite features kind of got frozen in time when I stopped doing python work as frequently as I used to a few years ago. I recall lamenting that I couldn't use their fancy new features because I was more or less constrained to whatever version Python bundled for its default. Python uses an SQLite3 shared library, all you need to do to upgrade the SQLite3 engine is replace the shared library (.DLL on windows, .so.0 or something like that on Linux). You've never been locked into a version of the SQLite engine (well, if SQLite4 came out, you'd probably have to wait for Python to support that instead of only SQLite3, but...) > Can I now trust modern python installations to have native-json enabled sqlite built in? JSON has been compiled in by default since 3.38, my Python 3.10 installation (3.12 is current python) has 3.40 bundled, so, depending on what you mean by "modern" that seems reasonably safe (but, again, you aren't limited by what is bundled.) OTOH, the JSON5 support is only from 3.42 onward, so even reasonably modern Python might not have that built in.
- lifthrasiir 3y ago> Can I now trust modern python installations to have native-json enabled sqlite built in? There is no absolute guarantee because distros can use any supported SQLite version to build Python (though Debian [1] and thus Ubuntu has long enabled -DSQLITE_ENABLE_JSON1), but you can expect that any Python version released shortly after 2022-03-16 [2] supports JSON functions in the Windows and macOS builds. [1] https://sources.debian.org/src/sqlite3/3.16.2-5%2Bdeb9u1/debian/rules/#L41 https://sources.debian.org/src/sqlite3/3.16.2-5%2Bdeb9u1/deb... [2] https://github.com/python/cpython/pull/31655 https://github.com/python/cpython/pull/31655