#34260: models.FloatField documentation doesn't mention that +inf, -inf, and NaN
are database-dependent.
-------------------------------------+-------------------------------------
     Reporter:  Matt Cooper          |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Documentation        |                  Version:  4.1
     Severity:  Normal               |               Resolution:
     Keywords:  floatfield           |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

 > In that test case, is the field null=True? In a brand new Django 4.1
 project with the following models.py pointing to a SQLite database:

 As for me it's a database caveat, and we cannot document all caveats in
 Django docs.

 > It's also curious that b92ffebb0cdc469baaf1b8f0e72dddb069eb2fb4 (#33954)
 explicitly made this unsupported where (at least) PostgreSQL does support
 `nan`, `+inf`, and `-inf`. Arguably I'd say that that was a backward
 incompatible change with no release note and people may already be
 depending on that support. Lack of support for these values is a database-
 specific thing.

 That's not exactly true. Folks were able to save objects with `nan` but
 they were not able to fetch them back from the database, so I don't see
 how someone can rely on this behavior.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34260#comment:7>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/01070185baa77e3d-6ad964fe-0d7d-47c3-87eb-d0f166087fd0-000000%40eu-central-1.amazonses.com.

Reply via email to