#8062: Re: #7560 casting now breaks filters (ints, bools, floats) in
get_db_prep_value
---------------------------------------------+------------------------------
          Reporter:  magneto                 |         Owner:  nobody
            Status:  closed                  |     Milestone:        
         Component:  Database wrapper        |       Version:  SVN   
        Resolution:  wontfix                 |      Keywords:        
             Stage:  Design decision needed  |     Has_patch:  0     
        Needs_docs:  0                       |   Needs_tests:  0     
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Changes (by mtredinnick):

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

Comment:

 We need to work out what the uniform behaviour is going to be here (after
 1.0), however, passing in the right types is actually a good behaviour to
 get into. Python is not untyped at all. Every piece of data has a well-
 specified type with clear sematics and {{{'1' + '2'}}} is quite different
 from {{{1 + 2}}}, for example. That's why Django's form classes clean the
 data to the right Python types and your other code should do so as well.

 Over time the Python language has also tended towards removing
 automatic/transparent coercions of data types because it disguised a
 number of bugs. Django is getting closer to following those semantics as
 well. As Leo points out, a number of databases (including the latest
 PostgreSQL releases) do require the correct types to be passed in, or an
 explicit cast to be used.

 Closing as wontfix, since there isn't really a bug here. If there's a
 genuine use-case where it's impossible to know the right type ahead of
 time, that can be brought up on a case-by-case basis (in a new ticket),
 but the general issue here is just a matter of inconvenience caused by
 type laxity in the past, not a bug.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8062#comment:4>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to