You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some unintentional consequences of converting sqlite3.connect() to Argument Clinic in #40956.
The database argument always converted to bytes.
Keyword arguments are passed as positional arguments to factory().
If an argument is not passed to sqlite3.connect(), its default value is passed to factory().
It all works with the default factory=Connection, but factory can be an arbitrary callable, not completely compatible with Connection(). There may be a user code which uses a factory which only works with string database and does not support the uri argument. It worked fine in older versions when it is called with correct arguments, bet will become failing in 3.11.
This is a hypothetical scenario, but we should at least add a note about potential incompatibility. And I think that it is better to get rid of PyUnicode_FSConverter here.
Activity
pythongh-93044: No longer convert the database argument of sqlite3.co…
erlend-aasland commentedon May 21, 2022
FTR, sqlite3 was converted to Argument Clinic in gh-85128 (bpo-40956).
erlend-aasland commentedon May 21, 2022
Sounds good to me.
gh-93044: No longer convert the database argument of sqlite3.connect(…
[3.11] pythongh-93044: No longer convert the database argument of sql…
[3.11] gh-93044: No longer convert the database argument of sqlite3.c…
erlend-aasland commentedon May 21, 2022
This concern was resolved with:
The remaining concerns were resolved with:
gh-95132: Correctly relay *args and **kwds from sqlite3.connect to fa…
[3.11] pythongh-95132: Correctly relay *args and **kwds from sqlite3.…
[3.11] gh-95132: Correctly relay *args and **kwds from sqlite3.connec…