Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-93057: Deprecate positional use of optional sqlite3.connect() params#107948
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
40996ef
b84ee0e
6ab04fd
01c4067
de7e87c
6f3e5c6
4018bd9
1f48783
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -66,7 +66,16 @@ class Factory(sqlite.Connection): | ||
def __init__(self, *args, **kwargs): | ||
super(Factory, self).__init__(*args, **kwargs) | ||
regex = ( | ||
r"Passing more than 1 positional argument to _sqlite3.Connection\(\) " | ||
erlend-aasland marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
r"is deprecated. Parameters 'timeout', 'detect_types', " | ||
r"'isolation_level', 'check_same_thread', 'factory', " | ||
r"'cached_statements' and 'uri' will become keyword-only " | ||
r"parameters in Python 3.15." | ||
) | ||
with self.assertWarnsRegex(DeprecationWarning, regex) as cm: | ||
con = sqlite.connect(":memory:", 5.0, 0, None, True, Factory) | ||
self.assertEqual(cm.filename, __file__) | ||
self.assertIsNone(con.isolation_level) | ||
self.assertIsInstance(con, Factory) | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Passing more than one positional argument to :func:`sqlite3.connect` and the | ||
:class:`sqlite3.Connection` constructor is deprecated. The remaining parameters | ||
will become keyword-only in Python 3.15. Patch by Erlend E. Aasland. |
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.