diff options
author | Anders Lorentsen <Phaqui@gmail.com> | 2017-11-07 00:47:43 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-11-07 00:47:43 (GMT) |
commit | a22a127458d75b9b7e65e058f5db5ff705df5696 (patch) | |
tree | 02671d0bdaea01716305c713cc3a67433318aed2 /Doc/library/sqlite3.rst | |
parent | edb13ae48c17210fa4b2d40a6833ca09db5c121b (diff) | |
download | cpython-a22a127458d75b9b7e65e058f5db5ff705df5696.zip cpython-a22a127458d75b9b7e65e058f5db5ff705df5696.tar.gz cpython-a22a127458d75b9b7e65e058f5db5ff705df5696.tar.bz2 |
bpo-31843: sqlite3.connect() now accepts PathLike objects as database name (#4299)
Diffstat (limited to 'Doc/library/sqlite3.rst')
-rw-r--r-- | Doc/library/sqlite3.rst | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index ef0c0bf..c7b9af4 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -172,9 +172,13 @@ Module functions and constants .. function:: connect(database[, timeout, detect_types, isolation_level, check_same_thread, factory, cached_statements, uri]) - Opens a connection to the SQLite database file *database*. You can use - ``":memory:"`` to open a database connection to a database that resides in RAM - instead of on disk. + Opens a connection to the SQLite database file *database*. By default returns a + :class:`Connection` object, unless a custom *factory* is given. + + *database* is a :term:`path-like object` giving the pathname (absolute or + relative to the current working directory) of the database file to be opened. + You can use ``":memory:"`` to open a database connection to a database that + resides in RAM instead of on disk. When a database is accessed by multiple connections, and one of the processes modifies the database, the SQLite database is locked until that transaction is @@ -223,6 +227,9 @@ Module functions and constants .. versionchanged:: 3.4 Added the *uri* parameter. + .. versionchanged:: 3.7 + *database* can now also be a :term:`path-like object`, not only a string. + .. function:: register_converter(typename, callable) |