-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Python3.11: sqlite3.connect passes more arguments to factory() #95132
Comments
Thanks for the report. This is unfortunate. Reverting the offending commit is going to be hairy; there has been a lot of changes since that point in time. The only thing @serhiy-storchaka, do you have an opinion here? Thanks again for testing the 3.11 beta! Reports like this help us improve. |
FTR, this won't work. Arguments will still be passed incorrectly. |
I've updated #95146 to use |
…ctory (#95146) This PR partially reverts gh-24421 (PR) and fixes the remaining concerns given in gh-93044 (issue): - 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() Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…connect to factory (pythonGH-95146) This PR partially reverts pythongh-24421 (PR) and fixes the remaining concerns given in pythongh-93044 (issue): - 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() Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>. (cherry picked from commit a3d4d15) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
…t to factory (GH-95146) (#95158) This PR partially reverts gh-24421 (PR) and fixes the remaining concerns given in gh-93044 (issue): - 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() Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>. (cherry picked from commit a3d4d15) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Nice fix. |
Hello,
Bug report
Consider the following code snippet:
$ cat /tmp/test.py
And the execution:
The default values of sqlite3.connect's arguments are passed to the factory in
Python3.11, which was not the case in Python3.10. This means that code like
this will fail:
$ cat /tmp/failure.py
Your environment
This behaviour appeared in 185ecdc and affects
Python 3.11 and later.
It was mentioned in #93044 (see the
second bullet point in the reporter's message) but has not been fixed.
The text was updated successfully, but these errors were encountered: