Opened 5 years ago

Closed 5 years ago

Last modified 5 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 Changed 5 years ago by Mariusz Felisiak

Owner: changed from nobody to Mariusz Felisiak
Status: newassigned

comment:2 Changed 5 years ago by Mariusz Felisiak

Has patch: set

comment:3 Changed 5 years ago by Tim Graham

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 Changed 5 years ago by GitHub <noreply@…>

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 Changed 5 years ago by Mariusz Felisiak <felisiak.mariusz@…>

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 Changed 5 years ago by GitHub <noreply@…>

In 46d602d:

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

Thanks Tim Graham for the review.

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

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 Changed 5 years ago by Mariusz Felisiak <felisiak.mariusz@…>

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 Changed 5 years ago by Tim Graham

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