Merge lp://staging/~cjwatson/storm/py3-dict into lp://staging/storm

Proposed by Colin Watson
Status: Merged
Merged at revision: 514
Proposed branch: lp://staging/~cjwatson/storm/py3-dict
Merge into: lp://staging/storm
Diff against target: 385 lines (+49/-31)
14 files modified
storm/cache.py (+6/-3)
storm/cextensions.c (+1/-1)
storm/expr.py (+1/-1)
storm/info.py (+3/-1)
storm/references.py (+4/-2)
storm/sqlobject.py (+6/-4)
storm/store.py (+3/-3)
storm/tz.py (+3/-1)
storm/uri.py (+2/-1)
storm/zope/testing.py (+4/-2)
storm/zope/zstorm.py (+4/-3)
tests/mocker.py (+8/-7)
tests/store/base.py (+1/-1)
tests/zope/testing.py (+3/-1)
To merge this branch: bzr merge lp://staging/~cjwatson/storm/py3-dict
Reviewer Review Type Date Requested Status
Kristian Glass (community) Approve
Storm Developers Pending
Review via email: mp+371160@code.staging.launchpad.net

Commit message

Handle Python 3's changes to dict iteration methods.

Description of the change

In most cases I opted for a somewhat pedantic translation of d.iterfoo() to six.iterfoo(d) and d.foo() to list(six.iterfoo(d)), since there are enough cases where this matters either for performance or to avoid iterating over a dictionary while modifying it that it's simplest to be consistent.

There were a few cases where the Python 2 code was iterating over something like d.items() when it didn't need to do a copy; I left those cases alone, since they'll just become slightly more efficient under Python 3.

To post a comment you must log in.
Revision history for this message
Kristian Glass (doismellburning) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: