#20094 closed Bug (fixed)
Models with `next` method on python 2.6
| Reported by: | Marc Tamlyn | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 1.5 |
| Severity: | Normal | Keywords: | |
| Cc: | Claude Paroz | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I've identified a problem with the following commit https://github.com/django/django/commit/df7a65ac4ba36dd155e80b8bcfe607390976ad47
The behaviour of isinstance(foo, collections.Iterable) is different between python 2.6 and python 2.7/3.X
This gist https://gist.github.com/mjtamlyn/5203598 will demonstrate the problem
The end result is that any model which defines a next method fails on python 2.6/django1.5 when used in a foreign key, as it has a next method but is not iterable.
Change History (5)
comment:1 by , 13 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 13 years ago
| Has patch: | set |
|---|
comment:3 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
https://github.com/django/django/pull/933