Drop support for SQLite < 3.7

Both Ubuntu 18.04 [1] and CentOS 8 [2] provide sufficiently new versions
of SQLite that make this check unnecessary now.

[1] https://packages.ubuntu.com/bionic/sqlite3
[2] http://mirror.centos.org/centos/7/os/x86_64/Packages/

Change-Id: Ib2e267eb1ac5ef4da711b6f5bccc5eccfb4b6954
This commit is contained in:
wu.shiming 2021-09-18 10:16:11 +08:00
parent 4892988491
commit 3d204f5f13
2 changed files with 0 additions and 15 deletions

View File

@ -2098,15 +2098,6 @@ class DBPurgeTests(test_utils.BaseTestCase):
dialect = engine.url.get_dialect()
if dialect == sqlite.dialect:
# We're seeing issues with foreign key support in SQLite 3.6.20
# SQLAlchemy doesn't support it at all with SQLite < 3.6.19
# It works fine in SQLite 3.7.
# So return early to skip this test if running SQLite < 3.7
if test_utils.is_sqlite_version_prior_to(3, 7):
self.skipTest(
'sqlite version too old for reliable SQLA foreign_keys')
# This is required for enforcing Foreign Key Constraint
# in SQLite 3.x
connection.execute("PRAGMA foreign_keys = ON")
images = sqlalchemyutils.get_table(

View File

@ -700,12 +700,6 @@ def db_sync(version='heads', engine=None):
alembic_command.upgrade(alembic_config, version)
def is_sqlite_version_prior_to(major, minor):
import sqlite3
tup = sqlite3.sqlite_version_info
return tup[0] < major or (tup[0] == major and tup[1] < minor)
def start_standalone_http_server():
def _get_http_handler_class():
class StaticHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):