aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sqlite3/test_factory.py
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@protonmail.com>2022-05-16 19:52:08 +0200
committerGitHub <noreply@github.com>2022-05-16 19:52:08 +0200
commit00f22e8cc234aa52ec1f28094a170d7b87d0d08f (patch)
treea59310dd786b5de47629857f039bff45ee4c2232 /Lib/test/test_sqlite3/test_factory.py
parent9b50585e0225a80f9e383edacc7d73f1b5c8008b (diff)
downloadcpython-00f22e8cc234aa52ec1f28094a170d7b87d0d08f.tar.gz
cpython-00f22e8cc234aa52ec1f28094a170d7b87d0d08f.zip
gh-92547: Remove deprecated sqlite3 features (#92548)
The following sqlite3 features were deprecated in 3.10, scheduled for removal in 3.12: - sqlite3.OptimizedUnicode (gh-23163) - sqlite3.enable_shared_cache (gh-24008) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Signed-off-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Lib/test/test_sqlite3/test_factory.py')
-rw-r--r--Lib/test/test_sqlite3/test_factory.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/Lib/test/test_sqlite3/test_factory.py b/Lib/test/test_sqlite3/test_factory.py
index 420855ba34b..71603faa028 100644
--- a/Lib/test/test_sqlite3/test_factory.py
+++ b/Lib/test/test_sqlite3/test_factory.py
@@ -256,18 +256,6 @@ class TextFactoryTests(unittest.TestCase):
self.assertEqual(type(row[0]), str, "type of row[0] must be unicode")
self.assertTrue(row[0].endswith("reich"), "column must contain original data")
- def test_optimized_unicode(self):
- # OptimizedUnicode is deprecated as of Python 3.10
- with self.assertWarns(DeprecationWarning) as cm:
- self.con.text_factory = sqlite.OptimizedUnicode
- self.assertIn("factory.py", cm.filename)
- austria = "Österreich"
- germany = "Deutchland"
- a_row = self.con.execute("select ?", (austria,)).fetchone()
- d_row = self.con.execute("select ?", (germany,)).fetchone()
- self.assertEqual(type(a_row[0]), str, "type of non-ASCII row must be str")
- self.assertEqual(type(d_row[0]), str, "type of ASCII-only row must be str")
-
def tearDown(self):
self.con.close()