diff options
author | shadchin <shadchin@yandex-team.com> | 2025-02-16 15:28:01 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2025-02-16 16:03:50 +0300 |
commit | a27b6a96fdc5ca444428ddef4823d0486dcdccb9 (patch) | |
tree | adde5c24d9ea37e1634e7972e27e682a820ab941 /contrib/tools/python3/Modules/_sqlite | |
parent | 7a3958c3c6de324baab9dba4bd4eb808c1b839a6 (diff) | |
download | ydb-a27b6a96fdc5ca444428ddef4823d0486dcdccb9.tar.gz |
Update Python 3 to 3.12.9
commit_hash:c8651982d81e18f18e037fb247cc6ae53c4fa7f1
Diffstat (limited to 'contrib/tools/python3/Modules/_sqlite')
-rw-r--r-- | contrib/tools/python3/Modules/_sqlite/connection.c | 5 | ||||
-rw-r--r-- | contrib/tools/python3/Modules/_sqlite/util.c | 1 | ||||
-rw-r--r-- | contrib/tools/python3/Modules/_sqlite/ya.make | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/contrib/tools/python3/Modules/_sqlite/connection.c b/contrib/tools/python3/Modules/_sqlite/connection.c index 12e5c135aa..1450037ca9 100644 --- a/contrib/tools/python3/Modules/_sqlite/connection.c +++ b/contrib/tools/python3/Modules/_sqlite/connection.c @@ -927,6 +927,11 @@ step_callback(sqlite3_context *context, int argc, sqlite3_value **params) assert(ctx != NULL); aggregate_instance = (PyObject**)sqlite3_aggregate_context(context, sizeof(PyObject*)); + if (aggregate_instance == NULL) { + (void)PyErr_NoMemory(); + set_sqlite_error(context, "unable to allocate SQLite aggregate context"); + goto error; + } if (*aggregate_instance == NULL) { *aggregate_instance = PyObject_CallNoArgs(ctx->callable); if (!*aggregate_instance) { diff --git a/contrib/tools/python3/Modules/_sqlite/util.c b/contrib/tools/python3/Modules/_sqlite/util.c index 2b3bbfefa3..c521fc5ad6 100644 --- a/contrib/tools/python3/Modules/_sqlite/util.c +++ b/contrib/tools/python3/Modules/_sqlite/util.c @@ -129,6 +129,7 @@ _pysqlite_seterror(pysqlite_state *state, sqlite3 *db) /* Create and set the exception. */ int extended_errcode = sqlite3_extended_errcode(db); + // sqlite3_errmsg() always returns an UTF-8 encoded message const char *errmsg = sqlite3_errmsg(db); raise_exception(exc_class, extended_errcode, errmsg); return extended_errcode; diff --git a/contrib/tools/python3/Modules/_sqlite/ya.make b/contrib/tools/python3/Modules/_sqlite/ya.make index bbafbaff85..7abcc1886a 100644 --- a/contrib/tools/python3/Modules/_sqlite/ya.make +++ b/contrib/tools/python3/Modules/_sqlite/ya.make @@ -2,9 +2,9 @@ PY3_LIBRARY() -VERSION(3.12.8) +VERSION(3.12.9) -ORIGINAL_SOURCE(https://github.com/python/cpython/archive/v3.12.8.tar.gz) +ORIGINAL_SOURCE(https://github.com/python/cpython/archive/v3.12.9.tar.gz) LICENSE(Python-2.0) |