Skip to content

Commit

Permalink
issue2551343 - Remove support for PySQLite and sqlite v2.
Browse files Browse the repository at this point in the history
It is unmaintained and sqlite3 is used which is the default for a
Python distribution.
  • Loading branch information
rouilj committed Jul 13, 2024
1 parent 6068b47 commit d2f04eb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Roundup 2.4.0 is the last release to support Python 2.
2025-XX-XX 2.5.0

Fixed:
- issue2551343 - Remove support for PySQLite. It is unmaintained and
sqlite3 is used which is the default for a Python distribution.
(John Rouillard)

Features:

Expand Down
15 changes: 14 additions & 1 deletion doc/upgrading.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,20 @@ Contents:
.. contents::
:local:

.. index:: Upgrading; 2.2.0 to 2.3.0
.. index:: Upgrading; 2.4.0 to 2.5.0

Migrating from 2.4.0 to 2.5.0
=============================

Deprecation Notices (info)
--------------------------

Support for SQLite version 2 has been removed in 2.5.0. Support for
the `PySQLite <https://github.com/ghaering/pysqlite>`_ library has
been removed in 2.5.0. Only the Python supplied sqlite3 library will
be supported.

.. index:: Upgrading; 2.3.0 to 2.4.0

Migrating from 2.3.0 to 2.4.0
=============================
Expand Down
2 changes: 1 addition & 1 deletion roundup/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
_modules = {
'mysql': ('MySQLdb',),
'postgresql': ('psycopg2',),
'sqlite': ('pysqlite', 'pysqlite2', 'sqlite3', '_sqlite3', 'sqlite'),
'sqlite': ('sqlite3', '_sqlite3'),
}

def get_backend(name):
Expand Down
9 changes: 1 addition & 8 deletions roundup/backends/back_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,7 @@
import sqlite3 as sqlite
sqlite_version = 3
except ImportError:
try:
from pysqlite2 import dbapi2 as sqlite
if sqlite.version_info < (2, 1, 0):
raise ValueError('pysqlite2 minimum version is 2.1.0+ '
'- %s found' % sqlite.version)
sqlite_version = 2
except ImportError:
raise ValueError("Unable to import sqlite3 or sqlite 2.")
raise ValueError("Unable to import sqlite3.")


def db_exists(config):
Expand Down

0 comments on commit d2f04eb

Please sign in to comment.