Skip to content

Commit e657624

Browse files
palavivberkerpeksag
authored andcommitted
bpo-30262: Don't expose private objects in sqlite3 (GH-1440)
The Cache and Statement objects are undocumented and implementation details of the sqlite3 module. They aren't usable from pure Python code.
1 parent f00828a commit e657624

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

‎Doc/whatsnew/3.8.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,10 @@ The following features and APIs have been removed from Python 3.8:
796796
* "unicode_internal" codec is removed.
797797
(Contributed by Inada Naoki in :issue:`36297`.)
798798

799+
* The ``Cache`` and ``Statement`` objects of the :mod:`sqlite3` module are not
800+
exposed to the user.
801+
(Contributed by Aviv Palivoda in :issue:`30262`.)
802+
799803

800804
Porting to Python 3.8
801805
=====================
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The ``Cache`` and ``Statement`` objects of the :mod:`sqlite3` module are not
2+
exposed to the user. Patch by Aviv Palivoda.

‎Modules/_sqlite/module.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,6 @@ PyMODINIT_FUNC PyInit__sqlite3(void)
366366
PyModule_AddObject(module, "Connection", (PyObject*) &pysqlite_ConnectionType);
367367
Py_INCREF(&pysqlite_CursorType);
368368
PyModule_AddObject(module, "Cursor", (PyObject*) &pysqlite_CursorType);
369-
Py_INCREF(&pysqlite_CacheType);
370-
PyModule_AddObject(module, "Statement", (PyObject*)&pysqlite_StatementType);
371-
Py_INCREF(&pysqlite_StatementType);
372-
PyModule_AddObject(module, "Cache", (PyObject*) &pysqlite_CacheType);
373369
Py_INCREF(&pysqlite_PrepareProtocolType);
374370
PyModule_AddObject(module, "PrepareProtocol", (PyObject*) &pysqlite_PrepareProtocolType);
375371
Py_INCREF(&pysqlite_RowType);

0 commit comments

Comments
 (0)