lp://staging/~cjwatson/storm/py3-listify-resultset
- Get this branch:
- bzr branch lp://staging/~cjwatson/storm/py3-listify-resultset
Branch merges
- Simon Poirier (community): Approve
-
Diff: 147 lines (+72/-2)5 files modifiedNEWS (+8/-0)
setup.py (+1/-0)
storm/store.py (+3/-0)
storm/tests/zope/README.txt (+53/-0)
storm/zope/configure.zcml (+7/-2)
Branch information
Recent revisions
- 554. By Colin Watson
-
Fix list() on security-proxied ResultSets on Python 3.
On Python 3, list() calls len() internally to preallocate the correct
amount of space if possible. If __len__ is unimplemented, then it falls
back to guessing, but ForbiddenAttribute confuses it and results in
failing to create the list. Allowing __len__ through the security
proxy, even though it's unimplemented, avoids this.(We don't want to implement ResultSet.__len__ in terms of
ResultSet.count because it would make it too easy to write code that
implicitly issued extra SQL queries. On the other hand,
EmptyResultSet.__len__ can trivially be implemented, so do so here.) - 549. By Colin Watson
-
Update ZCML for BoundReferenceSet to include __getitem__ and is_empty. [r=twom]
- 547. By Colin Watson
-
Return self from EmptyResultSet.
config( ) to match ResultSet. [r=free. ekanayaka, cjwatson] - 546. By Colin Watson
-
A new block_access context manager blocks database access for one or more stores in the managed scope. [r=cjwatson]
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp://staging/storm