-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-30262: Deprecate sqlite Cache and Statement #1573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
Modules/_sqlite/module.c
Outdated
| { | ||
| pysqlite_Cache *self; | ||
|
|
||
| /* print deprecation warning */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: No need to add a comment for this.
Modules/_sqlite/module.c
Outdated
|
|
||
| /* print deprecation warning */ | ||
| if (PyErr_WarnEx(PyExc_DeprecationWarning, | ||
| "Cache object has been deprecated", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add "it won't be exposed in Python 3.9" or something similar as well?
Modules/_sqlite/module.c
Outdated
| { | ||
| pysqlite_Statement *self; | ||
|
|
||
| /* print deprecation warning */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments on pysqlite_cache_deprecated_new().
Modules/_sqlite/module.c
Outdated
| return (PyObject *)self; | ||
| } | ||
|
|
||
| /* classes for statement and cache deprecation */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: This can comment can be deleted.
Modules/_sqlite/module.c
Outdated
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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