Skip to content
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

closes bpo-31525: require sqlite3_prepare_v2 #3666

Merged
merged 4 commits into from
Sep 20, 2017
Merged

Conversation

benjaminp
Copy link
Contributor

@benjaminp benjaminp commented Sep 20, 2017

This is based on
ghaering/pysqlite@40b349c#diff-0489411409cd2934730e88bf7767790,
though I believe we can be a bit more aggressive about deleting code.

https://bugs.python.org/issue31525

This is based on
ghaering/pysqlite@40b349c#diff-0489411409cd2934730e88bf7767790,
though I believe we can be a bit more aggressive about deleting code.
Copy link
Member

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also delete the following snippet from Modules/_sqlite/util.c:

#if SQLITE_VERSION_NUMBER < 3003009
    /* SQLite often doesn't report anything useful, unless you reset the statement first.
       When using sqlite3_prepare_v2 this is not needed. */
    if (st != NULL) {
        (void)sqlite3_reset(st);
    }
#endif

Could you also note the minimum SQLite version in the blurb entry?

Copy link
Member

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good to me except 2-space indentation in Modules/_sqlite/cursor.c.

@benjaminp benjaminp merged commit 5252694 into master Sep 20, 2017
@benjaminp benjaminp deleted the benjamin-prepare-v2 branch September 20, 2017 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants