diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-05-21 14:35:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-21 14:35:46 +0300 |
commit | 14c0d33016a967a98155f2e1615660e9328aef5d (patch) | |
tree | 210319151392d06e34646f0b4b2f8f2787c9cf31 /Modules/_sqlite/module.c | |
parent | b96e20c1d9be4e6d5ea3e48c9c97e5ecd02f6055 (diff) | |
download | cpython-14c0d33016a967a98155f2e1615660e9328aef5d.tar.gz cpython-14c0d33016a967a98155f2e1615660e9328aef5d.zip |
gh-93044: No longer convert the database argument of sqlite3.connect() to bytes (GH-93046)
Just pass it to the factory as is.
Diffstat (limited to 'Modules/_sqlite/module.c')
-rw-r--r-- | Modules/_sqlite/module.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c index 78591f85c1f..9b0e921511c 100644 --- a/Modules/_sqlite/module.c +++ b/Modules/_sqlite/module.c @@ -46,7 +46,7 @@ module _sqlite3 /*[clinic input] _sqlite3.connect as pysqlite_connect - database: object(converter='PyUnicode_FSConverter') + database: object timeout: double = 5.0 detect_types: int = 0 isolation_level: object = NULL @@ -66,7 +66,7 @@ pysqlite_connect_impl(PyObject *module, PyObject *database, double timeout, int detect_types, PyObject *isolation_level, int check_same_thread, PyObject *factory, int cached_statements, int uri) -/*[clinic end generated code: output=450ac9078b4868bb input=ea6355ba55a78e12]*/ +/*[clinic end generated code: output=450ac9078b4868bb input=e16914663ddf93ce]*/ { if (isolation_level == NULL) { isolation_level = PyUnicode_FromString(""); @@ -81,7 +81,6 @@ pysqlite_connect_impl(PyObject *module, PyObject *database, double timeout, timeout, detect_types, isolation_level, check_same_thread, factory, cached_statements, uri); - Py_DECREF(database); // needed bco. the AC FSConverter Py_DECREF(isolation_level); return res; } |