-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
sqlite3
, check_same_thread
should be true
?
#128697
Comments
IIUC, you want Moreover, if the underlying |
the returned value "sqlite3.threadsafety" is 3, which is Serialized if the python itself does not actually support furthermore, python's |
In the docs, we consistently use |
or at least use "sqlite3.threadsafety" to indicate it "it is not 3(Serialized), and python sqlite3 does not support Serialized", otherwise it creates conflict on meaning, and creates confuses |
or just drop "sqlite3.threadsafety" if that python sqlite3 has nothing to do with it |
The |
Documentation
https://docs.python.org/3/library/sqlite3.html#module-functions:
and
#71300:
the code:
cpython/Modules/_sqlite/connection.c
Lines 1698 to 1714 in c141748
the issue:
the
sqlite
originally itself does not have thischeck_same_thread
option, andhttps://sqlite.org/c3ref/c_config_covering_index_scan.html#sqliteconfigserialized:
according
sqlite
itself saidthe SQLite library will itself serialize access to database connections and prepared statements so that the application is free to use the same database connection or the same prepared statement in different threads at the same time.
, why does python sqlite3 need this check_same_thread option? and thesqlite3.threadsafety
returned also is 3the document may statement clear it
The text was updated successfully, but these errors were encountered: