# HG changeset patch # User Julien Cristau # Date 1410954211 -7200 # Node ID 6343d91f5200e11c2da9c1ccacd9a10d7aa83f37 # Parent 0d831b40fa48dc9a7a0f8596cbe6e69460d0ce7a# Parent 341b63331e4ba6ba6e5a10f7b4b2bf2c63a4bbf6 merge 3.17.17 into 3.18 branch diff -r 0d831b40fa48 -r 6343d91f5200 .hgtags --- a/.hgtags Tue Sep 02 12:22:18 2014 +0200 +++ b/.hgtags Wed Sep 17 13:43:31 2014 +0200 @@ -335,6 +335,9 @@ a979d1594af6501a774fb32eb67cd32fea626655 cubicweb-version-3.17.16 a979d1594af6501a774fb32eb67cd32fea626655 cubicweb-debian-version-3.17.16-1 a979d1594af6501a774fb32eb67cd32fea626655 cubicweb-centos-version-3.17.16-1 +57e9d1c70512d0f4e2c33d33db436a8274e10c1a cubicweb-version-3.17.17 +57e9d1c70512d0f4e2c33d33db436a8274e10c1a cubicweb-debian-version-3.17.17-1 +57e9d1c70512d0f4e2c33d33db436a8274e10c1a cubicweb-centos-version-3.17.17-1 db37bf35a1474843ded0a537f9cb4838f4a78cda cubicweb-version-3.18.0 db37bf35a1474843ded0a537f9cb4838f4a78cda cubicweb-debian-version-3.18.0-1 db37bf35a1474843ded0a537f9cb4838f4a78cda cubicweb-centos-version-3.18.0-1 diff -r 0d831b40fa48 -r 6343d91f5200 __pkginfo__.py --- a/__pkginfo__.py Tue Sep 02 12:22:18 2014 +0200 +++ b/__pkginfo__.py Wed Sep 17 13:43:31 2014 +0200 @@ -39,7 +39,7 @@ ] __depends__ = { - 'logilab-common': '>= 0.60.0', + 'logilab-common': '>= 0.62.0', 'logilab-mtconverter': '>= 0.8.0', 'rql': '>= 0.31.2', 'yams': '>= 0.39.1', diff -r 0d831b40fa48 -r 6343d91f5200 cubicweb.spec --- a/cubicweb.spec Tue Sep 02 12:22:18 2014 +0200 +++ b/cubicweb.spec Wed Sep 17 13:43:31 2014 +0200 @@ -20,7 +20,7 @@ BuildArch: noarch Requires: %{python} -Requires: %{python}-logilab-common >= 0.60.0 +Requires: %{python}-logilab-common >= 0.62.0 Requires: %{python}-logilab-mtconverter >= 0.8.0 Requires: %{python}-rql >= 0.31.2 Requires: %{python}-yams >= 0.39.1 diff -r 0d831b40fa48 -r 6343d91f5200 cwvreg.py --- a/cwvreg.py Tue Sep 02 12:22:18 2014 +0200 +++ b/cwvreg.py Wed Sep 17 13:43:31 2014 +0200 @@ -1,4 +1,4 @@ -# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of CubicWeb. @@ -598,11 +598,33 @@ if self.is_reload_needed(path): self.reload(path) + def _cleanup_sys_modules(self, path): + """Remove submodules of `directories` from `sys.modules` and cleanup + CW_EVENT_MANAGER accordingly. + + We take care to properly remove obsolete registry callbacks. + + """ + caches = {} + callbackdata = CW_EVENT_MANAGER.callbacks.values() + for callbacklist in callbackdata: + for callback in callbacklist: + func = callback[0] + # for non-function callable, we do nothing interesting + module = getattr(func, '__module__', None) + caches[id(callback)] = module + deleted_modules = set(cleanup_sys_modules(path)) + for callbacklist in callbackdata: + for callback in callbacklist[:]: + module = caches[id(callback)] + if module and module in deleted_modules: + callbacklist.remove(callback) + def reload(self, path, force_reload=True): """modification detected, reset and reload the vreg""" CW_EVENT_MANAGER.emit('before-registry-reload') if force_reload: - cleanup_sys_modules(path) + self._cleanup_sys_modules(path) cubes = self.config.cubes() # if the fs code use some cubes not yet registered into the instance # we should cleanup sys.modules for those as well to avoid potential @@ -611,7 +633,7 @@ for cube in cfg.expand_cubes(cubes, with_recommends=True): if not cube in cubes: cpath = cfg.build_appobjects_cube_path([cfg.cube_dir(cube)]) - cleanup_sys_modules(cpath) + self._cleanup_sys_modules(cpath) self.register_objects(path) CW_EVENT_MANAGER.emit('after-registry-reload') diff -r 0d831b40fa48 -r 6343d91f5200 debian/changelog --- a/debian/changelog Tue Sep 02 12:22:18 2014 +0200 +++ b/debian/changelog Wed Sep 17 13:43:31 2014 +0200 @@ -34,9 +34,15 @@ -- Julien Cristau Fri, 10 Jan 2014 17:14:18 +0100 +cubicweb (3.17.17-1) unstable; urgency=low + + * new upstream release + + -- Aurelien Campeas Tue, 16 Sep 2014 18:38:19 +0200 + cubicweb (3.17.16-1) unstable; urgency=low - * new upstream value + * new upstream release -- Aurelien Campeas Mon, 07 Jul 2014 19:26:12 +0200 diff -r 0d831b40fa48 -r 6343d91f5200 debian/control --- a/debian/control Tue Sep 02 12:22:18 2014 +0200 +++ b/debian/control Wed Sep 17 13:43:31 2014 +0200 @@ -152,7 +152,7 @@ graphviz, gettext, python-logilab-mtconverter (>= 0.8.0), - python-logilab-common (>= 0.60.0), + python-logilab-common (>= 0.62.0), python-yams (>= 0.39.1), python-rql (>= 0.31.2), python-lxml diff -r 0d831b40fa48 -r 6343d91f5200 web/data/cubicweb.form.css --- a/web/data/cubicweb.form.css Tue Sep 02 12:22:18 2014 +0200 +++ b/web/data/cubicweb.form.css Wed Sep 17 13:43:31 2014 +0200 @@ -164,7 +164,7 @@ font-weight: bold; } -div.pendingDelete { +.pendingDelete { text-decoration: line-through; }