Skip to content

Deprecate sqlite3.version and sqlite3.version_info #93370

Description

@erlend-aasland

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.

See also discussion on Discourse

Footnotes

  1. The sqlite3 stdlib module was forked off of the external pysqlite module around 2005. ↩

  2. Somewhere around 2015, IIRC. ↩

  3. sqlite3.version is set to the value '2.6.0', and sqlite3.version_info is set to the value (2, 6, 0). ↩

Activity

  1. moved this to TODO: Feature in sqlite3 issueson May 31, 2022
  2. moved this from TODO: Feature to Backwards compatibility issues in sqlite3 issueson May 31, 2022
  3. moved this from Backwards compatibility issues to TODO: Feature in sqlite3 issueson May 31, 2022
  4. serhiy-storchaka commented on May 31, 2022

    @serhiy-storchaka
    Member

    But it would be nice to expose the Sqlite 3 version number. What do you think?

  5. erlend-aasland commented on Jun 1, 2022

    @erlend-aasland
    ContributorAuthor

    But it would be nice to expose the Sqlite 3 version number. What do you think?

    We already do :) sqlite3.sqlite_version and sqlite3.sqlite_version_info

  6. subramaniam02 commented on Jun 3, 2022

    @subramaniam02

    Not sure what is the process. But I am interested to work on this.

  7. moved this from TODO: Feature to In Progress in sqlite3 issueson Jun 5, 2022
  8. erlend-aasland commented on Jun 5, 2022

    @erlend-aasland
    ContributorAuthor

    Not sure what is the process. But I am interested to work on this.

    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 :)

  9. subramaniam02 commented on Jun 6, 2022

    @subramaniam02

    Not sure what is the process. But I am interested to work on this.

    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 :)

    Ok Thank you !

  10. added a commit that references this issue on Jun 7, 2022
  11. 3 remaining items

  12. Repository owner moved this from In Progress to Done in sqlite3 issueson Jun 7, 2022
  13. erlend-aasland commented on Jun 25, 2022

    @erlend-aasland
    ContributorAuthor

    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:

    /Users/runner/work/cpython/cpython/Lib/test/pythoninfo.py:55: DeprecationWarning: version is deprecated and will be removed in Python 3.14
    
  14. added a commit that references this issue on Jun 25, 2022
  15. added a commit that references this issue on Jun 26, 2022
  16. erlend-aasland commented on Jun 27, 2022

    @erlend-aasland
    ContributorAuthor

    Remaining issue resolved by #94277.

  17. erlend-aasland commented on Jul 19, 2022

    @erlend-aasland
    ContributorAuthor

    There's a remaining use in Lib/test/test_sqlite3/__init__.py

  18. added a commit that references this issue on Jul 19, 2022
  19. added a commit that references this issue on Jul 19, 2022
  20. added a commit that references this issue on Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions