I suggest to serialize the iterable as a tuple.
--
Ticket URL: <https://code.djangoproject.com/ticket/21852>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Pull request is at https://github.com/django/django/pull/2198
--
Ticket URL: <https://code.djangoproject.com/ticket/21852#comment:1>
--
Ticket URL: <https://code.djangoproject.com/ticket/21852#comment:2>
* stage: Unreviewed => Ready for checkin
Comment:
I can reproduce the issue.
The proposed patch looks good: the added test fails with current master
and passes after applying the patch.
I wonder however if `collections.Iterator` should be used instead of
`collections.Iterable`, but that's just nitpicking.
I'll mark this as `ready for checkin` and try to get a second set of eyes
to check it out before committing.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/21852#comment:3>
Comment (by MarkusH):
Thanks bmispelon,
Looking at the
[http://docs.python.org/3/library/collections.abc.html?highlight=collections%20iterable
#collections-abstract-base-classes collections documentation] the table
shows, that e.g. a `Sequence` is an `Iterable` but not an `Iterator`.
That's why I'd stay with `Iterable`.
--
Ticket URL: <https://code.djangoproject.com/ticket/21852#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"047394f79c2cbc6cf44684a1f0d17aba1ddfe1c8"]:
{{{
#!CommitTicketReference repository=""
revision="047394f79c2cbc6cf44684a1f0d17aba1ddfe1c8"
Fixed #21852 -- Make migration writer serialize iterators
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21852#comment:5>
Comment (by Andrew Godwin <andrew@…>):
In [changeset:"a5ec11c4bbb8f82e02871f154b3cfe0008b00a2b"]:
{{{
#!CommitTicketReference repository=""
revision="a5ec11c4bbb8f82e02871f154b3cfe0008b00a2b"
Merge pull request #2198 from Markush2010/ticket21852
Fixed #21852 -- Make migration writer serialize iterators
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21852#comment:6>