#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
-----------------------------+--------------------------------------
Changes (by Mariusz Felisiak):
* cc: Nick Pope (added)
* status: new => closed
* resolution: => invalid
* easy: 1 => 0
Comment:
Replying to [ticket:35046 Hazho Human]:
> The iterators should have method __len__ ...!
That's not true, and there is no need to shout. According to
[https://docs.python.org/3/glossary.html#term-iterator the Python's
documentation]: ''"Iterators are required to have an `__iter__()`
method...".'' and that's it so the `BlankChoiceIterator` implementation is
correct. Also, `django-countries` doesn't support Django 4.2+, but there
are efforts to change this, check out [https://github.com/SmileyChris
/django-countries/pull/424 PR424] and [https://github.com/SmileyChris
/django-countries/pull/438 PR 438].
--
Ticket URL: <https://code.djangoproject.com/ticket/35046#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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018c7b400ad1-86debc9f-3243-4b37-9d8d-9098cd4476c6-000000%40eu-central-1.amazonses.com.