mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-118924: Remove sqlite3.version
and sqlite3.version_info
(#118925)
This commit is contained in:
parent
b309c8ebff
commit
a019347947
9 changed files with 36 additions and 74 deletions
|
@ -25,9 +25,6 @@ import time
|
|||
import collections.abc
|
||||
|
||||
from _sqlite3 import *
|
||||
from _sqlite3 import _deprecated_version
|
||||
|
||||
_deprecated_names = frozenset({"version", "version_info"})
|
||||
|
||||
paramstyle = "qmark"
|
||||
|
||||
|
@ -48,7 +45,7 @@ def TimeFromTicks(ticks):
|
|||
def TimestampFromTicks(ticks):
|
||||
return Timestamp(*time.localtime(ticks)[:6])
|
||||
|
||||
_deprecated_version_info = tuple(map(int, _deprecated_version.split(".")))
|
||||
|
||||
sqlite_version_info = tuple([int(x) for x in sqlite_version.split(".")])
|
||||
|
||||
Binary = memoryview
|
||||
|
@ -97,12 +94,3 @@ register_adapters_and_converters()
|
|||
# Clean up namespace
|
||||
|
||||
del(register_adapters_and_converters)
|
||||
|
||||
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