Repository navigation
Unintentional changes in sqlite3.connect() #93044
Copy link
Copy link
Closed
Labels
3.11only security fixesonly security fixestopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error3.11only security fixesonly security fixes
on May 21, 2022 - linked a pull request that will close this issuegh-93044: No longer convert the database argument of sqlite3.connect() to bytes #93046
on May 21, 2022 Sounds good to me.
- added a commit that references this issue
on May 21, 2022 - The database argument always converted to bytes.
This concern was resolved with:
- main: gh-93044: No longer convert the database argument of sqlite3.connect() to bytes #93046
- 3.11: [3.11] gh-93044: No longer convert the database argument of sqlite3.c… #93048
The remaining concerns were resolved with:
- added 3 commits that reference this issue
on Jul 23, 2022
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixestopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
There are some unintentional consequences of converting
sqlite3.connect()to Argument Clinic in #40956.databaseargument always converted to bytes.factory().sqlite3.connect(), its default value is passed tofactory().It all works with the default
factory=Connection, butfactorycan be an arbitrary callable, not completely compatible withConnection(). There may be a user code which uses a factory which only works with stringdatabaseand does not support theuriargument. 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_FSConverterhere.