[Django] #22816: Oracle test failure: Inspecting NullBooleanField

15 views
Skip to first unread message

Django

unread,
Jun 12, 2014, 2:42:36 AM6/12/14
to django-...@googlegroups.com
#22816: Oracle test failure: Inspecting NullBooleanField
-------------------------------------+-------------------------------------
Reporter: shai | Owner: shai
Type: Bug | Status: new
Component: Database | Version: 1.7-beta-2
layer (models, ORM) | Keywords: oracle
Severity: Release | Has patch: 0
blocker | Needs tests: 0
Triage Stage: Accepted | Easy pickings: 0
Needs documentation: 0 |
Patch needs improvement: 0 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
{{{
======================================================================
FAIL: test_number_field_types (inspectdb.tests.InspectDBTestCase)
Test introspection of various Django field types
----------------------------------------------------------------------
Traceback (most recent call last):
File "<.../tests/inspectdb/tests.py",> line 95, in
test_number_field_types
assertFieldType('null_bool_field', "models.BooleanField()")
File "<.../tests/inspectdb/tests.py",> line 38, in assertFieldType
self.assertEqual(definition, out_def)
AssertionError: u'models.BooleanField()' != 'models.NullBooleanField()'

----------------------------------------------------------------------
Ran 7008 tests in 11909.588s

FAILED (failures=1, skipped=333, expected failures=8)
}}}

The copied report was on master, but 1.7 has it too.
It's probably some minor thing, I'll deal with it later today.

--
Ticket URL: <https://code.djangoproject.com/ticket/22816>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 12, 2014, 5:34:33 PM6/12/14
to django-...@googlegroups.com
#22816: Oracle test failure: Inspecting NullBooleanField
-------------------------------------+-------------------------------------
Reporter: shai | Owner: shai
Type: Bug | Status: new
Component: Database layer | Version:
(models, ORM) | 1.7-beta-2
Severity: Release blocker | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by shai):

This was introduced by a03d38ddd43957a402b64caddf74a73df72140fb and
5c95a55330bc2531405700a399bfb555bfe80120 on master
(342b25449d800ce29ae56ff8285869cbc3133a75 and
1238f92c649ccd4ba99da0ce70be7597c90515d4 on stable/1.7.x). The first
commit in each pair introduces a `can_introspect_null` database-feature,
and sets it to False for Oracle; the latter uses the flag in tests for
integer and boolean fields.

Oracle has issues introspecting nullability in character fields, because
it `interprets_empty_strings_as_nulls` (so the backend defines all
character fields as nullable in order to allow empty strings); but it has
no such issues with integer fields or boolean fields.

Unless the `can_introspect_null` flag serves some 3rd-party backend, I
suggest that we simply revert these four commits.

--
Ticket URL: <https://code.djangoproject.com/ticket/22816#comment:1>

Django

unread,
Jun 13, 2014, 5:50:35 PM6/13/14
to django-...@googlegroups.com
#22816: Oracle test failure: Inspecting NullBooleanField
-------------------------------------+-------------------------------------
Reporter: shai | Owner: shai
Type: Bug | Status: new
Component: Database layer | Version:
(models, ORM) | 1.7-beta-2
Severity: Release blocker | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by shai):

@aaugustin and @manfre have [https://groups.google.com/forum/#!msg/django-
developers/wGjBCWsWKZQ/ARuP0R7ecAMJ confirmed] that the flag is needed by
django-pymssql, a 3rd-party backend. So, I'm just fixing the Oracle issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/22816#comment:2>

Django

unread,
Jun 13, 2014, 5:52:28 PM6/13/14
to django-...@googlegroups.com
#22816: Oracle test failure: Inspecting NullBooleanField
-------------------------------------+-------------------------------------
Reporter: shai | Owner: shai
Type: Bug | Status: closed

Component: Database layer | Version:
(models, ORM) | 1.7-beta-2
Severity: Release blocker | Resolution: fixed

Keywords: oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Shai Berger <shai@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"612290400f79fb2293a6a0b0cfa5743ab0cef6b1"]:
{{{
#!CommitTicketReference repository=""
revision="612290400f79fb2293a6a0b0cfa5743ab0cef6b1"
Fixed #22816 -- Corrected Oracle feature flag and fixed introspection test
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22816#comment:3>

Django

unread,
Jun 13, 2014, 5:57:36 PM6/13/14
to django-...@googlegroups.com
#22816: Oracle test failure: Inspecting NullBooleanField
-------------------------------------+-------------------------------------
Reporter: shai | Owner: shai
Type: Bug | Status: closed
Component: Database layer | Version:
(models, ORM) | 1.7-beta-2
Severity: Release blocker | Resolution: fixed
Keywords: oracle | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Shai Berger <shai@…>):

In [changeset:"4b922b809413eb9e9d59be0c3b41d0cedefbeb29"]:
{{{
#!CommitTicketReference repository=""
revision="4b922b809413eb9e9d59be0c3b41d0cedefbeb29"
[1.7.x] Fixed #22816 -- Corrected Oracle feature flag and fixed
introspection test

Backport of 6122904 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22816#comment:4>

Reply all
Reply to author
Forward
0 new messages