mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
gh-92547: Remove deprecated sqlite3 features (#92548)
The following sqlite3 features were deprecated in 3.10, scheduled for removal in 3.12: - sqlite3.OptimizedUnicode (gh-23163) - sqlite3.enable_shared_cache (gh-24008) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Signed-off-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
9b50585e02
commit
00f22e8cc2
8 changed files with 16 additions and 121 deletions
|
@ -82,20 +82,6 @@ def register_adapters_and_converters():
|
|||
|
||||
register_adapters_and_converters()
|
||||
|
||||
# bpo-24464: enable_shared_cache was deprecated in Python 3.10. It's
|
||||
# scheduled for removal in Python 3.12.
|
||||
def enable_shared_cache(enable):
|
||||
from _sqlite3 import enable_shared_cache as _old_enable_shared_cache
|
||||
import warnings
|
||||
msg = (
|
||||
"enable_shared_cache is deprecated and will be removed in Python 3.12. "
|
||||
"Shared cache is strongly discouraged by the SQLite 3 documentation. "
|
||||
"If shared cache must be used, open the database in URI mode using"
|
||||
"the cache=shared query parameter."
|
||||
)
|
||||
warnings.warn(msg, DeprecationWarning, stacklevel=2)
|
||||
return _old_enable_shared_cache(enable)
|
||||
|
||||
# Clean up namespace
|
||||
|
||||
del(register_adapters_and_converters)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue