summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/bootstrap/less/code.less
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2014-07-07 13:51:53 +0200
committerXavier Morel <xmo@openerp.com>2014-07-07 13:51:53 +0200
commitac282e029420ec5ad44cc6c3b99784d24faa043b (patch)
treed79c7578ee07b31bc32b88a5f5852a3fd204d0dd /addons/web/static/lib/bootstrap/less/code.less
parentcd7e9a98d4282a43ca752bf85bd9bf6e99cfb6b6 (diff)
[FIX] unsafe listification of weakref in Python < 2.7.4
Fixes #966 * As a preallocation optimization, ``list()`` calls ``__len__`` on its parameter if it's available * Before Python 2.7.4, WeakSet has a bug[0] where ``len()`` is unsafe: it is done by iteration and weakrefs may be removed from the underlying set during the iteration As a result, the safety feature of listifying a WeakSet to ensure we have strong refs on all items during iteration may blow up. Wrapping the weakset in a ``iter()`` makes ``__len__()`` invisible and ensures we're within the IterationGuard[1]. Which now that I think about it means we *should* be able to safely iterate weaksets in the first place and may not have needed to listify them... [0] http://bugs.python.org/issue14159 [1] http://hg.python.org/cpython/file/b6acfbe2bdbe/Lib/_weakrefset.py#l58
Diffstat (limited to 'addons/web/static/lib/bootstrap/less/code.less')
0 files changed, 0 insertions, 0 deletions