#35046: BlankChoiceIterator causes AttributeError for some existing packages and
projects
-----------------------------+--------------------------------------
Reporter: Hazho Human | Owner: nobody
Type: Bug | Status: closed
Component: Utilities | Version: 5.0
Severity: Normal | Resolution: invalid
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 Matthew Pava):
The monkey patch is the workaround until the update is released. It
appears that they have already fixed the issue; they just haven't released
it. You can check their issue tracker here: https://github.com/SmileyChris
/django-countries/issues/447
Replying to [comment:4 Yury V. Zaytsev]:
> Is there any workaround we could use until `django-countries` is finally
updated to support Django 5? I've got the admin pages to work again with
the following monkey patch in `settings.py`, but I haven't tested it, and
didn't look deep enough into the issue to rate how disgusting it is on a
scale from 1 to 10:
>
> {{{
> from django_countries.widgets import LazyChoicesMixin
>
> LazyChoicesMixin.get_choices = lambda self: self._choices
> LazyChoicesMixin.choices = property(LazyChoicesMixin.get_choices,
LazyChoicesMixin.set_choices)
> }}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35046#comment:5>
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/0107018cb0fffa7a-3590f21d-45b8-4e6a-bf1e-fe9b2e5de98c-000000%40eu-central-1.amazonses.com.