Skip to content

Commit

Permalink
Merge branch 'master' into fix-ZCacheable_getModTime
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed May 15, 2018
2 parents edf7fb1 + 05d4b45 commit d15a545
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -16,6 +16,8 @@ Bugfixes

- Fix comparison against non-ints in ZCacheable_getModTime.

- Use log.warning to avoid deprecation warning for log.warn


4.0b4 (2018-04-23)
------------------
Expand Down
9 changes: 5 additions & 4 deletions src/OFS/Application.py
Expand Up @@ -370,10 +370,11 @@ def import_products():
done = {}
for priority, product_name, index, product_dir in get_products():
if product_name in done:
LOG.warn('Duplicate Product name: '
'After loading Product %r from %r, '
'I skipped the one in %r.' % (
product_name, done[product_name], product_dir))
LOG.warning(
'Duplicate Product name: '
'After loading Product %r from %r, '
'I skipped the one in %r.' % (
product_name, done[product_name], product_dir))
continue
done[product_name] = product_dir
import_product(product_dir, product_name)
Expand Down
6 changes: 3 additions & 3 deletions src/OFS/Cache.py
Expand Up @@ -165,7 +165,7 @@ def ZCacheable_get(self, view_name='', keywords=None,
mtime_func, default)
return val
except:
LOG.warn('ZCache_get() exception')
LOG.warning('ZCache_get() exception')
return default
return default

Expand All @@ -182,7 +182,7 @@ def ZCacheable_set(self, data, view_name='', keywords=None,
c.ZCache_set(ob, data, view_name, keywords,
mtime_func)
except:
LOG.warn('ZCache_set() exception')
LOG.warning('ZCache_set() exception')

security.declareProtected(ViewManagementScreensPermission,
'ZCacheable_invalidate')
Expand All @@ -201,7 +201,7 @@ def ZCacheable_invalidate(self, view_name='', REQUEST=None):
except:
exc = sys.exc_info()
try:
LOG.warn('ZCache_invalidate() exception')
LOG.warning('ZCache_invalidate() exception')
message = 'An exception occurred: %s: %s' % exc[:2]
finally:
exc = None
Expand Down
2 changes: 1 addition & 1 deletion versions.cfg
Expand Up @@ -13,7 +13,7 @@ buildout.wheel = 0.2.0
certifi = 2018.4.16
chardet = 3.0.4
collective.recipe.cmd = 0.11
collective.recipe.sphinxbuilder = 1.0
collective.recipe.sphinxbuilder = 1.1
colorama = 0.3.9
coverage = 4.5.1
docutils = 0.14
Expand Down

0 comments on commit d15a545

Please sign in to comment.