Permalink
Browse files

- lru cache was unstable under concurrency (big surprise) when it

  tried to redelete a key in the cache that had already been deleted.
  Symptom: line 64 in put:del data[oldkey]:KeyError: '/some/path'.
  Now we just ignore the key error if we can't delete the key.

- add zip_safe = false to setup.cfg.
  • Loading branch information...
Chris McDonough
Chris McDonough committed Feb 16, 2009
1 parent a3f4048 commit 5b2abc88594d5b80e84ad62d1668618ea1d43d9f
Showing with 13 additions and 1 deletion.
  1. +7 −0 CHANGES.txt
  2. +5 −1 repoze/bfg/lru.py
  3. +1 −0 setup.cfg
View
@@ -3,6 +3,11 @@ Next Release
Bug Fixes
---------
+- lru cache was unstable under concurrency (big surprise) when it
+ tried to redelete a key in the cache that had already been deleted.
+ Symptom: line 64 in put:del data[oldkey]:KeyError: '/some/path'.
+ Now we just ignore the key error if we can't delete the key.
+
- Empty location names in model paths when generating a URL using
``repoze.bfg.model_url`` based on a model obtained via traversal are
no longer ignored in the generated URL. This means that if a
@@ -21,6 +26,8 @@ Features
``repoze.bfg.traversal.quote_path_segment``, and
``repoze.bfg.url.urlencode``.
+- add zip_safe = false to setup.cfg.
+
Documentation
-------------
View
@@ -61,7 +61,11 @@ def put(self, key, val, _marker=_marker):
try:
oldkey = current['key']
if oldkey is not _marker:
- del data[oldkey]
+ try:
+ del data[oldkey]
+ except KeyError:
+ # XXX already deleted; seen in wild 5/16/2009?
+ pass
current['key'] = key
current['ref'] = True
data[key] = (hand, val)
View
@@ -1,4 +1,5 @@
[easy_install]
+zip_ok = false
index_url = http://dist.repoze.org/lemonade/dev/simple
[nosetests]

0 comments on commit 5b2abc8

Please sign in to comment.