diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-01-29 13:07:05 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-02-03 10:03:33 +0100 |
| commit | f39634ff229887bf7790c069d0c411b38494ca38 (patch) | |
| tree | 152a2c19f1bba15691d233b31dd3e9f58ade06e4 | |
| parent | 84283ab9cdf20178dabc5a0c06f42a6c3b3801c6 (diff) | |
Refs #32390 -- Bumped required cx_Oracle to 7.0.
| -rw-r--r-- | django/db/backends/oracle/operations.py | 6 | ||||
| -rw-r--r-- | docs/ref/databases.txt | 2 | ||||
| -rw-r--r-- | docs/releases/4.0.txt | 2 | ||||
| -rw-r--r-- | tests/requirements/oracle.txt | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/django/db/backends/oracle/operations.py b/django/db/backends/oracle/operations.py index 964edc4549..ae6bd432fb 100644 --- a/django/db/backends/oracle/operations.py +++ b/django/db/backends/oracle/operations.py @@ -258,16 +258,14 @@ END; columns = [] for param in returning_params: value = param.get_value() - if value is None or value == []: - # cx_Oracle < 6.3 returns None, >= 6.3 returns empty list. + if value == []: raise DatabaseError( 'The database did not return a new row id. Probably ' '"ORA-1403: no data found" was raised internally but was ' 'hidden by the Oracle OCI library (see ' 'https://code.djangoproject.com/ticket/28859).' ) - # cx_Oracle < 7 returns value, >= 7 returns list with single value. - columns.append(value[0] if isinstance(value, list) else value) + columns.append(value[0]) return tuple(columns) def field_cast_sql(self, db_type, internal_type): diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index 04f420984c..67d6d21eb6 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -842,7 +842,7 @@ To enable the JSON1 extension you can follow the instruction on Oracle notes ============ -Django supports `Oracle Database Server`_ versions 19c and higher. Version 6.0 +Django supports `Oracle Database Server`_ versions 19c and higher. Version 7.0 or higher of the `cx_Oracle`_ Python driver is required. .. _`Oracle Database Server`: https://www.oracle.com/ diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt index 185159d9ad..b7b0eec1b2 100644 --- a/docs/releases/4.0.txt +++ b/docs/releases/4.0.txt @@ -251,7 +251,7 @@ officially supports Oracle 19c. Miscellaneous ------------- -* ... +* Support for ``cx_Oracle`` < 7.0 is removed. .. _deprecated-features-4.0: diff --git a/tests/requirements/oracle.txt b/tests/requirements/oracle.txt index 763baa8579..5027358943 100644 --- a/tests/requirements/oracle.txt +++ b/tests/requirements/oracle.txt @@ -1 +1 @@ -cx_oracle >= 6.0 +cx_oracle >= 7.0 |
