Re: [Django] #19197: BaseDatabaseOperations: convert_values raise error on None data type conversions

2012-12-16 Thread Django
#19197: BaseDatabaseOperations: convert_values raise error on None data type
conversions
-+-
 Reporter:  maxi |Owner:
 Type:  Bug  |  maxirobaina@…
Component:  Database layer   |   Status:  closed
  (models, ORM)  |  Version:  1.4
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Anssi Kääriäinen ):

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


Comment:

 In [changeset:"1caa483914edf851137b3c1e39f4364772bd46c9"]:
 {{{
 #!CommitTicketReference repository=""
 revision="1caa483914edf851137b3c1e39f4364772bd46c9"
 [1.5.x] Fixed #19197 -- fixed convert_values() for nullable numeric fields

 Cleaned up the implementation of base convert_values() a little, and
 made sure it accepts None as a value for numeric fields.

 There are no tests attached. The reason is that not all of the
 convert_values() accept None as a value for numeric fields (for example
 sqlite3.convert_values()).

 The reason the base convert_values() needs to accept None is that this
 situation might arise in custom compilers for 3rd party backends. It
 is easy to keep the convert_values() working, so lets do that.

 Backpatch of 12a96bfa263d514884ef11009913b2f8bb163472
 }}}

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19197: BaseDatabaseOperations: convert_values raise error on None data type conversions

2012-12-16 Thread Django
#19197: BaseDatabaseOperations: convert_values raise error on None data type
conversions
-+-
 Reporter:  maxi |Owner:
 Type:  Bug  |  maxirobaina@…
Component:  Database layer   |   Status:  new
  (models, ORM)  |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by akaariai):

 Patch available at https://github.com/akaariai/django/compare/ticket_19197

 There is a fix for completely unrelated issue in one commit - backends
 tests seem to leak connections if ran alone on postgresql. This ticket's
 issue is fixed without tests, the base convert_values() has been doing a
 different thing than for example sqlite3's convert_values(), so writing a
 test for just base convert_values() seemed wrong.

 In general the situation with convert_values() and Field.to_python is
 somewhat messy. It would be nice to clean that up but not this ticket's
 problem...

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19197: BaseDatabaseOperations: convert_values raise error on None data type conversions

2012-11-05 Thread Django
#19197: BaseDatabaseOperations: convert_values raise error on None data type
conversions
-+-
 Reporter:  maxi |Owner:
 Type:  Bug  |  maxirobaina@…
Component:  Database layer   |   Status:  new
  (models, ORM)  |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by akaariai):

 * stage:  Unreviewed => Accepted


Comment:

 OK. Marking as accepted.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19197: BaseDatabaseOperations: convert_values raise error on None data type conversions

2012-10-29 Thread Django
#19197: BaseDatabaseOperations: convert_values raise error on None data type
conversions
-+-
 Reporter:  maxi |Owner:
 Type:  Bug  |  maxirobaina@…
Component:  Database layer   |   Status:  new
  (models, ORM)  |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
Has patch:  0|  Unreviewed
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-

Comment (by maxi):

 Ok, I'll try to explain this:

 1. Maybe it only happens with database engines that override
 DatabaseOperations.convert_values and use this method in
 SQLCompiler.resolve_columns (I'm working on Firebird engine but you can
 see at Oracle implementation).

 2. The specific DatabaseOperations.convert_values must to call super from
 base class (Oracle implementation doesn't do that), then

  def convert_values(self, value, field):
  value = super(DatabaseOperations, self).convert_values(value, field)
  ...
  # others values conversions
  return value

 3. The problem is exposed on model_fields test app, BigIntegerFieldTests,
 test_types method

 I hope I have made this sufficiently clear.

 Let me know if you need more information.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19197: BaseDatabaseOperations: convert_values raise error on None data type conversions

2012-10-26 Thread Django
#19197: BaseDatabaseOperations: convert_values raise error on None data type
conversions
-+-
 Reporter:  maxi |Owner:
 Type:  Bug  |  maxirobaina@…
Component:  Database layer   |   Status:  new
  (models, ORM)  |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
Has patch:  0|  Unreviewed
  Needs tests:  0|  Needs documentation:  0
Easy pickings:  0|  Patch needs improvement:  0
 |UI/UX:  0
-+-
Changes (by akaariai):

 * needs_docs:   => 0
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Comment:

 Could you provide some sample code (or better yet, test case) to show this
 problem?

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.