Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
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 from6 commits
40996efb84ee0e6ab04fd01c4067de7e87c6f3e5c64018bd91f48783File 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 |
|---|---|---|
| @@ -219,6 +219,9 @@ Deprecated | ||
| They will be removed in Python 3.15. | ||
| (Contributed by Victor Stinner in :gh:`105096`.) | ||
| * Passing more than one positional argument to :func:`sqlite3.connect` is | ||
erlend-aasland marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| deprecated. The remaining parameters will become keyword-only in Python 3.15. | ||
| Pending Removal in Python 3.14 | ||
| ------------------------------ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -66,7 +66,15 @@ 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): | ||
| con = sqlite.connect(":memory:", 5.0, 0, None, True, Factory) | ||
erlend-aasland marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| 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` 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.