#30280: Model_get_FIELD_display() returns proxies in 2.2rc1 but always returned
strings previously
-------------------------------------+-------------------------------------
     Reporter:  Matthias Kestenholz  |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Release blocker      |               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 Tim Graham):

 * stage:  Unreviewed => Accepted


Old description:

> I'm not sure whether that was wanted but
> https://github.com/django/django/commit/cc79c7ee637e65c8da27e56d746c87903d5ec901
> (see https://code.djangoproject.com/ticket/27795 ) introduced a change
> where code which calls `get_*_display` got a string previously and now
> gets a proxy under some circumstances.
>
> If this isn't wanted (and I cannot find anything in the release notes
> saying that it is) then that's a regression which should be fixed before
> releasing Django 2.2.

New description:

 I'm not sure whether that was wanted but
 cc79c7ee637e65c8da27e56d746c87903d5ec901 (#27795) introduced a change
 where code which calls `get_*_display` got a string previously and now
 gets a proxy under some circumstances.

 If this isn't wanted (and I cannot find anything in the release notes
 saying that it is) then that's a regression which should be fixed before
 releasing Django 2.2.

--

Comment:

 Probably `str()` could be used where `force_text()` was used previously.
 By the way, you should explain how to reproduce the issue, i.e. what
 "under some circumstances" means.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30280#comment:2>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.605fd0cdba309f096f2477ab9a7685f3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to