-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
sqlite crashes with converters mutating cursor #80254
Comments
It's somewhat similar to bpo-10811, but for converter function: In [197]: import sqlite3 as sqlite Similar to bpo-10811, proposed patch raises ProgrammingError instead of crashing. |
Er, a little bit too fast there. There is still a crash, but it is of course postponed bco. bpo-44976. New reproducer: import sqlite3 as sqlite
con = sqlite.connect(':memory:', detect_types=sqlite.PARSE_COLNAMES)
cur = con.cursor()
sqlite.converters['CURSOR_INIT'] = lambda x: cur.__init__(con) cur.execute('create table test(x foo)') |
…#29054) Co-authored-by: Sergey Fedoseev <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
…3` converters (python#29054) (cherry picked from commit f629dcf) Co-authored-by: Sergey Fedoseev <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
…` converters (cherry picked from commit c908dc5) Co-authored-by: Sergey Fedoseev <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
List of backport PRs:
|
…verters (#92274) * [3.10] gh-80254: Disallow recursive usage of cursors in `sqlite3` converters (#29054) (cherry picked from commit f629dcf) Co-authored-by: Sergey Fedoseev <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]> * Fix ref leak in pysqlite_cursor_iternext
…erters (#92278) * [3.9] gh-80254: Disallow recursive usage of cursors in `sqlite3` converters (cherry picked from commit c908dc5) Co-authored-by: Sergey Fedoseev <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]> * Fix ref leak in pysqlite_cursor_iternext * Explicitly free resources at test tearDown()
…ters (#92333) (cherry picked from commit c908dc5) Co-authored-by: Sergey Fedoseev <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
release: - https://www.python.org/downloads/release/python-3913/ changelog: - https://docs.python.org/release/3.9.13/whatsnew/changelog.html upstream fix for dropped patch - python/cpython#80254 - python/cpython#11984 - python/cpython#90228 - python/cpython#92036 - python/cpython#92037 - python/cpython#92297 - bpo-36073 - was - python/cpython#30579 - python/cpython#30580
…ters (GH-92334) (cherry picked from commit c908dc5) Co-authored-by: Sergey Fedoseev <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
…` converters (python#92278) * [3.9] pythongh-80254: Disallow recursive usage of cursors in `sqlite3` converters (cherry picked from commit c908dc5) Co-authored-by: Sergey Fedoseev <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]> * Fix ref leak in pysqlite_cursor_iternext * Explicitly free resources at test tearDown()
sqlite3
converters #29054Note: 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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: