-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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-45243: Add support for setting/getting sqlite3
connection limits
#28463
Conversation
Thinking about this, I wonder if connection limits are better implemented as attributes: import sqlite3
cx = sqlite3.connect(":memory:")
lim = cx.SQLITE_LIMIT_LENGTH
cx.SQLITE_LIMIT_LENGTH = 100
# instead of
lim = cx.getlimit(sqlite3.SQLITE_LIMIT_LENGTH)
cx.setlimit(sqlite3.SQLITE_LIMIT_LENGTH, 100) I added GH-28790 as an alternative implementation. |
- Use 'category' for limit category - Use 'limit' for the new limit
@serhiy-storchaka I changed the argument spec:
I believe this is clearer and more aligned with the SQLite documentation. |
PTAL, @serhiy-storchaka. |
@serhiy-storchaka I believe all comments have been resolved. Would you like to take another look at this PR? |
@pablogsal would you mind taking a look at this? I believe I've addressed all of Serhiy's comments. |
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
- Blob from python/cpython#30680 (and anticipating that python/cpython#91550 will be merged) - Aggregate window functions from python/cpython#20903 - Serialize/deserialize from python/cpython#26728 - Limit setting from python/cpython#28463
- Blob from python/cpython#30680 (and anticipating that python/cpython#91550 will be merged) - Aggregate window functions from python/cpython#20903 - Serialize/deserialize from python/cpython#26728 - Limit setting from python/cpython#28463
https://bugs.python.org/issue45243