Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#27924 closed Cleanup/optimization (fixed)

Add support for cx_Oracle 5.3

Reported by: Tim Graham Owned by: Mariusz Felisiak
Component: Database layer (models, ORM) Version: 1.11
Severity: Normal Keywords:
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

cx_Oracle 5.3 causes a few test failures due to this change: "Use None instead of 0 for items in the Cursor.description attribute that do not have any validity."

Sample exception:

  File "/home/jenkins/workspace/django-oracle-master/database/oragis12/label/trusty/python/python3.6/tests/gis_tests/distapp/tests.py", line 262, in test_area
    for i, z in enumerate(SouthTexasZipcode.objects.annotate(area=Area('poly')).order_by('name')):
  File "/home/jenkins/workspace/django-oracle-master/database/oragis12/label/trusty/python/python3.6/django/db/models/query.py", line 242, in __iter__
...
  File "/home/jenkins/workspace/django-oracle-master/database/oragis12/label/trusty/python/python3.6/django/db/backends/oracle/base.py", line 547, in _rowfactory
    elif precision > 0:
TypeError: '>' not supported between instances of 'NoneType' and 'int'

Change History (9)

comment:1 by Mariusz Felisiak, 7 years ago

Owner: changed from nobody to Mariusz Felisiak
Status: newassigned

comment:2 by Mariusz Felisiak, 7 years ago

Has patch: set

comment:3 by Tim Graham, 7 years ago

Triage Stage: AcceptedReady for checkin

To avoid the chance of a regression in older versions of Django and because the patch isn't completely compatible with Oracle < 5.2 (supported before Django 1.11), we'll document that cx_Oracle < 5.3 is required for Django < 1.11.

comment:4 by GitHub <noreply@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In 75503a82:

Fixed #27924 -- Added support for cx_Oracle 5.3.

  • Fixed Oracle backend due to cx_Oracle 5.3 change in the

Cursor.description behavior i.e. "Use None instead of 0 for items in
the Cursor.description attribute that do not have any validity.".

  • Used cx_Oracle.Object.size() instead of len().

Thanks Tim Graham for the review.

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

In 9924c8a:

[1.11.x] Fixed #27924 -- Added support for cx_Oracle 5.3.

  • Fixed Oracle backend due to cx_Oracle 5.3 change in the

Cursor.description behavior i.e. "Use None instead of 0 for items in
the Cursor.description attribute that do not have any validity.".

  • Used cx_Oracle.Object.size() instead of len().

Thanks Tim Graham for the review.

Backport of 75503a823f6358892fff5aeb3691683ad9cc5a60 from master

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

In 46d602d:

[1.10.x] Refs #27924 -- Doc'd that cx_Oracle < 5.3 is required.

Thanks Tim Graham for the review.

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

In f05219a:

[1.9.x] Refs #27924 -- Doc'd that cx_Oracle < 5.3 is required.

Thanks Tim Graham for the review.

Backport of 46d602dcea624bef3fb6e1dbf71378d837c0957b from stable/1.10.x

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

In 998bc0c:

[1.8.x] Refs #27924 -- Doc'd that cx_Oracle < 5.3 is required.

Thanks Tim Graham for the review.

Backport of 46d602dcea624bef3fb6e1dbf71378d837c0957b from stable/1.10.x

comment:9 by Tim Graham, 7 years ago

Summary: GIS test failures with cx_Oracle 5.3Add support for cx_Oracle 5.3
Type: BugCleanup/optimization
Version: 1.101.11

The changes from #27822 are also required for cx_Oracle 5.3 support.

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