mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-93370: Deprecate sqlite3.version and sqlite3.version_info (#93482)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
f8eae6f5c3
commit
ffc58a9710
7 changed files with 50 additions and 2 deletions
|
@ -55,3 +55,16 @@ The sqlite3 module is written by Gerhard Häring <gh@ghaering.de>.
|
|||
"""
|
||||
|
||||
from sqlite3.dbapi2 import *
|
||||
from sqlite3.dbapi2 import (_deprecated_names,
|
||||
_deprecated_version_info,
|
||||
_deprecated_version)
|
||||
|
||||
|
||||
def __getattr__(name):
|
||||
if name in _deprecated_names:
|
||||
from warnings import warn
|
||||
|
||||
warn(f"{name} is deprecated and will be removed in Python 3.14",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
return globals()[f"_deprecated_{name}"]
|
||||
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue