Permit use of both string and unicode for Python 2.7 for creating ses… · zhchwolf/python-cx_Oracle@465da44 · GitHub
Skip to content

Commit 465da44

Browse files
Permit use of both string and unicode for Python 2.7 for creating session pools
and for changing passwords (oracle#23).
1 parent f4009eb commit 465da44

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/Connection.c

Lines changed: 1 addition & 2 deletions

src/SessionPool.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,8 @@ static int SessionPool_Init(udt_SessionPool *self, PyObject *args,
205205
(uint32_t) strlen(dpiCommonParams.driverName);
206206
if (dpiContext_initPoolCreateParams(g_DpiContext, &dpiCreateParams) < 0)
207207
return Error_RaiseAndReturnInt();
208-
if (!PyArg_ParseTupleAndKeywords(args, keywordArgs, "O!O!O!iii|OObOOOssO",
209-
keywordList, cxString_Type, &self->username,
210-
cxString_Type, &passwordObj, cxString_Type, &self->dsn,
208+
if (!PyArg_ParseTupleAndKeywords(args, keywordArgs, "OOOiii|OObOOOssO",
209+
keywordList, &self->username, &passwordObj, &self->dsn,
211210
&minSessions, &maxSessions, &sessionIncrement, &connectionType,
212211
&threadedObj, &dpiCreateParams.getMode, &eventsObj,
213212
&homogeneousObj, &externalAuthObj, &dpiCommonParams.encoding,

test/uSessionPool.py

Lines changed: 4 additions & 3 deletions

0 commit comments

Comments
 (0)