Re: [Django] #26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and post loaddata is ValidationError

2016-02-15 Thread Django
#26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and 
post
loaddata is ValidationError
-+-
 Reporter:  bukin242 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * Attachment "26215-test2.diff" added.


--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.5629991349b7d60f3e6f4a3e46fced66%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and post loaddata is ValidationError

2016-02-15 Thread Django
#26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and 
post
loaddata is ValidationError
-+-
 Reporter:  bukin242 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * Attachment "26215-test2.diff" added.


--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.f62a88a603be548eb5f5f22376979fd1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and post loaddata is ValidationError

2016-02-13 Thread Django
#26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and 
post
loaddata is ValidationError
-+-
 Reporter:  bukin242 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by bukin242):

 Replying to [comment:3 timgraham]:
 > I tried to reproduce with the attached test but it works fine. Could you
 provide a failing test?

 Sorry.
 I do not write the test so far.


 I did everything manually via console.
 You test field DateRange and DateTimeTZRange

 But i used FloatRangeField and IntegerRangeField and xml format.
 Please try these

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.e73bdc49a8dbc0afcb740a1e2a1ff87e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and post loaddata is ValidationError

2016-02-12 Thread Django
#26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and 
post
loaddata is ValidationError
-+-
 Reporter:  bukin242 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by timgraham):

 I tried to reproduce with the attached test but it works fine. Could you
 provide a failing test?

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.5be1f466abaa247c79be6e9d6703a672%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and post loaddata is ValidationError

2016-02-12 Thread Django
#26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and 
post
loaddata is ValidationError
-+-
 Reporter:  bukin242 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * Attachment "26215-test.diff" added.


--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.f68714dba202f8754f632d490642f445%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and post loaddata is ValidationError

2016-02-12 Thread Django
#26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and 
post
loaddata is ValidationError
-+-
 Reporter:  bukin242 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by bukin242):

 * cc: bukin242 (added)


--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.38475d7dac1f1760cfc0956f5ce6b3f2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and post loaddata is ValidationError

2016-02-12 Thread Django
#26215: if dumpdata FloatRangeField and IntegerRangeField values = "None" and 
post
loaddata is ValidationError
-+-
 Reporter:  bukin242 |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.9
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by bukin242):

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


Old description:

> 1. FloatRangeField db data == None
> 2. ./manage dumpdata
> 3. ./manage loaddata
>
> Conversion problem. accept string u'None' to float type
>
> Track:
>   File "/local/lib/python2.7/site-
> packages/django/db/models/fields/__init__.py", line 1803, in to_python
> params={'value': value},
>
> Decision:
>
> {{{
>
> def to_python(self, value):
> if value == u'None':
> return None
> elif value is None:
> return value
> try:
> return int(value)
> except (TypeError, ValueError):
> raise exceptions.ValidationError(
> self.error_messages['invalid'],
> code='invalid',
> params={'value': value},
> )
> }}}
>
> And IntegerField too
>
> Source data dump example:
>
> {{{
> {"upper": "None", "lower":
> "1.45", "bounds": "[)"}
> }}}

New description:

 1. FloatRangeField db data == None
 2. ./manage dumpdata
 3. ./manage loaddata

 Conversion problem. accept string u'None' to float type

 Track:
   File "/local/lib/python2.7/site-
 packages/django/db/models/fields/__init__.py", line 1803, in to_python
 params={'value': value},

 Decision:

 {{{

 def to_python(self, value):
 if value == u'None':
 return None
 elif value is None:
 return value
 try:
 return float(value)
 except (TypeError, ValueError):
 raise exceptions.ValidationError(
 self.error_messages['invalid'],
 code='invalid',
 params={'value': value},
 )
 }}}

 And IntegerField too

 Source data dump example:

 {{{
 {"upper": "None", "lower":
 "1.45", "bounds": "[)"}
 }}}

--

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.cb28e3b5f0e5927556e516f45433b853%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.