Python Glossary Русский

all Python 3until 3.14sqlite3term

sqlite3.version

removed

The version of the sqlite3 module itself, not of the SQLite library. Removed in Python 3.14 — use sqlite3.sqlite_version.

Syntax

sqlite3.version  # до 3.14

The string '2.6.0' was the version of the pysqlite wrapper the module grew out of and had not changed for years; people mistook it for the SQLite version and drew wrong conclusions about available features. That is why it was removed. To migrate, replace sqlite3.version with sqlite3.sqlite_version, the version of the SQLite library Python actually uses, e.g. '3.45.1'. Compare versions with the sqlite3.sqlite_version_info tuple.

Examples

# Python 3.14+
import sqlite3
try:
    sqlite3.version
except AttributeError as e:
    print(type(e).__name__)  # → AttributeError
# Python 3.14+
import sqlite3
print(type(sqlite3.sqlite_version).__name__)  # → str
parts = '.'.join(map(str, sqlite3.sqlite_version_info))
print(parts == sqlite3.sqlite_version)  # → True
import sqlite3
print(sqlite3.version)  # → 2.6.0

See also

Common errors

Open in the full glossarydocs.python.orgReport an inaccuracy