"the cache=shared query parameter."
)
warnings.warn(msg, DeprecationWarning, stacklevel=2)
- return _old_enable_shared_cache
+ return _old_enable_shared_cache(enable)
# Clean up namespace
import threading
import unittest
import sqlite3 as sqlite
+import sys
from test.support.os_helper import TESTFN, unlink
sqlite.DatabaseError),
"NotSupportedError is not a subclass of DatabaseError")
+ # sqlite3_enable_shared_cache() is deprecated on macOS and calling it may raise
+ # OperationalError on some buildbots.
+ @unittest.skipIf(sys.platform == "darwin", "shared cache is deprecated on macOS")
def test_shared_cache_deprecated(self):
for enable in (True, False):
with self.assertWarns(DeprecationWarning) as cm: