diff options
author | Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> | 2024-05-10 20:42:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-10 20:42:34 (GMT) |
commit | a0193479475a047b223f64130867a63b672c8dc2 (patch) | |
tree | b88cb5bb5699757b9697bae11db8cd8e6a394120 /Lib/sqlite3 | |
parent | b309c8ebff011f27012367b046ff92eecbdd68a5 (diff) | |
download | cpython-a0193479475a047b223f64130867a63b672c8dc2.zip cpython-a0193479475a047b223f64130867a63b672c8dc2.tar.gz cpython-a0193479475a047b223f64130867a63b672c8dc2.tar.bz2 |
gh-118924: Remove `sqlite3.version` and `sqlite3.version_info` (#118925)
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r-- | Lib/sqlite3/__init__.py | 13 | ||||
-rw-r--r-- | Lib/sqlite3/dbapi2.py | 14 |
2 files changed, 1 insertions, 26 deletions
diff --git a/Lib/sqlite3/__init__.py b/Lib/sqlite3/__init__.py index 927267c..34a9c04 100644 --- a/Lib/sqlite3/__init__.py +++ b/Lib/sqlite3/__init__.py @@ -55,16 +55,3 @@ 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}") diff --git a/Lib/sqlite3/dbapi2.py b/Lib/sqlite3/dbapi2.py index 56fc046..0315760 100644 --- a/Lib/sqlite3/dbapi2.py +++ b/Lib/sqlite3/dbapi2.py @@ -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}") |