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

sqlite3 authorizer codes constants not up to date #73171

Closed
gumblex mannequin opened this issue Dec 16, 2016 · 4 comments
Closed

sqlite3 authorizer codes constants not up to date #73171

gumblex mannequin opened this issue Dec 16, 2016 · 4 comments
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@gumblex
Copy link
Mannequin

gumblex mannequin commented Dec 16, 2016

BPO 28985
Nosy @berkerpeksag
PRs
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • Files
  • sqlite3.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-01-02.03:36:40.410>
    created_at = <Date 2016-12-16.03:24:52.986>
    labels = ['3.7', 'type-feature', 'library']
    title = 'sqlite3 authorizer codes constants not up to date'
    updated_at = <Date 2017-03-31.16:36:11.643>
    user = 'https://bugs.python.org/gumblex'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:11.643>
    actor = 'dstufft'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-01-02.03:36:40.410>
    closer = 'berker.peksag'
    components = ['Library (Lib)']
    creation = <Date 2016-12-16.03:24:52.986>
    creator = 'gumblex'
    dependencies = []
    files = ['45921']
    hgrepos = []
    issue_num = 28985
    keywords = ['patch']
    message_count = 4.0
    messages = ['283363', '283365', '284450', '284451']
    nosy_count = 3.0
    nosy_names = ['python-dev', 'berker.peksag', 'gumblex']
    pr_nums = ['552']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue28985'
    versions = ['Python 3.7']

    @gumblex
    Copy link
    Mannequin Author

    gumblex mannequin commented Dec 16, 2016

    We have the sqlite3.set_authorizer function, where the first argument to its callback is one of the Authorizer Action Codes that the SQLite documentations defines[1]. However, the constants in the sqlite3 module is not up to date. The code in _sqlite/module.c haven't been updated since June, 2006.

    According to the SQLite Changelog[2] and digging through the history,

    • 2006-08-12 (3.3.7) added SQLITE_CREATE_VTABLE, SQLITE_DROP_VTABLE
    • 2006-10-09 (3.3.8) added SQLITE_FUNCTION
    • 2009-01-12 (3.6.8) added SQLITE_SAVEPOINT
    • 2014-02-03 (3.8.3) added SQLITE_RECURSIVE

    The constants above should be present in the module. The documentation[3] says, "All necessary constants are available in the sqlite3 module."

    [1] https://sqlite.org/c3ref/c_alter_table.html
    [2] https://sqlite.org/changes.html
    [3] https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.set_authorizer

    @gumblex gumblex mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Dec 16, 2016
    @berkerpeksag
    Copy link
    Member

    Looks good to me. Thanks for the patch, Dingyuan.

    Since this is an enhancement request, we can only commit your patch to the default branch so I updated the versions field accordingly.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 2, 2017

    New changeset b9c4139a1309 by Berker Peksag in branch 'default':
    Issue bpo-28985: Update authorizer constants in sqlite3 module
    https://hg.python.org/cpython/rev/b9c4139a1309

    @berkerpeksag
    Copy link
    Member

    Thanks, Dingyuan!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant