bpo-30262: Deprecate sqlite Cache and Statement#1573
Conversation
|
@palaviv, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Yhg1s, @ghaering and @benjaminp to be potential reviewers. |
berkerpeksag
left a comment
There was a problem hiding this comment.
We need to add a NEWS entry and a release note in Doc/whatsnew/3.8.rst (see the "Deprecated" section at https://docs.python.org/3.8/whatsnew/3.8.html#deprecated)
| { | ||
| pysqlite_Cache *self; | ||
|
|
||
| /* print deprecation warning */ |
There was a problem hiding this comment.
Style nit: No need to add a comment for this.
|
|
||
| /* print deprecation warning */ | ||
| if (PyErr_WarnEx(PyExc_DeprecationWarning, | ||
| "Cache object has been deprecated", |
There was a problem hiding this comment.
Could you add "it won't be exposed in Python 3.9" or something similar as well?
| { | ||
| pysqlite_Statement *self; | ||
|
|
||
| /* print deprecation warning */ |
There was a problem hiding this comment.
See my comments on pysqlite_cache_deprecated_new().
| return (PyObject *)self; | ||
| } | ||
|
|
||
| /* classes for statement and cache deprecation */ |
There was a problem hiding this comment.
Style nit: This can comment can be deleted.
| Py_INCREF(&pysqlite_StatementType); | ||
| PyModule_AddObject(module, "Cache", (PyObject*) &pysqlite_CacheType); | ||
| Py_INCREF(&pysqlite_StatementDeprecatedType); | ||
| PyModule_AddObject(module, "Statement", (PyObject*)&pysqlite_StatementDeprecatedType); |
There was a problem hiding this comment.
Style nit: Since we already modified this line, we can adda space after (PyObject*) to make the styling consistent.
|
Oh, and please rebase |
2f936ae to
b37d55c
Compare
|
Hi @palaviv Would you be interested to upgrade your PR to the last master? Thank you |
|
Not needed after #1440. |
https://bugs.python.org/issue30262