﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36675	Oracle dialect depends on implementation detail which was changed in python-oracledb 3.4	Anthony Tuininga	Varun Kasyap Pentamaraju	"This issue was reported by a Django user with the upgrade to python-oracledb 3.4: https://github.com/oracle/python-oracledb/issues/544. The issue is that the Django Oracle dialect depended on an implementation detail which changed in python-oracledb 3.4.

The following patch addresses that and is fine for all supported versions of cx_Oracle and python-oracledb:

{{{
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index 3b37c38f97..71089c1166 100644
--- a/django/db/backends/oracle/base.py
+++ b/django/db/backends/oracle/base.py
@@ -438,7 +438,7 @@ class OracleParam:
                 param = 0
         if hasattr(param, ""bind_parameter""):
             self.force_bytes = param.bind_parameter(cursor)
-        elif isinstance(param, (Database.Binary, datetime.timedelta)):
+        elif isinstance(param, (bytes, datetime.timedelta)):
             self.force_bytes = param
         else:
             # To transmit to the database, we need Unicode if supported
}}}"	Bug	closed	Database layer (models, ORM)	5.2	Normal	duplicate	oracle	Anthony Tuininga	Unreviewed	1	0	0	0	1	0
