From: Daniele Varrazzo Date: Wed, 24 Jul 2024 08:29:06 +0000 (+0200) Subject: chore(c): declare notice_receiver as not raising exceptions X-Git-Tag: 3.2.2~9^2~3 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb2889c88a1249d92b662bd8c80133fc081bfbe7;p=thirdparty%2Fpsycopg.git chore(c): declare notice_receiver as not raising exceptions The function indeed doesn't raise exceptions, as the possible one is handled internally. Avoid a Cython compiler warning. --- diff --git a/psycopg_c/psycopg_c/pq/pgconn.pyx b/psycopg_c/psycopg_c/pq/pgconn.pyx index f6a446f41..9ec1039df 100644 --- a/psycopg_c/psycopg_c/pq/pgconn.pyx +++ b/psycopg_c/psycopg_c/pq/pgconn.pyx @@ -710,7 +710,7 @@ cdef int _call_int(PGconn pgconn, conn_int_f func) except -2: return func(pgconn._pgconn_ptr) -cdef void notice_receiver(void *arg, const libpq.PGresult *res_ptr) with gil: +cdef void notice_receiver(void *arg, const libpq.PGresult *res_ptr) noexcept with gil: cdef PGconn pgconn = arg if pgconn.notice_handler is None: return