-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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-36073: Raise ProgrammingError on recursive usage of cursors in sqlite converters #11984
Conversation
6a8c1fb
to
f1a838a
Compare
Thanks @sir-sigurd, I think a NEWs entry would be interesting, don't you? |
16a6d90
to
6f1b983
Compare
@sir-sigurd, can you rebase onto master? |
Modules/_sqlite/cursor.c
Outdated
return check_cursor_locked(cur) && | ||
pysqlite_check_thread(cur->connection) && pysqlite_check_connection(cur->connection); |
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.
Please format these lines according to PEP 7.
Modules/_sqlite/cursor.c
Outdated
static int check_cursor_locked(pysqlite_Cursor* cur) | ||
{ | ||
if (cur->locked) { | ||
PyErr_SetString(pysqlite_ProgrammingError, "Recursive use of cursors not allowed."); |
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.
Line is longer than 79 characters, ref. PEP 7.
Misc/NEWS.d/next/Library/2019-06-22-11-01-45.bpo-36073.ED8mB9.rst
Outdated
Show resolved
Hide resolved
Lib/sqlite3/test/regression.py
Outdated
|
||
def suite(): | ||
regression_suite = unittest.makeSuite(RegressionTests, "Check") | ||
return unittest.TestSuite(( | ||
regression_suite, | ||
unittest.makeSuite(ConverterProgrammingErrorTestCase), |
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.
This needs to be rebased onto master in order to fit in with the changes in the test suite.
@erlend-aasland |
Thanks, there's no hurry :) |
d3a828d
to
c79e784
Compare
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.
LGTM!
@serhiy-storchaka would you mind reviewing this? |
Could you rebase again (bco. GH-27884), @sir-sigurd? :) Also, please clean up the regression test:
|
Closed in favor of GH-29054. |
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
https://bugs.python.org/issue36073