Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test and news entries
  • Loading branch information
erlend-aasland committed Aug 14, 2023
commit b84ee0e3603d1ed56dc7f8fd2b418b184579a6ca
9 changes: 2 additions & 7 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ sqlite3
-------

* Passing more than one positional argument to :func:`sqlite3.connect` is
deprecated. Parameters *timeout*, *detect_types*, *isolation_level*,
*check_same_thread*, *factory*, *cached_statements*, and *uri* is deprecated.
They will become keyword-only parameters in Python 3.15.
deprecated. The remaining parameters will become keyword-only in Python 3.15.
(Contributed by Erlend E. Aasland :gh:`93057`.)

traceback
Expand Down Expand Up @@ -229,10 +227,7 @@ Deprecated
(Contributed by Victor Stinner in :gh:`105096`.)

* Passing more than one positional argument to :func:`sqlite3.connect` is
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated
deprecated. Parameters *timeout*, *detect_types*, *isolation_level*,
*check_same_thread*, *factory*, *cached_statements*, and *uri* is deprecated.
They will become keyword-only parameters in Python 3.15.
(Contributed by Erlend E. Aasland :gh:`93057`.)
deprecated. The remaining parameters will become keyword-only in Python 3.15.

Pending Removal in Python 3.14
------------------------------
Expand Down
10 changes: 9 additions & 1 deletion Lib/test/test_sqlite3/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@ class Factory(sqlite.Connection):
def __init__(self, *args, **kwargs):
super(Factory, self).__init__(*args, **kwargs)

con = sqlite.connect(":memory:", 5.0, 0, None, True, Factory)
regex = (
r"Passing more than 1 positional argument to _sqlite3.Connection\(\) "
Comment thread
erlend-aasland marked this conversation as resolved.
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)
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated
self.assertIsNone(con.isolation_level)
self.assertIsInstance(con, Factory)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Passing more than one positional argument to :func:`sqlite3.connect` is
deprecated. Parameters *timeout*, *detect_types*, *isolation_level*,
*check_same_thread*, *factory*, *cached_statements*, and *uri* is
deprecated. They will become keyword-only parameters in Python 3.15. Patch
by Erlend E. Aasland.
deprecated. The remaining parameters will become keyword-only in Python 3.15.
Patch by Erlend E. Aasland.