#36698: isinstance() arg 2 must be a type, a tuple of types, or a union when 
using
Oracle DB
-------------------------------------+-------------------------------------
     Reporter:  drussca              |                     Type:  Bug
       Status:  new                  |                Component:  Database
                                     |  layer (models, ORM)
      Version:  5.2                  |                 Severity:  Normal
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 I have a Django project that uses and Oracle DB. Django version: 5.2.7.

 I've had to modify .../django/db/backends/oracle/base.py to make the setup
 work as I was getting:

 {{{
   File "/home/.../lib/python3.12/site-
 packages/django/db/backends/oracle/base.py", line 441, in __init__
     elif isinstance(param, (Database.Binary, datetime.timedelta)):
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union
 }}}

 After this most things work, EXCEPT when I try to do something like this:

 {{{
 someobjects =
 someclass.somerelatedobject.filter(effdate__lte=reference_date)
 someobjectssubset = someobjects.filter(expirdate__gte=reference_date)
 otherobjectssubset = someobjects .filter(rlexpirdate__isnull=True)
 }}}

 For this I still get the isinstance() arg 2 must be a type, a tuple of
 types, or a union error.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36698>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019a34cae31a-ef12e91f-3789-4a62-81f9-19e0ef308a4d-000000%40eu-central-1.amazonses.com.

Reply via email to