Mon, 23 Jan 2017 15:35:19 +0100 [cwconfig] create a virtual "cubes" package
Philippe Pepiot <philippe.pepiot@logilab.fr> [Mon, 23 Jan 2017 15:35:19 +0100] rev 11920
[cwconfig] create a virtual "cubes" package _CubesImporter now handle import of "cubes" and return a virtual module so that "cubes" is always importable without having to create a __init__.py in CUBES_DIR and add CUBES_DIR/.. to sys.path. Drop custom code in setup.py used to create CUBES_DIR/__init__.py and drop now useless warning when cubicweb is installed in develop mode Update test_cubes_path() and ensure 'cubes.file' is not loaded before testing its import. This test seems to have mistakes because cubes are loaded automatically when discovering cw commands (cubes.<x>.ccplugin), not sure how this should be fixed definitely.
Fri, 20 Jan 2017 18:17:04 +0100 Change hooks control (deny_all_hooks_but / allow_all_hooks_but) to be more predictable
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 20 Jan 2017 18:17:04 +0100] rev 11919
Change hooks control (deny_all_hooks_but / allow_all_hooks_but) to be more predictable Prior to this, if one execute code like: with cnx.hooks.deny_all_hooks_but('metadata'): with cnx.hooks.deny_all_hooks_but(): # mycode 'metadata' hooks will be activated anyway in the inner block, which is rather unexpected (of course in real life you only see the latest hooks control statement, the former being higher in the call stack). This is due to the underlying usage of old `enable_hook_categories` / `disable_hook_categories` methods, which were introduced much before the now official context manager based API (with `cnx.[deny|all]_all_hooks_but(...)`). To move on, this patch drop the two legacy methods, rename and privatize related internal state on the connection (`hooks_mode` becomes `_hooks_mode`, `disabled_hook_cats` and `enabled_hook_cats` become `_hooks_categories`) and reimplement the `_hooks_control` context manager to simply update them. See the added unit test for details.
Tue, 24 Jan 2017 14:09:13 +0100 [cwconfig] make appobjects_cubes_modnames() public
Philippe Pepiot <philippe.pepiot@logilab.fr> [Tue, 24 Jan 2017 14:09:13 +0100] rev 11918
[cwconfig] make appobjects_cubes_modnames() public The method is used in cubicweb.cwvreg without underscore and outside of the config class, so let's make this method public. Fix autoreload with twisted.
Fri, 20 Jan 2017 15:16:18 +0100 Fix str(Unauthorized) 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 20 Jan 2017 15:16:18 +0100] rev 11917
Fix str(Unauthorized) which is really problematic on python 3 where __unicode__ is never called anymore. This was caused because in PY3, CubicWebException.__str__ was referencing __unicode__ implementation of CubicWebException, not of its subclass that implements it. Fix a flake8 style warning about lambda assignment as a bonus.
Fri, 20 Jan 2017 09:55:08 +0100 [test] avoid using a deprecated feature of yams
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 20 Jan 2017 09:55:08 +0100] rev 11916
[test] avoid using a deprecated feature of yams handle_file() now require a module name (yams@d9120d7)
Tue, 12 May 2015 22:14:24 +0200 [test] add some tests to web.views.baseviews
Alain Leufroy <alain@leufroy.fr> [Tue, 12 May 2015 22:14:24 +0200] rev 11915
[test] add some tests to web.views.baseviews
Mon, 23 Jan 2017 10:44:00 +0100 [tox] Drop "touch {envdir}/share/cubicweb/cubes/__init__.py" command on py34 env
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 23 Jan 2017 10:44:00 +0100] rev 11914
[tox] Drop "touch {envdir}/share/cubicweb/cubes/__init__.py" command on py34 env This was useful when we installed cubicweb in "develop" mode but we do not do this anymore.
Mon, 23 Jan 2017 11:02:21 +0100 Drop support for https-url in all-in-one.conf
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 23 Jan 2017 11:02:21 +0100] rev 11913
Drop support for https-url in all-in-one.conf This feature allowing an instance to have both anonymous and authenticated (https) url is not used anymore, let's drop it.
Fri, 20 Jan 2017 16:53:28 +0100 [test] use TemporaryDirectory context manager
Philippe Pepiot <philippe.pepiot@logilab.fr> [Fri, 20 Jan 2017 16:53:28 +0100] rev 11912
[test] use TemporaryDirectory context manager For consistency with others tests, use TemporaryDirectory from cubicweb.devtools.testlib.
Fri, 20 Jan 2017 14:32:34 +0100 [tox] Drop "exclude" option from flake8 config and adjust flake8-ok-files.txt accordingly
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 20 Jan 2017 14:32:34 +0100] rev 11911
[tox] Drop "exclude" option from flake8 config and adjust flake8-ok-files.txt accordingly Some files listed in flake8-ok-files.txt were excluded of flake8 run because of the "exclude" option in tox.ini. Some of them were non-existent files (moved), some others were actually non-flake8-compliant. In the latter case, we adjust trivial errors (blank lines, module import not on top of file) but remove others (like cubicweb/test/unittest_utils.py) from flake8-ok-files.txt.
Fri, 20 Jan 2017 10:31:04 +0100 [autoform] Go through guess_field even when field class is specified using uicfg
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 20 Jan 2017 10:31:04 +0100] rev 11910
[autoform] Go through guess_field even when field class is specified using uicfg guess_field does not only find the proper field class for some attribute/relation, but also do some basic configuration depending on e.g. constraints. Before this patch, if one was specifying explicitly the field class using uicfg.autoform_field, this automatic configuration wasn't happening. Change form.field_by_name and ff.guess_field so explicit class are also automatically configured now. Closes #14474840
Fri, 20 Jan 2017 03:54:43 +0100 [uilib] Fix incorrect serialization of python dicts into javascript objects 3.24
Florent Cayré <florent.cayre@gmail.com> [Fri, 20 Jan 2017 03:54:43 +0100] rev 11909
[uilib] Fix incorrect serialization of python dicts into javascript objects Valid javascript object keys must be surrounded by quotes unless they are valid javascript identifiers. Valid identifiers are a defined by complex and changing specs, so it is much simpler to always use quotes. Closes #17046704.
Thu, 12 Jan 2017 13:40:25 +0100 [repository] Fix connection-pool-size not set to 1 with quick_start enabled 3.24
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 12 Jan 2017 13:40:25 +0100] rev 11908
[repository] Fix connection-pool-size not set to 1 with quick_start enabled config.load_schema() and config.init_cube() reload configuration options from config file, so a manually set connections-pool-size (eg. when quick_start is enabled) wasn't working.
Thu, 19 Jan 2017 11:12:35 +0100 [migration] Enhance assertion message to get a chance to fix the problem 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 19 Jan 2017 11:12:35 +0100] rev 11907
[migration] Enhance assertion message to get a chance to fix the problem
Thu, 19 Jan 2017 11:12:07 +0100 [migration] Skip virtual rtypes when adding relation definition through add_cube 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 19 Jan 2017 11:12:07 +0100] rev 11906
[migration] Skip virtual rtypes when adding relation definition through add_cube Virtual rtypes should be skipped as they are added dynamically on loading schema. Those are skipped by e.g. schema serialisation or add_entity_type, do the same thing here.
Thu, 19 Jan 2017 11:10:47 +0100 [migration] Avoid unnecessary intermediary commit when migrating a schema 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 19 Jan 2017 11:10:47 +0100] rev 11905
[migration] Avoid unnecessary intermediary commit when migrating a schema Those are low-hanging fruit following changes in ac74476d686c (Fix addition of entity type including boundary constraints on its own attributes): this is no more necesary to commit the get a new relation type definition in the schema. At some point we could/should probably do more on this topic to avoid intermediary commit on e.g. entity type addition, but this requires more work.
Wed, 18 Jan 2017 15:04:27 +0100 [migration] Fix addition of entity type including boundary constraints on its own attributes 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 18 Jan 2017 15:04:27 +0100] rev 11904
[migration] Fix addition of entity type including boundary constraints on its own attributes This was failing because of the sequence of sql executing when adding an attribute: 1. add entity type <commit> 2. add relation type for attribute 1 <commit> 3. add attribute 1 and associated constraints <commit> etc. In the case of e.g. start/end constraint, we were trying to add the constraint before addition of the constrained attribute (e.g. add constraint on 'start' referencing 'end', but only 'start' has been added yet, not 'end'). This patch fix this by: * adding the relation type to the schema without having to commit, but keeping the operation to revert the addition if necessary - this allows to a single commit for all attributes of the entity type ; * using a LateOperation on constraint operation, so we ensure attributes are actually added before any constraint is added.
Thu, 19 Jan 2017 09:53:31 +0100 [schema sync] Refactor AfterAddCWRTypeHook and AfterAddCWComputedRTypeHook so the latter inherit from the former 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 19 Jan 2017 09:53:31 +0100] rev 11903
[schema sync] Refactor AfterAddCWRTypeHook and AfterAddCWComputedRTypeHook so the latter inherit from the former and enhance their docstring.
Wed, 18 Jan 2017 12:36:02 +0100 Drop embed-allowed option, gone away for a long time 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 18 Jan 2017 12:36:02 +0100] rev 11902
Drop embed-allowed option, gone away for a long time
Wed, 04 Jan 2017 10:02:05 +0100 Never record undo information for session or data import 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 04 Jan 2017 10:02:05 +0100] rev 11901
Never record undo information for session or data import for session, it may causes unlimited database size expansion while it makes no sense to undo this kind of changes. For data import, they are created programatically hence we may not want to undo this either.
Thu, 19 Jan 2017 14:53:05 +0100 [cwvreg] load registry using modules names instead of directories
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 19 Jan 2017 14:53:05 +0100] rev 11900
[cwvreg] load registry using modules names instead of directories Introspect cubicweb, cubes and apphome using pkgutil to generate the full list of modules names for loading registries. Avoiding using bogus logilab.common.modutils.modpath_from_file().
Thu, 19 Jan 2017 15:27:39 +0100 [schema] load schema from modules names instead of directories
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 19 Jan 2017 15:27:39 +0100] rev 11899
[schema] load schema from modules names instead of directories Introspect cubicweb, cubes and apphome using pkgutil to generate the full list of modules names for loading the schema. Keep historical behavior and check if source .py file exists if a module is found using python bytecode file (.pyc and .pyo) Loading schema from apphome require apphome to be present in sys.path and that "schema" module resolve to a file located in apphome. Update migraction tests to explicitely update sys.path when loading schema from different apps, use a contextmanager for this so it's more readable. Require updated logilab-common and yams
Wed, 18 Jan 2017 17:16:00 +0100 [devtools/test] Skip qunit tests in case of timeout
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 18 Jan 2017 17:16:00 +0100] rev 11898
[devtools/test] Skip qunit tests in case of timeout Follow-up on 87443f279b0f where other similar tests got adjusted not to fail (in particular in our CI environment).
Thu, 18 Feb 2016 14:22:07 +0100 [autoform] Avoid two calls to field.process_form for the same field in some cases
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 18 Feb 2016 14:22:07 +0100] rev 11897
[autoform] Avoid two calls to field.process_form for the same field in some cases when some entity is being created and data include non-inlined relations, the values for this relation are now stored for later usage, avoiding two calls to field's process_form method, which may be unexpected for custom fields. This has been discovered in saem_ref#f5444b1f9770. Reorganize imports in the test along the way.
Mon, 19 Dec 2016 17:22:48 +0100 [pyramid] Don't use unsafe_cnx_context_manager for write queries 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Mon, 19 Dec 2016 17:22:48 +0100] rev 11896
[pyramid] Don't use unsafe_cnx_context_manager for write queries we may have clumsy error that hide previous problems on attempting to commit the transaction. Closes #16753531
Wed, 14 Dec 2016 08:37:11 +0100 Repair database wrt indexes / unique constraints 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 14 Dec 2016 08:37:11 +0100] rev 11895
Repair database wrt indexes / unique constraints * recreate indexes dropped by 3.23 migration (but it's still unclear why) * attempt drop remaining extra indexes (there may be a bunch of these on old instances) * warn about missing expected indexes Closes #16666137
Wed, 14 Dec 2016 17:06:24 +0100 Enhance postgres index filter with values from real life 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 14 Dec 2016 17:06:24 +0100] rev 11894
Enhance postgres index filter with values from real life This has been found on fairly old instances of ours (cwo/elo). Dunno if we really want this in, it may lead to false negatives.
Wed, 14 Dec 2016 17:04:29 +0100 Extract functions to list expected/found database indexes from check_indexes 3.24
Sylvain Thénault <sylvain.thenault@logilab.fr> [Wed, 14 Dec 2016 17:04:29 +0100] rev 11893
Extract functions to list expected/found database indexes from check_indexes so they may be used from other contexts. Use consistent naming along the way: always use indexes, not indices.
Thu, 24 Nov 2016 15:36:26 +0100 Simplify and fix _cw.drop_entity_cache
Sylvain Thénault <sylvain.thenault@logilab.fr> [Thu, 24 Nov 2016 15:36:26 +0100] rev 11892
Simplify and fix _cw.drop_entity_cache * it's never called with an eid as argument, beside in a useless case in test (removed) * the only place where it's called from outside the tests is in full-text reindexation in server.checkintegrity: we could removed the request implementation and move it in unittest_rset, byt I decided to keep it for consistency with all other entity cache handling methods * get back a fix from Julien Cristau for the connection's implementation, quoting is commit message: When removing an entity from the transaction's cache, clear the entity's own cache May avoid issues where an entity object is still accessible somewhere else (e.g. an operation) after dropping it from the transaction's cache, with a stale attribute or relation cache.
Fri, 18 Nov 2016 17:50:56 +0100 [entity/optimization] Cache rset when entity.related is called with entities=False
Sylvain Thénault <sylvain.thenault@logilab.fr> [Fri, 18 Nov 2016 17:50:56 +0100] rev 11891
[entity/optimization] Cache rset when entity.related is called with entities=False If fail to see why we couldn't cache in this case, while this is important for optimization reason: when doing a single HTTP request, some queries are done two or three times because of predicates / uicfg or alike. Also always store tuple and not list in the cache, because: * else we get some regression * and inconsistent result type (tuple or list) * and it simply feels better to cache an unmutable object.
(0) -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 tip