Skip to content

Commit d16f617

Browse files
author
Erlend Egeberg Aasland
authored
bpo-24464: Fix sqlite3.enable_shared_cache() deprecation wrapper (GH-24170)
1 parent 0e2a0f7 commit d16f617

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Lib/sqlite3/dbapi2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def enable_shared_cache(enable):
9696
"the cache=shared query parameter."
9797
)
9898
warnings.warn(msg, DeprecationWarning, stacklevel=2)
99-
return _old_enable_shared_cache
99+
return _old_enable_shared_cache(enable)
100100

101101
# Clean up namespace
102102

Lib/sqlite3/test/dbapi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import threading
2424
import unittest
2525
import sqlite3 as sqlite
26+
import sys
2627

2728
from test.support.os_helper import TESTFN, unlink
2829

@@ -82,6 +83,9 @@ def test_not_supported_error(self):
8283
sqlite.DatabaseError),
8384
"NotSupportedError is not a subclass of DatabaseError")
8485

86+
# sqlite3_enable_shared_cache() is deprecated on macOS and calling it may raise
87+
# OperationalError on some buildbots.
88+
@unittest.skipIf(sys.platform == "darwin", "shared cache is deprecated on macOS")
8589
def test_shared_cache_deprecated(self):
8690
for enable in (True, False):
8791
with self.assertWarns(DeprecationWarning) as cm:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy