The sqlite3.version and sqlite3.version_info attributes have historically created some confusion, as they are sometimes mistaken for the SQLite 3 version number. They used to reflect the pysqlite1 version number, until the external pysqlite package stopped upstreaming changes to the stdlib sqlite3 module2, but today they carry no meaning or practical value3.
In order to avoid future frustration, I suggest to deprecate sqlite3.version and sqlite3.version_info in 3.12, and remove them in 3.14.
Activity
serhiy-storchaka commented on May 31, 2022
But it would be nice to expose the Sqlite 3 version number. What do you think?
erlend-aasland commented on Jun 1, 2022
We already do :) sqlite3.sqlite_version and sqlite3.sqlite_version_info
subramaniam02 commented on Jun 3, 2022
Not sure what is the process. But I am interested to work on this.
erlend-aasland commented on Jun 5, 2022
Sorry for the late reply. Looks like there is already a PR up, however there are probably more deprecations coming up in the 3.12 dev phase :)
subramaniam02 commented on Jun 6, 2022
Ok Thank you !
gh-93370: Deprecate sqlite3.version and sqlite3.version_info (#93482)
3 remaining items
erlend-aasland commented on Jun 25, 2022
Reopening as pythoninfo.py was not updated to catch the deprecation warning. Excerpt from https://github.com/python/cpython/runs/7056328858?check_suite_focus=true:
pythongh-93370: Catch sqlite3.version deprecation warning in pythonin…
Revert 30935 defer bpo45162 to 312 (#94285)
gh-93370: Drop deprecated sqlite3.version from pythoninfo.py (#94277)
erlend-aasland commented on Jun 27, 2022
Remaining issue resolved by #94277.
erlend-aasland commented on Jul 19, 2022
There's a remaining use in Lib/test/test_sqlite3/__init__.py
pythongh-93370: Don't print deprecated pysqlite version in test_sqlite3
gh-93370: Don't print deprecated pysqlite version in test_sqlite3 (#9…
pythongh-93370: Don't print deprecated pysqlite version in test_sqlit…