gh-118924: Remove sqlite3.version and sqlite3.version_info (#118925)

This commit is contained in:
Hugo van Kemenade 2024-05-10 23:42:34 +03:00 committed by GitHub
parent b309c8ebff
commit a019347947
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 36 additions and 74 deletions

View file

@ -48,17 +48,6 @@ class ModuleTests(unittest.TestCase):
self.assertEqual(sqlite.apilevel, "2.0",
"apilevel is %s, should be 2.0" % sqlite.apilevel)
def test_deprecated_version(self):
msg = "deprecated and will be removed in Python 3.14"
for attr in "version", "version_info":
with self.subTest(attr=attr):
with self.assertWarnsRegex(DeprecationWarning, msg) as cm:
getattr(sqlite, attr)
self.assertEqual(cm.filename, __file__)
with self.assertWarnsRegex(DeprecationWarning, msg) as cm:
getattr(sqlite.dbapi2, attr)
self.assertEqual(cm.filename, __file__)
def test_thread_safety(self):
self.assertIn(sqlite.threadsafety, {0, 1, 3},
"threadsafety is %d, should be 0, 1 or 3" %