From f39815814cdd1a7c0201f8cbf4a6a2fb8ca33157 Mon Sep 17 00:00:00 2001 From: Jeremy Epstein Date: Fri, 23 Sep 2022 23:09:11 +1000 Subject: [PATCH] callproc keyword_parameters functools.partial To prevent this error: File /path/to/cx_Oracle_async/cursors.py:45, in AsyncCursorWrapper.callproc(self, *args, **kwargs) 44 async def callproc(self, *args , **kwargs): ---> 45 return await self._loop.run_in_executor(self._thread_pool , self._cursor.callproc, *args , **kwargs) TypeError: BaseEventLoop.run_in_executor() got an unexpected keyword argument 'keyword_parameters' --- cx_Oracle_async/cursors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cx_Oracle_async/cursors.py b/cx_Oracle_async/cursors.py index bcd0f0b..6a6626e 100644 --- a/cx_Oracle_async/cursors.py +++ b/cx_Oracle_async/cursors.py @@ -1,5 +1,6 @@ from .context import AbstractContextManager as BaseManager from ThreadPoolExecutorPlus import ThreadPoolExecutor +from functools import partial from types import CoroutineType from cx_Oracle import Cursor from typing import TYPE_CHECKING @@ -42,4 +43,4 @@ async def var(self, args): return await self._loop.run_in_executor(self._thread_pool , self._cursor.var, args) async def callproc(self, *args , **kwargs): - return await self._loop.run_in_executor(self._thread_pool , self._cursor.callproc, *args , **kwargs) + return await self._loop.run_in_executor(self._thread_pool, partial(self._cursor.callproc, *args, **kwargs))