Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
There are some unintentional consequences of convertingsqlite3.connect() to Argument Clinic in#40956.
- The
databaseargument 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 tofactory().
It all works with the defaultfactory=Connection, butfactory can be an arbitrary callable, not completely compatible withConnection(). There may be a user code which uses a factory which only works with stringdatabase and does not support theuri 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 ofPyUnicode_FSConverter here.