bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized#3958
Conversation
|
I wonder whether we should add However, i don't know how to produce code that would create a partially initialized |
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
|
@berkerpeksag What do you think about #3958 (comment)? |
Sorry, something went wrong.
I agree with you. There is no need to add additional code for hypothetical use cases. We can change it later if we find a way to create a partially initialized Cursor object. |
Sorry, something went wrong.
The author took comments in account.
…or object is uninitialized (pythonGH-3958) (cherry picked from commit edb13ae)
…or object is uninitialized (python#3958)
In addition, add a test to
test_sqliteto make sure that the crash is no more.https://bugs.python.org/issue31764