4teamwork/ftw.upgrade — pull request #50 by lukasgraf (2014-08-28 13:44:50+00:00)
Title: Wrap step.objects in a SavepointIterator that creates a savepoint every n items.

This feature can be used to keep memory usage in check when creating large transactions.

- I only updated the method description for `step.objects` in the docs (didn't create a dedicated example demonstrating how to use it). I feel it should be pretty self explanatory and a dedicated example would only lead to a lot of repetition in the docs.
- For the tests I used a plain `unittest2.TestCase` and did an explicit `txn.abort()` in `tearDown()`. I don't think it makes a whole lot of sense booting an entire `PloneSandboxLayer` just to get transaction isolation.
- The phrasing *"the ``savepoints`` argument causes a transaction savepoint to be created every n items"* could be better (what's `n`?), but *"causes a transaction savepoint to be created every ``savepoint`` items"* also sounds weird.

@jone please review