mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-07 05:54:02 +08:00
[sqlite3] Deprecate enable_shared_cache from dbapi2 (#14501)
This commit is contained in:
@@ -67,6 +67,7 @@ from sqlite3 import (
|
||||
Warning as Warning,
|
||||
)
|
||||
from typing import Final, Literal
|
||||
from typing_extensions import deprecated
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
from _sqlite3 import (
|
||||
@@ -216,6 +217,10 @@ if sys.version_info < (3, 14):
|
||||
if sys.version_info < (3, 12):
|
||||
if sys.version_info >= (3, 10):
|
||||
# deprecation wrapper that has a different name for the argument...
|
||||
@deprecated(
|
||||
"Deprecated since Python 3.10; removed in Python 3.12. "
|
||||
"Open database in URI mode using `cache=shared` parameter instead."
|
||||
)
|
||||
def enable_shared_cache(enable: int) -> None: ...
|
||||
else:
|
||||
from _sqlite3 import enable_shared_cache as enable_shared_cache
|
||||
|
||||
Reference in New Issue
Block a user