Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#29759 closed Bug (fixed)

Add support for cx_Oracle 7

Reported by: Mariusz Felisiak Owned by: Mariusz Felisiak
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 by Mariusz Felisiak, 6 years ago

Has patch: set

comment:2 by Tim Graham, 6 years ago

Triage Stage: UnreviewedReady for checkin

comment:3 by GitHub <noreply@…>, 6 years ago

Resolution: fixed
Status: assignedclosed

In da92ec7:

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

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 6 years ago

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 by GitHub <noreply@…>, 6 years ago

In 7085247:

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

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 6 years ago

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