Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#29759 closed Bug (fixed)

Add support for cx_Oracle 7

Reported by: felixxm Owned by: felixxm
Component: Database layer (models, ORM) Version: 2.1
Severity: Normal Keywords: Oracle
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The Oracle back-end doesn't work with cx_Oracle=7.0.0, example exception

File "django/db/backends/oracle/operations.py", line 229, in fetch_returned_insert_id
    return int(cursor._insert_id_var.getvalue())
TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'

It is caused by a following change:

14. When a DML returning statement is executed, variables bound to it will return an array when calling Variable.getvalue(). Attempts to set cx_Oracle.__future__.dml_ret_array_val are now ignored.

(see cx_Oracle 7 release notes).

Change History (6)

comment:1 Changed 21 months ago by felixxm

Has patch: set

comment:2 Changed 21 months ago by Tim Graham

Triage Stage: UnreviewedReady for checkin

comment:3 Changed 21 months ago by GitHub <noreply@…>

Resolution: fixed
Status: assignedclosed

In da92ec7:

Fixed #29759 -- Fixed crash on Oracle when fetching a returned insert id with cx_Oracle 7.

comment:4 Changed 21 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 430966c2:

[2.1.x] Fixed #29759 -- Fixed crash on Oracle when fetching a returned insert id with cx_Oracle 7.

Backport of da92ec79621fc0bba671d8afa52b7f6884962fe5 from master

comment:5 Changed 21 months ago by GitHub <noreply@…>

In 7085247:

[2.0.x] Refs #29759 -- Doc'd that cx_Oracle < 7 is required.

comment:6 Changed 21 months ago by Mariusz Felisiak <felisiak.mariusz@…>

In 006ca978:

[1.11.x] Refs #29759 -- Doc'd that cx_Oracle < 7 is required.

Backport of 7085247e2fd1ad8b08103173a23ca730784765a3 from stable/2.0.x

Note: See TracTickets for help on using tickets.
Back to Top